Huffyuff – for lossless encoding (eg. if you want to edit it further)
Container Formats
mp4
mkv – probably the one with most features; soft subs, chapters, linking through files, several video and audio streams possible
ogm/ogg – another open alternative
avi – old-school
Audio Codecs
Opus – This is the best audio codec to use for any application. It dynamically adjusts to the use case (use with voice vs music, low vs high bitrate, etc). Free license, no caveats and limitations.
(ogg) Vorbis – Free and open codec. Predecessor to Opus.
(LAME) mp3 – mp3 is the widest spread audio codec in use, but costs royalty money. It is not a free codec. LAME is a free encoder for the MP3 format.