1

I have some videos recorded on a Sony PXW-X70 camera that I wish to convert to something else, possibly an .mkv file. What program or command line utility can I use to do this?

1

Looks like mxf containers usually hold mpeg2video which FFmpeg easily converts, although there are some variations on this codec theme. I illustrate one conversion method with a publicly available sample file:

First download this sample file:

wget http://www.freemxf.org/samples/freeMXF-mxf1.mxf

This converts easily enough with the latest FFmpeg:

ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mkv

And then all should be well :)

A few extra points:

  • If you are troubled by FFmpeg errors with the Repository FFmpeg get the latest version here:

    Compile FFmpeg on Ubuntu, Debian, or Mint
    https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

  • If you prefer a different container another good choice would be mp4:

    ffmpeg -i freeMXF-mxf1.mxf -c:v libx264 -preset slow -crf 22 output.mp4
    
  • And if you want to use the aged avi container something like the following should do the trick:

    ffmpeg -i freeMXF-mxf1.mxf \
           -c:v mpeg4 -q:v 2 -vtag XVID -max_muxing_queue_size 1024 \
           -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 \
           output.avi
    

References:

  • Thank you. I tried doing this with my video, but I got these two errors while the program converted: [h264 @ 0x2addce0] PPS changed between slices, [h264 @ 0x2addce0] decode_slice_header error. The resulting .mkv file did not have sound, and the lower half of the video was covered with a sort of green band. – L42 Nov 26 '16 at 11:12
  • @L42 Can you upload one of your sample mxf files for me to examine? – andrew.46 Nov 26 '16 at 21:08
  • 1
    @TokeFaurby I have added some details regarding this to my answer, avi is not such a good choice... – andrew.46 Jan 6 '18 at 20:48
  • 1
    @TokeFaurby Yes, exactly. Only issue is that with the command line I have suggested: H.264 sits uneasily in avi container, you would have to modify the command line a little... – andrew.46 Jan 7 '18 at 20:11
  • 1
    @TokeFaurby I have added an avi example :) – andrew.46 Jan 8 '18 at 6:08
-1

Apparently you can do it with ffmpeg sudo apt-get install ffmpeg

https://superuser.com/questions/559820/converting-from-mxf-to-mpeg-format-with-ffmpeg

  • Thank you. I tried that, but just got a lot of these errors: [mpeg @ 0x1e0c7a0] buffer underflow st=0 bufi=397420 size=400525 [mpeg @ 0x1e0c7a0] buffer underflow st=0 bufi=399461 size=400525. Do you know what I can do to make it work? – L42 Nov 25 '16 at 15:45
  • No, I'm sorry, I did not even know that format existed until I read your question – user186255 Nov 25 '16 at 16:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.