Recently I wanted to try out the Webm codecs VP8 and VP9 but when I ran ffmpeg
to encode a H.264 MP4 file into one of the other two codecs, I realized that the encoding is (by almost an order of magnitude) slower.
A 1080p30 video from H.264 to VP9 at 3 MBit/s is being encoded at around 6-7 fps while the same video encodes at around 40 fps to H.264. I used the libvpx-vp9
codec in ffmpeg
for the VP9 format. I am getting the same results for VP8 and Theora too.
Can someone explain to me why VP9 is so much slower? I tried a different machine which gave me similar resullts using Handbrake.
Best Answer
libvpx-vp9
is a much slower encoder thanlibx264
but the default settings of threads in ffmpeg (0=auto) is not effective for libvpx. Manually setting it gives a speed bump. e.g.On a 4-core machine, when encoding a 1080-30p H.264 stream, I get a bump from
3.8 fps
to10 fps
.