Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We're trying to convert .mxf video to .mpeg on ffmpeg-0.9.2 and looks like 0.9.2 version doesn't support .mxf conversion to .mpeg.

We don't want to switch on latest 0.11 version of ffmpeg as the video result is too poor for latest version. Maybe we're not using the right command to convert .mxf format.

Below is the error on conversion command:

[root@localhost ~]# ffmpeg -i test.mxf  -ac 2 output.mpg                                                                                     ffmpeg version 0.9.2-syslint, Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar  1 2013 22:34:33 with gcc 4.6.3
  configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
  libavutil    51. 32. 0 / 51. 54.100
  libavcodec   53. 42. 4 / 53. 42. 4
  libavformat  53. 24. 2 / 53. 24. 2
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 77.100
  libswscale    2.  1. 0 /  2.  1.100
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mxf, from `test.mxf`:
  Duration: 00:00:07.04, start: 0.000000, bitrate: 62580 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p, 720x608 [SAR 608:405 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s
File `output.mpg` already exists. Overwrite ? [y/N] y
Incompatible pixel format `yuv422p` for codec `mpeg1video`, auto-selecting format `yuv420p`
[buffer @ 0x8476e0] w:720 h:608 pixfmt:yuv422p tb:1/1000000 sar:608/405 sws_param:
[buffersink @ 0x847b80] auto-inserting filter `auto-inserted scaler 0` between the filter `src` and the filter `out`
[scale @ 0x848220] w:720 h:608 fmt:yuv422p sar:608/405 -> w:720 h:608 fmt:yuv420p sar:608/405 flags:0x4
[mpeg @ 0x84a7a0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to `output.mpg`:
    encoder         : Lavf53.24.2
    Stream #0:0: Video: mpeg1video, yuv420p, 720x608 [SAR 608:405 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: mp2, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> mpeg1video)
  Stream #0:1 -> #0:1 (pcm_s16le -> mp2)
Press [q] to stop, [?] for help
[buffer @ 0x8476e0] Changing frame properties on the fly is not supported.
Failed to inject frame into filter network
share|improve this question
Latest FFmpeg is 1.1.3, not 0.11. I just checked: The MXF demuxer was added in version 0.5, so I'm sure 0.9.2 should also support it. –  slhck Mar 2 '13 at 9:27
add comment

migrated from stackoverflow.com Mar 2 '13 at 14:04

This question came from our site for professional and enthusiast programmers.

1 Answer

Are you sure you want MPEG-1 video? Your command re-encodes the video to a standard that was released in 1993. I wouldn't be surprised if the quality is not as good as you're expecting it.

Your source file contains MPEG-2 video and PCM audio, so ideally you'd just merge this into an MPEG-2 container instead:

ffmpeg -i in.mxf -c copy out.mpg

This doesnt re-encode both audio and video, so you won't lose quality in the process.

Other than that, MXF demuxing should be fully supported in FFmpeg since version 0.5. If you still get errors while transcoding, and you want to transcode instead of just copying the streams, please try downloading a recent static build for your operating system from the FFmpeg homepage.

This would re-encode the video to MPEG-2, with a variable quality of 2 (sane values are 2–5, range from 1–31, and lower meaning better):

ffmpeg -i in.mxf -c:v mpeg2video -qscale:v 2 -c:a mp2 -b:a 128k out.mpg

You can of course also use constant bitrate encoding:

ffmpeg -i in.mxf -c:v mpeg2video -b:v 2M -c:a mp2 -b:a 128k out.mpg
share|improve this answer
add comment

protected by Journeyman Geek Oct 17 '13 at 8:30

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?