[FFmpeg-user] VP8 encoding performances

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Sep 24 19:15:07 EEST 2020

Am Do., 24. Sept. 2020 um 17:13 Uhr schrieb Emmanuel Dreyfus <manu at netbsd.org>:
> Hello
> I am looking for ways to improve VP8 encoding performance. I work with 5
> mn long, 5 MB large MPEG4 test video. Here is the codec information from
> ffprobe
>   Duration: 00:05:08.20, start: 0.000000, bitrate: 150 kb/s
>     Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz,
> mono, fltp, 53 kb/s (default)
> (...)
>     Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 2256x1080, 94 kb/s, 25 fps, 25 tbr, 30k tbn, 60k tbc (default)
> The goal is to produce a webm/VP8 video for clients that cannot consume
> H264. I run this:
> ffmpeg -i test.mp4 -vf scale=-2:720 -movflags +faststart -preset
> ultrafast -f webm -c:v libvpx -b:v 1M -acodec libvorbis -y test.webm
> It works, although being extremely slow: it runs for an hour to encode 5
> mn of video. What improvement can be done here?
> I tried rebuilding with configure --arch that fits the CPU, it does not
> seems to help a lot.
> I wonder if GPU acceleration could help. I see there is some
> documentation about it on the Wiki, but there ie no buying advice. I
> have a 16 lane PCIe slot available, what card should I try to use here?
> Or perhaps the ffmpeg command line above has some room for improvement?
> Any other idea?
> Here are ffmpeg build informations:
> ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
>   built with gcc 7.4.0 (nb3 20190319)
>   configuration: --enable-avfilter --enable-avresample --enable-postproc
> --enable-rpath --disable-ffplay --enable-fontconfig --enable-libfreetype
> --enable-libass --enable-libaom --disable-htmlpages --enable-gnutls
> --disable-mbedtls --disable-libopencore-amrnb
> --disable-libopencore-amrwb --disable-openssl --disable-libjack
> --disable-libpulse --disable-libtesseract --enable-libtheora
> --enable-libvorbis --enable-libmp3lame --enable-libopus
> --enable-libspeex --enable-libxvid --enable-libx264 --enable-libx265
> --enable-vdpau --enable-vaapi --enable-libvpx --enable-libwebp
> --enable-libxcb --enable-libxcb-shape --enable-libxcb-shm
> --enable-libxcb-xfixes --enable-libbluray --disable-asm --arch=i386
> --cc=gcc --disable-debug --disable-optimizations --disable-stripping
> --enable-gpl --enable-libxml2 --enable-pthreads --enable-shared
> --mandir=/usr/pkg/man --prefix=/usr/pkg --progs-suffix=4
> --datadir=/usr/pkg/share/ffmpeg4 --docdir=/usr/pkg/share/doc/ffmpeg4
> --incdir=/usr/pkg/include/ffmpeg4 --libdir=/usr/pkg/lib/ffmpeg4
> --shlibdir=/usr/pkg/lib/ffmpeg4 --enable-runtime-cpudetect

While FFmpeg is not responsible for vp8 encoding performance,
I would still strongly recommend that you recompile or download
a saner binary: Yours is so massively broken that the decoding
speed is probably very slow.
I should add that a default configuration (without any options)
leads to nearly the highest possible speed.

(Disclaimer: vp8 encoding is typically slow but if libvpx is compiled
like FFmpeg above the speed can certainly be improved)

Carl Eugen

More information about the ffmpeg-user mailing list