Ffmpeg How to Extract Audio from Mkv to Ogg

ffmpeg how to extract audio from mkv to ogg. My mkv file have 2 audio track. I use this command.

ffmpeg -i test.mkv -vn -acodec copy audio.ogg

It show error like this.

[ogg @ 00000186dcba1040] Unsupported codec id in stream 0
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
    Last message repeated 1 times

How to extract audio from mkv to ogg.

2

1 Answer

try

ffmpeg -y -v error -stats -i test.mkv -vn -map 0:a:0 -acodec copy audio1.ogg -map 0:a:1 -acodec copy audio2.ogg

if still not working remove -acodec copy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest