Last active
July 12, 2019 17:00
-
-
Save machiq/ab0993420a582c2212b204ebb2ac519e to your computer and use it in GitHub Desktop.
Convert Movie Files into PNG Sequence
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 | |
# | |
# 2019-07-12 - Matt Crnich - v001 - Turn Movies into PNG Sequence | |
# | |
echo "ENTER SEARCH PATH : " | |
read srcFilePath | |
echo | |
echo "ENTER SEARCH EXTENSION : " | |
read fileExt | |
echo | |
for input in `find "$srcFilePath" -name "*.$fileExt" -print0 | xargs -0`; | |
do fullPath="$srcFilePath/${input##*/}"; | |
#echo "fullPath = "$fullpath; | |
# | |
# Make New Directory matching name of input file | |
# | |
mkdir -p ${fullPath%.*}; | |
# | |
assetName=${fullPath##*/} assetName=${assetName%.*}; | |
# echo "assetName = "$assetName; | |
# | |
pathPref=${fullPath%/*}; | |
# echo "pathPref = "$pathPref; | |
# | |
output="${pathPref}/${assetName}/${assetName}.%04d.png"; | |
# echo "output = "$output; | |
# | |
ffmpeg -i "$input" -vf scale=1920:-1:flags=bilinear "$output"; | |
done | |
echo | |
echo "CONVERSION COMPLETE" | |
echo | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment