Skip to content

Instantly share code, notes, and snippets.

@dphiffer
Created June 9, 2016 01:47
Show Gist options
  • Select an option

  • Save dphiffer/bae53d26bad64a70e99081436b517117 to your computer and use it in GitHub Desktop.

Select an option

Save dphiffer/bae53d26bad64a70e99081436b517117 to your computer and use it in GitHub Desktop.
Turn folders of .jpg files into .mp4 files
#!/bin/bash
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
for subdir in $dir/*/
do
date=`basename $subdir`
if [ ! -f "$dir/$date.mp4" ]
then
ffmpeg -framerate 30 -pattern_type glob -i "$subdir*.jpg" -c:v libx264 "$dir/$date.mp4"
fi
done
@dphiffer
Copy link
Author

dphiffer commented Jun 9, 2016

screen shot 2016-06-08 at 9 49 25 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment