Ffmpeg

Batch convert all the avi files in a directory to mp4
(Assumes the files have no spaces in their names, but I have another script for that)

for i in *.avi; do ffmpeg -i "$i" "${i%%.*}.mp4" done
 * 1) !/bin/bash

(Same trick, mp4 to mpg)
for i in *.mp4; do ffmpeg -i "$i" "${i%%.*}.mpg" done
 * 1) !/bin/bash

Convert .avi video files to smaller .mp4 format
ffmpeg -i 'U2 - New Years Day.avi' 'U2 - New Years Day.mp4'

Convert GIFs from Twitter that download as MP4s back into uploadable GIFs again
ffmpeg -y -i input.mp4 -filter_complex "scale=320:-1:flags=lanczos[x];[x]split[x1][x2]; [x1]palettegen[p];[x2][p]paletteuse" output.gif

Convert frames from a video or GIF into individual numbered images
ffmpeg -i bones-kirk.mp4 frame_%d.jpg

Extract audio from any video file
ffmpeg -i Black-Sabbath-Iron-Man.vob Black-Sabbath-Iron-Man.mp3

Convert an MP4 to GIF
ffmpeg -i jO7IGJXWYAAXRL-B.mp4 physics.gif