Last active
April 20, 2020 21:41
-
-
Save willvincent/11ed9f06fd766a975fd6 to your computer and use it in GitHub Desktop.
Batch transcode a directory of video files to another directory, with your desired codecs and whatnot
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 | |
# These paths should either be relative to the current directory | |
# or full system paths. | |
SOURCE_PATH="Camera_Original" | |
DEST_PATH="Prores" | |
# wildcard for files to process | |
FILES="*.MXF" | |
# Prores 'flavor' | |
# 0 = 422 Proxy | |
# 1 = 422 LT | |
# 2 = 422 Normal | |
# 3 = 422 HQ | |
FLAVOR=1 | |
# FFmpeg arguments/options | |
FFMPEG_OPT="-vcodec prores -profile:v ${FLAVOR} -acodec pcm_s16le" | |
# Container wrapper format (file extension, mov, avi, etc) | |
WRAPPER="mov" | |
# Verbosity level: quiet, panic, fatal, error, warning, info, verbose | |
VERBOSITY="warning" | |
###################################################################### | |
## DO NOT CHANGE BELOW THIS LINE | |
###################################################################### | |
clear | |
for FILE in $SOURCE_PATH/$FILES | |
do | |
FILENAME=$(basename "$FILE") | |
CURRENT="${FILENAME%%.*}" | |
echo "Processing $CURRENT..." | |
ffmpeg -i $FILE $FFMPEG_OPT -v $VERBOSITY $DEST_PATH/$CURRENT.$WRAPPER | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice