Skip to content

Instantly share code, notes, and snippets.

@franklinjavier
Last active August 29, 2015 13:56
Show Gist options
  • Save franklinjavier/9191448 to your computer and use it in GitHub Desktop.
Save franklinjavier/9191448 to your computer and use it in GitHub Desktop.
Convert video using avconv
#!/bin/bash
# ./convertvideo.sh file file
#
# Ex:
# ./convertvideo.sh mp4 webm
# ./convertvideo.sh video.avi video.mp4
ls *$1 \
| while read f
do
avconv -i "$f" -y -s 4cif -ab 96k -vb 600k -aspect "16:9" "converted/$(basename "${f%.*}").$2";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment