Skip to content

Instantly share code, notes, and snippets.

@sunny
Created December 5, 2011 12:12
Show Gist options
  • Save sunny/1433400 to your computer and use it in GitHub Desktop.
Save sunny/1433400 to your computer and use it in GitHub Desktop.
Video to flv via ffmpeg
#!/bin/sh
# to-flv source.wav 400x300 4:3 [sortie.flv]
set -e
[ "$3" == "" ] && echo "Usage: $0 source.wmv 400x300 4:3 [sortie.flv]" && exit
export=$4
[ "$export" == "" ] && export="$1.flv"
[ -f "$export" ] && echo "Le fichier $export existe déjà" && exit
ffmpeg -i "$1" -s "$2" -aspect "$3" -r 30000/1001 -b 360k -bt 416k -vcodec libx264 -pass 1 -an "$export"
ffmpeg -y -i "$1" -s "$2" -aspect "$3" -r 30000/1001 -b 360k -bt 416k -vcodec libx264 -pass 2 -acodec libfaac -ac 2 -ar 44100 -ab 64k "$export"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment