This is a simple script I’m using to convert the videos I take on my Canon S90 for posting online using a flash player.
#!/bin/bash# Convert videos from Canon S90 to flash-playable streaming formatfor file in "$@"do filename=$(basename $file) filename=${filename%.*} # Convert the audio stream to AAC ffmpeg -i $file -vcodec copy -acodec libfaac temp_vid.mp4 # Move the H.264 MOOV atom to the beginning of the file for progressive streaming qt-faststart temp_vid.mp4 $filename.mp4 rm temp_vid.mp4 # Create a screenshot ffmpeg -i $filename.mp4 -f image2 -vframes 1 $filename.jpgdone