Skip to content

Instantly share code, notes, and snippets.

@allanesquina
Forked from franklinjavier/convertvideo.sh
Last active August 29, 2015 14:13
Show Gist options
  • Save allanesquina/256cfac4aad7cec2b7e0 to your computer and use it in GitHub Desktop.
Save allanesquina/256cfac4aad7cec2b7e0 to your computer and use it in GitHub Desktop.
Convert video using avconv
#!/bin/bash
# ./convertvideo.sh Directory filetype
#
# Ex:
# ./convertvideo.sh /videos mp4
ls *$1 \
| while read f
do
avconv -i "$1/$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