FFmpeg

FFmpeg is an open source software project whose main purpose is to convert video and audio formats. It also supports some still image formats. It includes:
 * libavformat, a library for reading and writing "container" formats and other file formats
 * libavcodec, a library of video and audio codecs
 * ffmpeg, a command line format conversion utility
 * ffplay, a simple media player

Examples
The  utility has many options. In simplest form, to convert example.fli to example.mkv: $ ffmpeg -i example.fli example.mkv

FFmpeg considers some file formats to be "formats", and others to be "codecs". You may need to use the  or   option to select the input and/or output format. To list the formats supported by your copy of FFmpeg: $ ffmpeg -formats $ ffmpeg -codecs

Libav
There is a fork of FFmpeg, confusingly named Libav. It is said to be more focused on quality, while FFmpeg is more focused on features.