Skip to content

Instantly share code, notes, and snippets.

@alexarje
Last active Jun 1, 2021
Embed
What would you like to do?
Convert MXF files to MP4 using FFmpeg
#!/bin/bash
# Script for converting MXF video files to different to other file formats.
for i in *.MXF; do
if [ -e "$i" ]; then
file=`basename "$i" .MXF`
# MP4 file with default settings + deinterlacing
ffmpeg -i "$i" -c:v libx264 -vf yadif "$file.mp4"
# Create AVI video file with MJPEG compression that works with QTM and Matlab
# ffmpeg -i "$i" -c:v mjpeg -q:v 3 -acodec pcm_s16le -ar 44100 "$name_conv.avi";
# Create uncompressed audio file
# ffmpeg -i "$i" -acodec pcm_s16le "$name_conv.wav";
# Create thumbnail from the first image in the video file
ffmpeg -i "$i" -vf "thumbnail" -frames:v 1 "$file.png"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment