Last active
July 19, 2024 18:08
-
-
Save alexarje/dbc45c9f2ffeef2c8c1cbda98992cbc0 to your computer and use it in GitHub Desktop.
Convert MXF files to MP4 using FFmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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