3 This chapter provides a short primer on video files, formats and
4 codecs – because it is often cause for confusion:
8 A video file is a <dfn>container</dfn>. It usually contains one
9 <dfn>video track</dfn>, one or more <dfn>audio tracks</dfn>, and possibly <dfn>
10 subtitle</dfn> tracks, <dfn>chapters</dfn>…
11 The way these tracks are stored in the file is defined by the
12 <dfn>file format</dfn>. Common formats are
13 avi, mov, ogg, mkv, mpeg, mpeg-ts, mp4, flv, or vob.
16 Each of the tracks by itself is encoded using a <abbr
17 title="Coder-Decoder"><dfn>Codec</dfn></abbr>. Common video codecs
18 are h264, mpeg2, mpeg4, theora, mjpeg, wmv3. Common audio codecs are
19 mp2, mp3, dts, aac, wav/pcm.
22 Not all codecs can be packed into a given format. For example the
23 mpeg format is limited to mpeg2, mpeg4 and mp3 codecs (not entirely true).
24 DVDs do have stringent limitations as well. The opposite would be .avi:
25 pretty much every audio/video codec combination can be contained in an avi
29 To make things worse, naming conventions for video codecs and formats are
30 often identical (especially MPEG ones) which leads to confusion.
31 All in all it is a very wide and deep field. Suffice there are different
32 uses for different codecs and formats.
35 <h2>Ardour specific issues</h2>
37 Ardour supports a wide variety of video file formats codecs. More
38 specifically, Ardour itself actually does not support any video at all
39 but delegates handling of video files to <a
40 href="http://ffmpeg.org/">ffmpeg</a>, which supports over 350 different
41 video codecs and more than 250 file formats.
44 When importing a video into Ardour, it will be <dfn>transcoded</dfn>
45 (changed from one format and codec to another) to avi/mjpeg for internal
46 use (this allows reliable seeking to frames at low CPU cost—the
47 file size will increase, but hard disks are large and fast).
50 The export dialog includes presets for common format and codec
51 combinations (such as DVD, web-video,..). If in doubt, one of the
52 presets should be used.
55 As a last note: every time a video is transcoded, the quality can only get
56 worse. Hence for the final mastering/<abbr
57 title="Multiplexing Audio and Video">muxing</abbr> process, one should
58 always go back and use the original source of the video.