Created
May 11, 2025 11:26
-
-
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
This file contains hidden or 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
## 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