Add several output type

The legacy format is still supported since it is compitable with quite old versions
of ffmpeg.

Add two new formats: h264 and h264_overlay. They both require a recent version of ffmpeg.