Last active
February 24, 2020 02:37
-
-
Save jhburns/ade6c893d933924f2ed5c5d868c8469c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
while read -rep "Enter input path location: " in_dir; do | |
if [ -d "${in_dir}" ]; then | |
echo "${in_dir} already exists - please enter a valid directory path." | |
else | |
break | |
fi | |
done | |
eval cd "$in_dir" | |
while read -rep "Enter output path location: " out_dir; do | |
if [ -d "${out_dir}" ]; then | |
echo "${out_dir} already exists - please enter a valid directory path." | |
else | |
break | |
fi | |
done | |
videos=( $(find . -name "*.MOV" -print | sort) ) | |
for video in "${videos[@]}" | |
do | |
mkdir -p "${out_dir}/${video##*/}" | |
done | |
printf '%s\n' "${videos[@]}" | parallel -j 8 "ffmpeg -i {} -qscale:v 5 -vsync 0 -hide_banner -loglevel panic ${out_dir}/{/}/%d.jpg && echo {} done " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment