videoffmpegcodecmkvvp8

Can MKV hold VP8 Opus combination, and how


I want to create a MKV file with video codec VP8 and audio codec opus

I tried the following command in ffmpeg:

ffmpeg -y -i ./INPUT.flv -threads 8  -aspect 16:9 -vcodec libvpx  -vb 2M -acodec libopus   -ac 2 OUTPUT.mkv  

I have installed libopus0 in my Ubuntu, but I am getting this error:

Duration: 00:07:53.30, start: 0.000000, bitrate: 541 kb/s
    Stream #0.0: Video: h264 (Main), yuv420p, 640x360, 410 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 131 kb/s
Unknown encoder 'libopus0'

What is the problem, and how can I correct this issue?


Solution

  • ffmpeg allows VP9/VP8 & Opus in Matroska (MKV/MKA). Example:

    ffmpeg -i input -c:v libvpx-vp9 -c:a libopus output.mkv