1
Lossless / Other Codecs / Re: Tested: Lossless decoding speed, multithreaded - and fast verification
Last post by Porcus -With quite extreme settings - including a malicious blocksize 16.
Turns out ffmpeg refused to remux the uncompressed flac streams into any of the three containers I tried.
Container overhead
* flac -5 is a sane setting, and the biggest overhead for that one was 0.44 percent (not percentage points) for OGG container
* Blocksize 16 is just nuts, but for what the file sizes are worth - .wav in the middle. No padding:
323 001 659 ¨3x.flac-8b16.flac
328 733 400 ¨3x.flac-8b16.flac.oga
331 702 604 ¨3x.wav
343 738 725 ¨3x.flac-8b16.flac.mp4
354 113 911 ¨3x.flac-8b16.flac.mka
9.6 percent penalty for putting it in Matroska. I used ffmpeg, comments like ffmpeg -i ¨3x.flac-8b16.flac -acodec copy -vn -sn ¨3x.flac-8b16.flac.mka
This time I tried a shorter file - half an hour - because there were so many to run through.
For sorting I moved the ".oga" etc. to a separate column. ¨3x.flac-5.flac <tab> .oga means the file is an OGG containered ¨3x.flac-5.flac.oga . (The reason for the "¨" is to make sure the test audio files had a character nothing else had.)
Threads | decoder | settings on encoding | container | speed x realtime | comment |
1 | flac.exe | ¨3x.flac-0b65535--no-md5--uncompressed.flac | 500 | ||
1 | ffmpeg | ¨3x.flac-0b65535--no-md5--uncompressed.flac | 8791 | That is extreme! | |
7 | ffmpeg | ¨3x.flac-0b65535--no-md5--uncompressed.flac | 8685 | ||
1 | flac.exe | ¨3x.flac-0b65535--no-md5.flac | 527 | ||
1 | ffmpeg | ¨3x.flac-0b65535--no-md5.flac | 1474 | about same for containers | |
7 | ffmpeg | ¨3x.flac-0b65535--no-md5.flac | 3544 | slower than containers | |
7 | ffmpeg | ¨3x.flac-0b65535--no-md5.flac | .oga | 4919 | |
7 | ffmpeg | ¨3x.flac-0b65535--no-md5.flac | .mp4 | 6013 | mp4 very fast |
7 | ffmpeg | ¨3x.flac-0b65535--no-md5.flac | .mka | 5932 | |
1 | flac.exe | ¨3x.flac-0r0--no-md5.flac | 518 | ||
1 | ffmpeg | ¨3x.flac-0r0--no-md5.flac | 1049 | about same for containers | |
7 | ffmpeg | ¨3x.flac-0r0--no-md5.flac | 1869 | containers are only slightly faster. | |
7 | ffmpeg | ¨3x.flac-0r0--no-md5.flac | .oga | 1879 | |
7 | ffmpeg | ¨3x.flac-0r0--no-md5.flac | .mp4 | 1918 | |
7 | ffmpeg | ¨3x.flac-0r0--no-md5.flac | .mka | 1924 | Not that much faster |
1 | flac.exe | ¨3x.flac-5.flac | 518 | ||
1 | ffmpeg | ¨3x.flac-5.flac | 966 | about same for containers | |
7 | ffmpeg | ¨3x.flac-5.flac | 2981 | ||
7 | ffmpeg | ¨3x.flac-5.flac | .oga | 3600 | noticeably faster in all containers |
7 | ffmpeg | ¨3x.flac-5.flac | .mp4 | 3827 | |
7 | ffmpeg | ¨3x.flac-5.flac | .mka | 3854 | |
1 | flac.exe | ¨3x.flac-8b16.flac | 247 | ||
1 | ffmpeg | ¨3x.flac-8b16.flac | 80 | about as slow for containers | |
7 | ffmpeg | ¨3x.flac-8b16.flac | 31 | Even slower! And about as slow for containers | |
1 | ffmpeg | ¨3x.flac-8pr8--lax-l32.flac | 669 | about the same for containers. Forgot to run flac.exe on this one. | |
7 | ffmpeg | ¨3x.flac-8pr8--lax-l32.flac | 2493 | ||
7 | ffmpeg | ¨3x.flac-8pr8--lax-l32.flac | .oga | 2599 | |
7 | ffmpeg | ¨3x.flac-8pr8--lax-l32.flac | .mp4 | 2631 | |
7 | ffmpeg | ¨3x.flac-8pr8--lax-l32.flac | .mka | 2642 |
So table does not list speed for ffmpeg without -threads, nor for the following:
* the same entire thing ran on USB3-connected spinning drive. Differences were just very minor. These figures are on internal SSD.
* reference flac.exe decoding -8pr8 --lax -l32 because human error
* ogg/mp4/mkv decoded with ffmpeg -threads 1, those were pretty much the same as .flac speeds
* same for the -8b16 in containers, those were just as horrible as .flac
Yes blocksize 16 decodes slow, but ffmpeg just does it terribly.
All ffmpeg had a "-hide_banner -loglevel error" but I don't know if that matters when hyperfine doesn't display it.
I also went the other way with a bigger file, 219 minutes. No fancy table formatting here, I just paste hyperfine output. No containers tested that time. Fastest decoding took 1.054 seconds, and then:
Code: [Select]
Summary
ffmpeg -i ¨219min.flac-0b65535--no-md5--uncompressed.flac -hide_banner -loglevel error -f wav -y NUL ran
1.02 ± 0.02 times faster than ffmpeg -threads 1 -i ¨219min.flac-0b65535--no-md5--uncompressed.flac -hide_banner -loglevel error -f wav -y NUL
1.04 ± 0.02 times faster than ffmpeg -threads 7 -i ¨219min.flac-0b65535--no-md5--uncompressed.flac -hide_banner -loglevel error -f wav -y NUL
2.80 ± 0.04 times faster than ffmpeg -threads 7 -i ¨219min.flac-0b65535--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
2.83 ± 0.16 times faster than ffmpeg -i ¨219min.flac-0b65535--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
4.07 ± 0.06 times faster than ffmpeg -i ¨219min.flac-7--lax-l32.flac -hide_banner -loglevel error -f wav -y NUL
4.19 ± 0.08 times faster than ffmpeg -threads 7 -i ¨219min.flac-7--lax-l32.flac -hide_banner -loglevel error -f wav -y NUL
6.09 ± 0.08 times faster than .\wvunpack --threads=7 ¨219min.wv.-fx0.wv -z0qyo -o - > NUL
6.26 ± 0.09 times faster than ffmpeg -threads 7 -i ¨219min.flac-0r0--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
6.33 ± 0.18 times faster than ffmpeg -i ¨219min.flac-0r0--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
6.58 ± 0.15 times faster than ffmpeg -i ¨219min.wv.-fx0.wv -hide_banner -loglevel error -f wav -y NUL
6.86 ± 0.12 times faster than ffmpeg -threads 7 -i ¨219min.wv.-fx0.wv -hide_banner -loglevel error -f wav -y NUL
7.21 ± 0.09 times faster than .\wvunpack --threads=7 ¨219min.wv.-gx1--blocksize=4096.wv -z0qyo -o - > NUL
7.42 ± 0.10 times faster than .\wvunpack --threads=7 ¨219min.wv.-gx1.wv -z0qyo -o - > NUL
7.99 ± 0.11 times faster than ffmpeg -threads 1 -i ¨219min.flac-0b65535--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
8.37 ± 0.25 times faster than ffmpeg -i ¨219min.wv.-gx1.wv -hide_banner -loglevel error -f wav -y NUL
8.58 ± 0.15 times faster than .\wvunpack --threads=4 ¨219min.wv.-fx0.wv -z0qyo -o - > NUL
8.71 ± 0.12 times faster than ffmpeg -threads 7 -i ¨219min.wv.-gx1.wv -hide_banner -loglevel error -f wav -y NUL
8.78 ± 0.16 times faster than ffmpeg -i ¨219min.wv.-gx1--blocksize=4096.wv -hide_banner -loglevel error -f wav -y NUL
9.34 ± 0.14 times faster than ffmpeg -threads 7 -i ¨219min.wv.-gx1--blocksize=4096.wv -hide_banner -loglevel error -f wav -y NUL
9.93 ± 0.49 times faster than .\wvunpack --threads=4 ¨219min.wv.-gx1--blocksize=4096.wv -z0qyo -o - > NUL
10.18 ± 0.13 times faster than .\wvunpack --threads=7 ¨219min.wv.-hx2.wv -z0qyo -o - > NUL
10.46 ± 0.21 times faster than .\wvunpack --threads=4 ¨219min.wv.-gx1.wv -z0qyo -o - > NUL
11.34 ± 0.15 times faster than ffmpeg -threads 1 -i ¨219min.flac-0r0--no-md5.flac -hide_banner -loglevel error -f wav -y NUL
11.50 ± 0.16 times faster than ffmpeg -i ¨219min.wv.-hx2.wv -hide_banner -loglevel error -f wav -y NUL
12.21 ± 0.16 times faster than ffmpeg -threads 7 -i ¨219min.wv.-hx2.wv -hide_banner -loglevel error -f wav -y NUL
12.99 ± 0.17 times faster than .\wvunpack --threads=7 ¨219min.wv.-hhx3.wv -z0qyo -o - > NUL
14.02 ± 0.19 times faster than .\wvunpack --threads=4 ¨219min.wv.-hx2.wv -z0qyo -o - > NUL
14.68 ± 0.19 times faster than ffmpeg -i ¨219min.wv.-hhx4--blocksize=131072.wv -hide_banner -loglevel error -f wav -y NUL
15.45 ± 0.21 times faster than ffmpeg -i ¨219min.wv.-hhx3.wv -hide_banner -loglevel error -f wav -y NUL
15.53 ± 0.21 times faster than ffmpeg -threads 7 -i ¨219min.wv.-hhx4--blocksize=131072.wv -hide_banner -loglevel error -f wav -y NUL
16.35 ± 0.22 times faster than ffmpeg -threads 7 -i ¨219min.wv.-hhx3.wv -hide_banner -loglevel error -f wav -y NUL
16.53 ± 0.22 times faster than ffmpeg -threads 1 -i ¨219min.flac-7--lax-l32.flac -hide_banner -loglevel error -f wav -y NUL
17.87 ± 0.24 times faster than .\wvunpack --threads=4 ¨219min.wv.-hhx3.wv -z0qyo -o - > NUL
19.32 ± 0.27 times faster than .\wvunpack --threads=7 ¨219min.wv.-hhx4--blocksize=131072.wv -z0qyo -o - > NUL
20.56 ± 0.27 times faster than .\wvunpack ¨219min.wv.-fx0.wv -z0qyo -o - > NUL
23.03 ± 0.31 times faster than .\flac ¨219min.flac-0b65535--no-md5.flac -fo NUL
23.53 ± 0.31 times faster than .\flac ¨219min.flac-0r0--no-md5.flac -fo NUL
24.39 ± 0.54 times faster than .\flac ¨219min.flac-0b65535--no-md5--uncompressed.flac -fo NUL
25.68 ± 0.34 times faster than .\flac ¨219min.flac-7--lax-l32.flac -fo NUL
25.74 ± 0.34 times faster than .\wvunpack ¨219min.wv.-gx1.wv -z0qyo -o - > NUL
25.98 ± 0.34 times faster than .\wvunpack ¨219min.wv.-gx1--blocksize=4096.wv -z0qyo -o - > NUL
27.86 ± 0.37 times faster than ffmpeg -threads 1 -i ¨219min.wv.-fx0.wv -hide_banner -loglevel error -f wav -y NUL
28.06 ± 0.37 times faster than .\wvunpack --threads=4 ¨219min.wv.-hhx4--blocksize=131072.wv -z0qyo -o - > NUL
33.95 ± 0.45 times faster than .\wvunpack ¨219min.wv.-hx2.wv -z0qyo -o - > NUL
36.93 ± 0.50 times faster than ffmpeg -threads 1 -i ¨219min.wv.-gx1.wv -hide_banner -loglevel error -f wav -y NUL
40.31 ± 0.63 times faster than ffmpeg -threads 1 -i ¨219min.wv.-gx1--blocksize=4096.wv -hide_banner -loglevel error -f wav -y NUL
42.66 ± 0.56 times faster than .\wvunpack ¨219min.wv.-hhx4--blocksize=131072.wv -z0qyo -o - > NUL
43.94 ± 0.58 times faster than .\wvunpack ¨219min.wv.-hhx3.wv -z0qyo -o - > NUL
49.46 ± 0.66 times faster than .\flac ¨219min.flac-8b16.flac -fo NUL
52.08 ± 0.72 times faster than ffmpeg -threads 1 -i ¨219min.wv.-hx2.wv -hide_banner -loglevel error -f wav -y NUL
65.43 ± 0.86 times faster than ffmpeg -threads 1 -i ¨219min.wv.-hhx4--blocksize=131072.wv -hide_banner -loglevel error -f wav -y NUL
69.96 ± 1.06 times faster than ffmpeg -threads 1 -i ¨219min.wv.-hhx3.wv -hide_banner -loglevel error -f wav -y NUL
177.26 ± 2.49 times faster than ffmpeg -threads 1 -i ¨219min.flac-8b16.flac -hide_banner -loglevel error -f wav -y NUL
427.60 ± 5.75 times faster than ffmpeg -threads 7 -i ¨219min.flac-8b16.flac -hide_banner -loglevel error -f wav -y NUL
430.33 ± 7.03 times faster than ffmpeg -i ¨219min.flac-8b16.flac -hide_banner -loglevel error -f wav -y NUL