F55: Guide for UNWRAPPING MXF files with FFMPEG

Ralph B

Well-known member
Here's a guide for lossless unwrapping of F5/55 MXF files using the program ffmpeg.
These files will play directly in Premiere Pro CS 5, 5.5 and 6, and in other programs as well.
All this is done on a PC.

First, download ffmpeg:

http://ffmpeg.zeranoe.com/builds/

You'll be presented with several choices. Take the latest 32-bit Static build.
Download and unzip the file. You'll have a folder. Open it, and then open the folder 'bin'. Inside are 3 files. ffmpeg.exe is the one you want. Copy and paste it into the folder which contains your MXF files.

Now you're going to create the command file to perform the task. Open Notepad and paste this code into the blank document:

FOR %%a IN (*.mxf) DO (ffmpeg -y -i "%%a" -vcodec copy -acodec ac3 -ar 48000 -ac 2 -ab 448k "%%~na.ts")

Save the file. You can name it something like 'MXF unwrap'. Normally Notepad will assign a .txt file extension. Change it to .cmd

Place this file inside the folder with your MXF files.

Now you're ready to go. Double click the .cmd file and watch ffmpeg go to work.
It will process every MXF file in the folder. It unwraps the video (a bit for bit copy) and encodes the audio to AC3. This is necessary for full compatibility with existing software. The original PCM audio could cause problems if it was simply copied. However, at a bitrate of 448k, this is an extremely high quality encode of the audio. It's doubtful you'll be able to hear a difference between it and the original. Finally, it puts a TS file extension on the new file, and saves it in the same folder as the original.
 
Last edited:
Ralph have you ever tried FFmpeg with AVIsynth or even VirtualDub? It should be possible to play MXF files in Windows Media Player using AVIsynth and directshow.
 
Any other software or paid codecs we need to have installed to convert the F5/F55 MXF files using ffmpeg on Windows?

I followed Ralph's steps, but got audio only.

Here is the command line I've tried as well:
The last command line I tried was: ffmpeg\bin\ffmpeg i- video-file-1.MXF -map 0 -map -0:9:0 -c copy -c:v prores -profile:v 3 Z:\video-file-1.mov
 
Here's a guide for lossless unwrapping of F5/55 MXF files using the program ffmpeg.
These files will play directly in Premiere Pro CS 5, 5.5 and 6, and in other programs as well.

Those F55/5 MXF files already open natively in Premiere Pro CS6 and CS with no extra work-arounds and are as easy to work with as any other file. So why would I bother with ffmpeg? What am I missing here? Seems like this a solution for a problem that does not exist.
 
Ffmpeg can do far more than just unwrap. It can, for instance, resize and transcode to ProRes.

Cheers.
 
Again, what is the benefit? Why would I want to transode to proRes if I am editing in Premiere? I see nothing whatsoever to be gained except adding a bunch of extra hoops to the workflow and inflating the file sizes.
BTW, the OP said nothing about transcoding to ProRes, anyway. He was suggesting a workflow for unwrapping the MXF. So I repeat my question, what is the benefit of that?
 
"These files will play directly in Premiere Pro CS 5, 5.5 and 6, and in other programs as well".

Not everyone has the latest version of Premiere. In addition, many use ffmpeg for its incredibly powerful image processing capability.

I use it. If you don't want to use it, don't.

If anyone has been able to process Sony raw files with ffmpeg or dcraw, I'm all ears.

Cheers.
 
There are many uses for ffmpeg... I would think you could even run it on your smart phone, if you needed to quickly transcode a few files on the fly. Just another handy tool to keep in the toolbox.

Are there any other good command files for quickly transcoding to various formats, similar to Ralph's first post?
 
Just to be clear, I'm sure ffmpeg has many positive things to offer for certain applications -- my original question was just directed at the questionable role it would play in a Premiere CS6 or Creative Cloud workflow. So far, I have not heard any answers to that question. I sincerely want to know if there is something I have overlooked.

As someone who teaches XDCAM workshops and produces training videos on the subject, it is threads like this that, if left unchallenged, would lead some people to the incorrect conclusion that Sony's MXF files require rewrapping or transcoding with Premiere. They do not -- and I can't understand why anyone would want to over complicate the workflow by doing so. I deal with questions about this all the time so it is a bit of sore spot with me. :-)
 
Back
Top