So I am trying to convert a really long video from MKV to MP4. I tried this command first which is supposed to be the fastest way to convert mkv to mp4
ffmpeg -i "vid.mkv" -codec copy -map 0 "MP4/vid.mp4"
however I am getting this error everytime I run it
[mp4 @ 0x7fffe98ae500] track 1: codec frame size is not set
[mp4 @ 0x7fffe98ae500] opus in MP4 support is experimental, add '-strict -2' if you want to use it.
Could not write header for output file #0 (incorrect codec parameters ?): Experimental feature
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 times
What am I doing wrong?
With Movavi Video Converter, you can transfer MKV to MP4 without losing quality using the revolutionary SuperSpeed mode. The program supports batch processing that makes conversion even faster. You can also use this smart software to convert MP4 to MKV.
CloudConvert converts your video files online. Amongst many others, we support MP4, WEBM and AVI. You can use the options to control video resolution, quality and file size.
The issue and solution is mentioned in the 2nd line of the excerpt you pasted.
You're using an older version of ffmpeg. Since recently, Opus audio in MP4 is no longer treated as experimental. Upgrade to ffmpeg 4.3 or add -strict -2
as mentioned in log.
For compatibility sake, you'll usually want to transcode audio to AAC.
ffmpeg -i "vid.mkv" -map 0 -c copy -c:a aac "MP4/vid.mp4"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With