#!/bin/bash if [[ -z "$1" ]]; then echo "Usage: $0 " exit 1 fi echo "-> Encoding $1 to flash video format..." if [[ ! -f "$1" ]]; then echo "-E- Unable to find file to encode: $1" exit 1 fi # set output filename output=`echo $1 | sed -e 's/\..*$/\.flv/'` # first pass ffmpeg -y -i $1 -s 320x240 -pass 1 -acodec copy $output # second pass ffmpeg -y -i $1 -s 320x240 -pass 2 -acodec copy $output