Skip to content

Instantly share code, notes, and snippets.

@tuliren
Last active October 26, 2017 05:34
Show Gist options
  • Save tuliren/8c8396670c97dfb2e6c417e619d57721 to your computer and use it in GitHub Desktop.
Save tuliren/8c8396670c97dfb2e6c417e619d57721 to your computer and use it in GitHub Desktop.
Video conversion
#!/bin/bash
for file in *.mp4
do
new_file=`echo ${file} | cut -d"." -f1`
echo "Processing: ${new_file}.mp4 -> ${new_file}.gif"
ffmpeg -i ${new_file}.mp4 -s 600x400 -r 5 -f gif - | gifsicle --optimize=1 --delay=3 > ${new_file}.gif
done
#!/bin/bash
for file in *.mp4
do
new_file=`echo ${file} | cut -d"." -f1`
echo "Processing: ${new_file}.mp4 -> ${new_file}.mp3"
ffmpeg -i "${new_file}.mp4" -ab 128k "${new_file}.mp3"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment