You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/video_transcode_bench/README.md
+71-25Lines changed: 71 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ LICENSE file in the root directory of this source tree.
6
6
-->
7
7
# VideoTranscodeBench
8
8
9
-
This is a benchmark based on ffmpeg that represents the video encoding workloads. It can apply different encoders and videos, and run them at various encoding levels.
9
+
This is a benchmark based on ffmpeg that represents video encoding workloads. It can apply different encoders and videos, and run them at various encoding levels.
10
10
11
11
## Install VideoTranscodeBench
12
12
Installing VideoTranscodeBench involves two steps.
@@ -19,9 +19,9 @@ Installing VideoTranscodeBench involves two steps.
19
19
20
20
### 2. Download and prepare datasets
21
21
We recommend using the `El Fuente Test Sequence` from
22
-
[CDVL](https://www.cdvl.org/). the CDVL website requires (free) registration, so
22
+
[CDVL](https://www.cdvl.org/). The CDVL website requires (free) registration, so
23
23
this step is not included in the install script. After registering and logging
24
-
in, search for `ElFuente Shots for SI/TI, Y4M format, 1080p 29.96fps` and
24
+
in, search for `ElFuente Shots for SI/TI, Y4M format, 1080p 29.96fps` and
25
25
download the zip file to your local machine. We recommend `p7zip` for
26
26
decompression (and please ignore the header error during decompression). After
27
27
decompression, move all the `.y4m` files to the folder
`video_transcode_bench_svt` is the version of VideoTranscodeBench that use all
46
-
CPU cores to conduct video encoding with `SVT-AV1` encoder.
45
+
`video_transcode_bench_svt` is the version of VideoTranscodeBench that uses all
46
+
CPU cores to conduct video encoding with the `SVT-AV1` encoder.
47
47
48
48
To run VideoTranscodeBench, simply execute the following command
49
49
@@ -52,9 +52,9 @@ To run VideoTranscodeBench, simply execute the following command
52
52
```
53
53
54
54
This job also has the following optional parameters:
55
-
-`runtime`: select a pre-defined set of levels to run based on the runtime length. Three options (`short|medium|long`) are avaiable.
55
+
-`runtime`: select a pre-defined set of levels to run based on the runtime length. Three options (`short|medium|long`) are available.
56
56
-`output`: output file name.
57
-
-`levels`: manually specify the encoding levels of `SVT-AV1` encoder in the format of `low:high`. Default value is `0:0`, meaning is not specified, and the `runtime` parameter should be used instead.
57
+
-`levels`: manually specify the encoding levels of `SVT-AV1` encoder in the format of `low:high`. Default value is `0:0`, meaning it is not specified, and the `runtime` parameter should be used instead.
58
58
-**The user can either pass `levels` or `runtime` to run the benchmark, but `runtime` is highly recommended.**
59
59
60
60
@@ -64,18 +64,65 @@ For example, If you would like to run predefined short workloads, you can run th
64
64
./benchpress_cli.py run video_transcode_bench_svt -i '{"runtime": "short"}'
65
65
```
66
66
67
-
Another example. if you would like to run level 5 to 11, you can run the following:
67
+
Another example: if you would like to run level 5 to 11, you can run the following:
68
68
69
69
```
70
70
./benchpress_cli.py run video_transcode_bench_svt -i '{"levels": "5:11"}'
71
71
```
72
72
73
-
## VideoTranscodeBench Timed Mini (Two-Run Pattern)
73
+
## DCPerf Mini
74
74
75
-
The timed mini variant uses a two-run pattern to reduce execution time,
76
-
similar to DjangoBench and SparkBench mini versions.
75
+
Two mini variants shrink VideoTranscodeBench so it finishes in tens of
76
+
seconds instead of tens of minutes, for compute- and memory-constrained
77
+
environments such as emulators. They differ in how many runs they take and
78
+
in which phases they measure:
77
79
78
-
### Run 1: Prep (on a real machine with the full dataset)
Copy the cached artifacts to the target machine, then run the reuse variant:
108
155
@@ -119,9 +166,7 @@ can be run repeatedly without re-prepping.
119
166
If `resized_clips/` is not found, the reuse variant will exit with an error
120
167
directing you to run the prep variant first.
121
168
122
-
### Tuning parameters
123
-
124
-
#### Sample rate (`sample_rate`)
169
+
#### `sample_rate`
125
170
126
171
The mini prep variant (`video_transcode_bench_svt_timed_mini_prep`) uses
127
172
`sample_rate=0.2` by default, selecting ~20% of the source clips
@@ -141,12 +186,13 @@ and **image size**:
141
186
effective measurement window.
142
187
143
188
To override the default:
189
+
144
190
```bash
145
191
./benchpress_cli.py run video_transcode_bench_svt_timed_mini_prep \
146
192
-i '{"sample_rate": "0.5"}'
147
193
```
148
194
149
-
#### Fast jobs first (`--fast-jobs-first`)
195
+
#### `fast_jobs_first`
150
196
151
197
The prep variant uses `--fast-jobs-first` to reverse the command file order so
152
198
that small-resolution (fast) encoding jobs run first. This is useful for the
@@ -164,7 +210,7 @@ Without `--fast-jobs-first`, the truncated subset includes a mix of clip sizes
164
210
and resolutions, producing a throughput measurement that better reflects the
165
211
full workload.
166
212
167
-
###Full timed variant (prep/reuse)
213
+
## Full timed variant (prep/reuse)
168
214
169
215
The same two-run pattern is available for the full (non-mini) timed variant:
170
216
@@ -182,22 +228,22 @@ reuse variant can be compared with the prep variant and the original
182
228
183
229
## Note
184
230
185
-
This benchmark normally takes around tens of minutes to finish, depending on the levels or predefined workload you choose. Note that lower levels (like level 1, 2, and 3) can take hours to complete. **We suggest starting form higher levels (or `short` as runtime) for fast iterations.** The default `runtime` is `medium`.
231
+
This benchmark normally takes around tens of minutes to finish, depending on the levels or predefined workload you choose. Note that lower levels (like level 1, 2, and 3) can take hours to complete. **We suggest starting from higher levels (or `short` as runtime) for fast iterations.** The default `runtime` is `medium`.
186
232
187
233
188
-
It is also recommended to turn on CPU boost before running this benchmark, otherwise it might yield very low result.
234
+
It is also recommended to turn on CPU boost before running this benchmark, otherwise it might yield very low results.
189
235
190
236
## Encoders
191
237
192
-
For now, this benchmark support three encoders -- `SVT-AV1`, `libaom`, and `x264` (`SVT-AV1` is the default one). To add more, please modify the `BENCHMARK CONFIG` section, adn the function `build_ffmpeg` in `./packages/video_transcode_bench/install_video_transcode_bench.sh`, as well as a new `build_encoder_name` function inside.
238
+
For now, this benchmark supports three encoders -- `SVT-AV1`, `libaom`, and `x264` (`SVT-AV1` is the default one). To add more, please modify the `BENCHMARK CONFIG` section and the function `build_ffmpeg` in `./packages/video_transcode_bench/install_video_transcode_bench.sh`, as well as a new `build_encoder_name` function inside.
193
239
194
240
## Datasets
195
241
196
-
For now, this benchmark support three videos -- `chimera`, `elfuente` and `elfuente_footmarket` (`chimera` is the default one in the scirpt). To add more, please modify the `BENCHMARK CONFIG` section and the `BUILD AND INSTALL` section in `./packages/video_transcode_bench/install_video_transcode_bench.sh`
242
+
For now, this benchmark supports three videos -- `chimera`, `elfuente` and `elfuente_footmarket` (`chimera` is the default one in the script). To add more, please modify the `BENCHMARK CONFIG` section and the `BUILD AND INSTALL` section in `./packages/video_transcode_bench/install_video_transcode_bench.sh`.
197
243
198
244
## Reporting and Measurement
199
245
200
-
After the ffmpeg benchmark finishing, benchpress will report the results in
246
+
After the ffmpeg benchmark finishes, benchpress will report the results in
201
247
JSON format like the following:
202
248
203
249
```
@@ -247,7 +293,7 @@ JSON format like the following:
247
293
The result report will include performance numbers of each encoding level (named `level12` and `level13`), as well as the h-mean of all levels, in the `metrics` section.
0 commit comments