Marinaio
Marinaio

Reputation: 111

Using ffmpeg to convert MXF fails

I have an MXF video

I googled syntax to convert to mov and ran it in Mobaxterm on Win10.

"/drives/c/Program Files (x86)/ffmpeg/bin/ffmpeg.exe" -i Clip0001.MXF -c:v libx264 -c:a aac -ab 384k -sn -strict -2 output.mov

I view it in VideoLan and it looks great.

I load it into Magix Movie Studio 15 and audio is fine, but video is green!

ffmpeg output.mov....shows me:

Stream #0:0(eng): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], 4530 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)

Even this does not work:

ffmpeg.exe -i Clip0001.MXF output.mov

Any suggestions on converting this?

Edit1:

Here is what it looks like in the editor: enter image description here

Edit2: Try this and it works, but quality is terrible.

ffmpeg.exe" -i Clip0001.MXF -c:v mpeg4 -c:a aac -ab 384k -sn -strict -2 output.mov

Upvotes: 0

Views: 3010

Answers (1)

Gyan
Gyan

Reputation: 92928

FFmpeg isn't failing; many video editors usually have limited-capability H264 decoders.

Your input has 4:2:2 chroma subsampling and ffmpeg will preserve that when it can. Here, it can and does. However, your video editor can only deal with 4:2:0 subsampled H264 streams.

So, use

ffmpeg.exe -i Clip0001.MXF -pix_fmt yuv420p -c:v libx264 -c:a aac -b:a 384k -sn output.mov

If this command throws an error for the AAC encoder due to the missing -strict -2, your ffmpeg is very old (> 3 years). You should upgrade.

Upvotes: 3

Related Questions