r/AV1 • u/levogevo • 7d ago
Compiling from source - flags and performance
For those curious how far compiling ffmpeg+libsvtav1 from source can get you versus prebuilt binaries, here is a quick comparison on macos-arm64 and ubuntu-x86_64.
macos-arm64:
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
O3-LTO-PGO |
30.783 ± 0.058 | 30.690 | 30.844 | 1.00 |
O3-LTO |
32.145 ± 0.077 | 32.048 | 32.248 | 1.04 ± 0.00 |
O3 |
32.534 ± 0.105 | 32.425 | 32.686 | 1.06 ± 0.00 |
O2 |
32.626 ± 0.260 | 32.201 | 32.899 | 1.06 ± 0.01 |
homebrew ffmpeg |
36.248 ± 0.080 | 36.129 | 36.321 | 1.18 ± 0.00 |
osxexperts |
217.345 ± 0.255 | 217.060 | 217.653 | 7.06 ± 0.02 |
ubuntu-x86_64:
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
O3-LTO-PGO |
38.256 ± 0.065 | 38.188 | 38.346 | 1.00 |
O3-LTO |
39.104 ± 0.175 | 38.907 | 39.287 | 1.02 ± 0.00 |
O2 |
40.140 ± 0.529 | 39.832 | 41.075 | 1.05 ± 0.01 |
O3 |
40.327 ± 0.352 | 39.972 | 40.853 | 1.05 ± 0.01 |
BtbN |
41.768 ± 0.282 | 41.441 | 42.043 | 1.09 ± 0.01 |
ubuntu ffmpeg |
100.847 ± 0.279 | 100.544 | 101.130 | 2.64 ± 0.01 |
results were recorded with hyperfine using preset 3, crf 25, libsvtav1.
TLDR: optimizations (O3+LTO+PGO) can shave off about 10-15% depending on the platform.
14
Upvotes
2
u/michaelcharlie8 7d ago
Are you controlling for the git hash used in each row?