Quick notes/cheatsheet for ffmpeg
To encode a video with theora video and vorbis audio use the command:
ffmpeg -y -i /tmp/RickRoll.avi -vcodec libtheora -b 1000k -acodec libvorbis -ab 128k -pass 1 /tmp/rick_roll.ogv
ffmpeg -y -i /tmp/RickRoll.avi -vcodec libtheora -b 1000k -acodec libvorbis -ab 128k -pass 2 /tmp/rick_roll.ogv
To encode a webm (vp8 video/vortbis audio) file use:
ffmpeg -y -i /tmp/RickRoll.avi -vcodec libvpx -b 1000k -acodec libvorbis -ab 128k -pass 1 /tmp/rick_roll.webm
ffmpeg -y -i /tmp/RickRoll.avi -vcodec libvpx -b 1000k -acodec libvorbis -ab 128k -pass 2 /tmp/rick_roll.webm
To encode to mpeg4 with mp3 audio:
ffmpeg -y -i /tmp/RickRoll.avi -vcodec mpeg4 -b 1000k -acodec libmp3lame -ab 128k -pass 1 /tmp/rick_roll.mp4
ffmpeg -y -i /tmp/RickRoll.avi -vcodec mpeg4 -b 1000k -acodec libmp3lame -ab 128k -pass 2 /tmp/rick_roll.mp4
To encode to h264 with AC3 audio:
ffmpeg -y -i /tmp/hangover2-tlr2_h720p.mov -vcodec libx264 -b 2000k -vpre slow_firstpass -acodec ac3 -ab 256k -pass 1 /tmp/hangover_trailer.mp4
ffmpeg -y -i /tmp/hangover2-tlr2_h720p.mov -vcodec libx264 -b 2000k -vpre slow_firstpass -acodec ac3 -ab 256k -pass 2 /tmp/hangover_trailer.mp4
Some notes were stolen/borrowed from errtheblog.com
Update: Here is another great set of commands for ffmpeg.