Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert a folder of MXF files to one MP4 file with FFmpeg
# Script for converting a folder of MXF video files to different to a single MP4 file.
# Alexander Refsum Jensenius, RITMO, University of Oslo
# v0.1 2019-11-03
# Find and move all MXF files to the "root" (where the script is run from)
find . -name "*.MXF" -exec mv {} . ";"
# Create list of files to be used for concatenation
printf "file '%s'\n" ./*.MXF > mylist.txt
# Concatenate files
# Using a standard MP4 compression and yadif for deinterlacing
ffmpeg -f concat -safe 0 -i mylist.txt -c:v libx264 -vf yadif output.mp4
# Create thumbnail of the video
ffmpeg -i "$i" -vf "thumbnail" -frames:v 1 "output.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment