Skip to content

Commit 645111d

Browse files
committed
burn-timestamps: cleanup
1 parent a2e78bb commit 645111d

File tree

2 files changed

+31
-24
lines changed

2 files changed

+31
-24
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# burn-timestamps
2+
3+
Burn timestamps contained in mp4 video into a new video file.
4+
5+
## Installation
6+
7+
Install the latest version like so:
8+
9+
```bash
10+
cargo install --git https://github.com/strawlab/strand-braid burn-timestamps
11+
```
12+
13+
## Usage
14+
15+
```
16+
Usage: burn-timestamps [OPTIONS] --input <INPUT> --output <OUTPUT>
17+
18+
Options:
19+
--input <INPUT>
20+
Input MP4 video
21+
--output <OUTPUT>
22+
Output MP4 file
23+
--timestamp-source <TIMESTAMP_SOURCE>
24+
Source of timestamp [default: best-guess] [possible values: best-guess, frame-info-recv-time, mp4-pts, misp-microsectime, srt-file]
25+
-n, --no-progress
26+
Disable showing progress
27+
-h, --help
28+
Print help
29+
-V, --version
30+
Print version
31+
```

media-utils/burn-timestamps/src/main.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,6 @@ use rusttype::Font;
1010

1111
use font_drawing::stamp_frame;
1212

13-
// trait DisplayTimestamp {
14-
// fn to_display(&self) -> String;
15-
// }
16-
17-
// impl DisplayTimestamp for frame_source::Timestamp {
18-
// fn to_display(&self) -> String {
19-
// match self {
20-
// frame_source::Timestamp::Duration(dur) => {
21-
// format!("{:9.1}ms", dur.as_secs_f64() * 1000.0)
22-
// }
23-
// frame_source::Timestamp::Fraction(frac) => {
24-
// format!("{:2.1}%", frac * 100.0)
25-
// }
26-
// }
27-
// }
28-
// }
29-
30-
// impl DisplayTimestamp for std::time::Duration {
31-
// fn to_display(&self) -> String {
32-
// frame_source::Timestamp::Duration(*self).to_display()
33-
// }
34-
// }
35-
3613
// TODO: define SrtMsg only once in this codebase.
3714
#[derive(Serialize, Deserialize)]
3815
struct SrtMsg {
@@ -86,7 +63,6 @@ fn main() -> Result<()> {
8663
let cli = Cli::parse();
8764

8865
// Load the font
89-
// let font_data = include_bytes!("../Roboto-Regular.ttf");
9066
let font_data = ttf_firacode::REGULAR;
9167
// This only succeeds if collection consists of one font
9268
let font = Font::try_from_bytes(font_data as &[u8]).expect("Error constructing Font");

0 commit comments

Comments
 (0)