Skip to content

Instantly share code, notes, and snippets.

@whoo
Created December 3, 2016 16:50
Show Gist options
  • Select an option

  • Save whoo/99de042f85fa7605cc7dbd2bd51a25e4 to your computer and use it in GitHub Desktop.

Select an option

Save whoo/99de042f85fa7605cc7dbd2bd51a25e4 to your computer and use it in GitHub Desktop.
#!/bin/bash
function Relink
{
x=1
for a in $OLDPWD/*JPG
do
c=$(printf %04d.jpg $x)
ln -s "$a" $c
x=$(($x+1))
done
}
TMP=$(mktemp -d)
cd $TMP
Relink
ffmpeg -start_number 1 -f image2 -r 5 -i '%04d.jpg' -f mp4 -vf scale=640:-1 dd.mp4
mv dd.mp4 $OLDPWD
@whoo

whoo commented Dec 3, 2016

Copy link
Copy Markdown
Author

Leave tempdir (with only symlink)

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