FS#62445 - [ffmpeg] Build against dav1d for faster AV1 decoding
Attached to Project:
Arch Linux
Opened by Link Mauve (linkmauve) - Tuesday, 23 April 2019, 11:27 GMT
Last edited by Maxime Gauduin (Alucryd) - Tuesday, 17 September 2019, 17:00 GMT
Opened by Link Mauve (linkmauve) - Tuesday, 23 April 2019, 11:27 GMT
Last edited by Maxime Gauduin (Alucryd) - Tuesday, 17 September 2019, 17:00 GMT
|
Details
Description:
ffmpeg is currently built with --enable-libaom, to let it decode and encode AV1 videos. It is pretty slow at decoding though, so ffmpeg added --enable-libdav1d to use the much faster dav1d decoder, see http://www.jbkempf.com/blog/post/2019/dav1d-shifts-up-a-gear-0.2-is-out%21 for benchmarks, as it basically makes the difference between playable 1080p and unplayable 1080p. Additional info: * package version(s) ffmpeg 1:4.1.3-1 aom 1.0.0-1 dav1d 0.2.1-1 * config and/or log files etc. N/A * link to upstream bug report, if any N/A Steps to reproduce: youtube-dl -f 399+251 https://youtu.be/k2qgadSvNyU ffplay *k2qgadSvNyU*.mkv Notice how it is jaggy and uses a lot of CPU with aom, and smooth with dav1d. |
This task depends upon
Closed by Maxime Gauduin (Alucryd)
Tuesday, 17 September 2019, 17:00 GMT
Reason for closing: Implemented
Additional comments about closing: 1:4.2.1-2
Tuesday, 17 September 2019, 17:00 GMT
Reason for closing: Implemented
Additional comments about closing: 1:4.2.1-2
mpv --vd=libdav1d
or with libaom
mpv --vd-lavc-threads=1
Archlinux libaom library is unusable in practice.
!!! No multithread support !!! Only ONE thread !!!
ffmpeg -benchmark -c:v libaom-av1 -threads 1 -i input.av1 -f null null
Compared to the git version, it is about ~2.5x slower in decoding and ~8x in encoding (not including multi-threading, in reality they are many times worse). Crap.
What can it be used for? Anyone who wants to encode AV1 will compile the libaom git version + ffmpeg in 2 minutes.
Edit:
The default AV1 decoder used by ffmpeg should be faster.
It is currently dav1d (compared to aom-git significantly, compared to aom-1.0.0.errata1-1 extremely).
avcodec/allcodecs: make libdav1d the preferred AV1 decoder
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/dc0806dd25882f41f6085c8356712f95fded56c7