Skip to content

Instantly share code, notes, and snippets.

@dacr
Created May 11, 2025 11:26
Show Gist options
  • Save dacr/c33bfc163943371d9b662e8be026d0e3 to your computer and use it in GitHub Desktop.
Save dacr/c33bfc163943371d9b662e8be026d0e3 to your computer and use it in GitHub Desktop.
Converts CANON 5D mark IV 4K mov files in the current directory to MP4 / published by https://github.com/dacr/code-examples-manager #2da6b78e-ae05-4460-853a-e4abf0e245dd/445232d64e8fb34e104dbc9037a8ad1ea9e49d4e
## summary : Converts CANON 5D mark IV 4K mov files in the current directory to MP4
## keywords : bash, ffmpeg, canon, 5DMarkIV, yuvj422p
## publish : gist
## authors : David Crosson
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
## id : 2da6b78e-ae05-4460-853a-e4abf0e245dd
## created-on : 2025-05-11T10:08:56+02:00
## managed-by : https://github.com/dacr/code-examples-manager
## run-with : sh $file
for INPUT in *.MOV; do
OUTPUT=$(basename "$INPUT" .MOV).mp4
echo "====================================================================="
echo "-- convert '$INPUT' to '$OUTPUT'"
echo "---------------------------------------------------------------------"
if [ ! -f "$OUTPUT" ]; then
ffmpeg \
-i "$INPUT" \
-c:v libx264 -c:a copy \
-vf format=yuv420p \
-movflags +faststart \
"$OUTPUT"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment