Ubuntu – Trying to convert MKV to MP4 with avconv, failing

.mp4avconvmkv

I am trying to convert an MKV file to MP4 to be compatible with my PS3. I am using:

avconv -i file.mkv -c copy file.mp4

It fails and I get the following error:

[mp4 @ 0x8a17c00] pts < dts in stream 0
av_interleaved_write_frame(): Invalid argument

The file is h264 video and ac3 audio.

Best Answer

I believe that

avconv -i file.mkv -c:v copy -c:a copy file.mp4

is the correct command. You need to specify the codec copy property for the streams you want to copy separately.