Created
July 22, 2019 09:14
-
-
Save sgnm/3e9e12b7e633d470383d0deedbff3a85 to your computer and use it in GitHub Desktop.
Convert mov files to png sequence
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
#!/bin/sh | |
INPUT_DIRECTORY_PATH=$1 | |
EXPORT_DIRECTORY_PATH=${INPUT_DIRECTORY_PATH}_png | |
PNG_CONFIG=%03d.png | |
if [ ! -d ${EXPORT_DIRECTORY_PATH} ]; then mkdir -p ${EXPORT_DIRECTORY_PATH}; fi | |
echo "exporting..." | |
for file in `\find ${INPUT_DIRECTORY_PATH} -maxdepth 1 -type f`; do | |
filePath="${file%.*}" | |
fileName=`basename ${filePath}` | |
exportFolderPath=$EXPORT_DIRECTORY_PATH/$fileName | |
if [ ! -d $exportFolderPath ]; then mkdir -p $exportFolderPath; fi | |
ffmpeg -i ${file} ${exportFolderPath}/${PNG_CONFIG} | |
done | |
echo "exported to ${EXPORT_DIRECTORY_PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment