Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to ask if ffmpeg supports VP9 encoding, and if not: how can I encode VP9 videos? I try using the command:

./ffmpeg-vp9 -y -i /home/mc/test.mkv -t 00:00:30 -c:v libvpx-vp9 -strict -2 -quality good -b:v 600k -speed 16 -rc_lookahead 25 -pass 1 2.webm

but it shows an error in splitting the command appeared (for vp9). This is the output of ffmpeg -codecs | grep vpx:

 ./ffmpeg -codecs|grep vpx
ffmpeg version N-51352-g81e85bc Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 27 2013 19:22:53 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 22.101 / 52. 22.101
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
 DEV.L. vp8                  On2 VP8 (decoders: vp8 libvpx ) (encoders: libvpx )

I tried to use vpxenc but i don't know the meaning of its parameters exactly.

Thanks in advance.

share|improve this question

migrated from stackoverflow.com May 21 '13 at 0:12

This question came from our site for professional and enthusiast programmers.

2  
out of curiosity, why on earth vp9? :-) –  Fredrik Pihl May 20 '13 at 20:18

3 Answers 3

up vote 5 down vote accepted

Basically ffmpeg supports VP9 encoding and decoding. It looks like your build of libvpx doesn't support VP9. For VP9 support you must use the experimental branch:

$ git clone -b experimental http://git.chromium.org/webm/libvpx.git
$ cd libvpx
$ ./configure --enable-vp9 --enable-shared
$ make && make install

This should enable VP9 for ffmpeg, which you have to compile as usual, with the --enable-libvpx configuration option.

share|improve this answer
1  
Thank you for your answer, but i want to ask you if the process of encoding is too long?? –  Computer_Engineer May 26 '13 at 9:06
    
@slhck: I want to ask you please, i tried to write ./ffmpeg -vp9 -y -i 2.mp4 -t 00:00:30 -c:v libvpx-vp9 -strict -2 -quality good -b:v 600k -speed 16 -rc_lookahead 25 -an -f matroska 2.vp9 . But when i run it an error appeared : can't open input file. Why this error appeared??Please –  Computer_Engineer May 26 '13 at 12:51
    
@Computer_Engineer -vp9 is not a valid ffmpeg option. Also, -f matroska forces a Matroska container while you use a .vp9 extension. You should use .webm instead and remove the -f matroska. Running ffmpeg -i input.mp4 -c:v libvpx-vp9 … output.webm (including the remaining options) should do the trick. –  slhck May 26 '13 at 12:52
    
@slhck: The error was displayed as :Could not find option 'vp9' in any of the FFmpeg subsystems (codec, format, scaler, resampler contexts) Unrecognized option 'vp9'. Error splitting the argument list: Option not found.....Please i want an answer..Thank you very much for your response. –  Computer_Engineer May 26 '13 at 13:02
    
The could not find option 'vp9' means it couldn't find the -vp9 option which doesn't exist as slhck previously stated. –  curtlee2002 Aug 19 '13 at 23:52

FFMPEG does support VP9 as long as the linked libvpx was compiled with VP9 enabled. But, the encoding is horrendously slow, even for a short 1080p clip would take forever to finish.

share|improve this answer

Regarding OP's comment about speed. Use two pass encoding. It is significantly faster than single pass and also the image quality is noticeably better.

With my version of ffmpeg,

$ ffmpeg -version
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers

the command I am using is

ffmpeg -y -i input.mkv -c:v libvpx-vp9 -b:v 2000k -pass 1 -c:a opus -b:a 64k -f webm /dev/null
ffmpeg    -i input.mkv -c:v libvpx-vp9 -b:v 2000k -pass 2 -c:a opus -b:a 64k -f webm output.webm

Single pass is/was broken, according to http://wiki.webmproject.org/vp9/known-issues

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.