I am trying to convert input.mp4 video to output.mkv using vp9 codec.
I have install development version of ffmpeg via: brew install ffmpeg --devel.
ffmpeg -i input.mp4 -vcodec vp9 output.mkvBut I am getting error: Unknown encoder 'vp9' even the vp9 is included: ffmpeg -codecs
2 Answers
The most basic command is:
ffmpeg -i input.mp4 -c:v libvpx-vp9 -c:a libopus output.webmSee FFmpeg Wiki: VP9 for more info.
3With my version of ffmpeg,
$ ffmpeg -version
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developersthe command looks like this
ffmpeg -y -i input.mkv -c:v libvpx-vp9 -b:v 2000k -pass 1 -an -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.webmi.e.
- leave out the experimental flags
- do a two pass encoding, because the first two seconds of the output are blurry otherwise. Doing a two pass encoding is also faster than single pass.
- when doing 2 pass, you do not need to encode the audio in the first pass as @FrankGalligan noted in a comment
Single pass is/was broken, according to
2