We have a bunch of Canon XF105 at RITMO, a camera that records MXF files. This is not a particularly useful file format (unless for further processing). Since many of our recordings are just for documentation purposes, we often see the need to convert to MP4. Here I present two solutions for converting MXF files to MP4, both as individual files and a combined file from a folder. These are shell scripts based on the handy FFmpeg.
Convert individual MXF files to individual MP4 files
The first solution is based on converting a bunch of MXF files to individual MP4 files. This is practical if there are multiple, single shots.
Save the script above as mxf2mp4.sh, make it executable, with a command like:
chmod u+x mxf2mp4.sh
and run the file:
./mxf2mp4.sh
Convert a folder of MXF files to one MP4 file
The second solution is when we have made one long recording, which is split into individual MXF files of 1.9 GB size (the maximum size of FAT32-formatted drives) in the camera. Then the aim is to merge all of these to one MP4 file. This script will do the trick:
Do the same as above to run the script.