Difference between revisions of "MPEG"
(→Muxers) |
(Added examples for MPEG-1 and MPEG-4 video, and added a link to the Codec page.) |
||
Line 1: | Line 1: | ||
{{wikipedia|MPEG}} | {{wikipedia|MPEG}} | ||
− | MPEG refers to a set of standards created by the [http://www.chiariglione.org/mpeg/ Moving Picture Experts Group]. MPEG refers to several video, audio and [[container]] formats. | + | MPEG refers to a set of standards created by the [http://www.chiariglione.org/mpeg/ Moving Picture Experts Group]. MPEG refers to several video, audio and [[container]] formats; see the full list at the [[Codec]] page. |
− | An MPEG file is a file using an MPEG container (these are called ''ts'' | + | An MPEG file is a file using an MPEG container (these are called ''mpeg1'', ''ts'', ''ps'', and ''mp4'' for MPEG-4). |
Line 8: | Line 8: | ||
To make an MPEG file, you need to: | To make an MPEG file, you need to: | ||
* Pick a container (see [[#Muxers|below]]) | * Pick a container (see [[#Muxers|below]]) | ||
− | * Transcode the audio and video to formats able to be held in the container: in general this is the MPEG video and audio formats only. Check the [http://www.videolan.org/streaming/features.html compatibility information] in the official documentation | + | * Transcode the audio and video to formats able to be held in the container: in general this is the MPEG video and audio formats only. Check the [http://www.videolan.org/streaming/features.html compatibility information] in the official documentation, but be warned that while vlc allows any codec and mux, most other players support only a few combinations! |
− | |||
− | |||
− | |||
− | |||
− | |||
== MPEG-1 and 2 == | == MPEG-1 and 2 == | ||
Line 21: | Line 16: | ||
* Video codec: '''mp1v''', '''mp2v''' | * Video codec: '''mp1v''', '''mp2v''' | ||
* Audio codec: '''mpga''', '''mp2a''', '''mp3''' | * Audio codec: '''mpga''', '''mp2a''', '''mp3''' | ||
− | * Muxer: '''ts''', '''ps''' | + | * Muxer: '''ts''', '''ps''', '''mpeg1''' |
MPEG-1 is a video and audio compression format, used in [[Video CD]]s. It is compatible with a large number of software and hardware devices. | MPEG-1 is a video and audio compression format, used in [[Video CD]]s. It is compatible with a large number of software and hardware devices. | ||
− | MPEG-2 is used in digital television and [[DVB]]. It is also used as the format for [[DVD]]s. | + | Here is an example of how to transcode an AVI into a portable MPEG-1 video from the [[command prompt]] |
+ | <blockquote> | ||
+ | vlc ''file.avi'' --sout='#transcode{vcodec=mp1v, acodec=mpga}:std{access=file, mux=mpeg1,url=''file.mpg''}' | ||
+ | </blockquote> | ||
+ | |||
+ | MPEG-2 is used in digital television and [[DVB]]. It is also used as the format for [[DVD]]s. The biggest advantage of this format over MPEG-1 is in its support for interlaced pictures; MPEG-2 can cleanly compress interlaced video, while MPEG-1 internally only works on progressive-scan video, so interlacing must be faked. | ||
+ | |||
+ | Here is an example of how to transcode an AVI into an MPEG-2 video from the [[command prompt]] | ||
+ | <blockquote> | ||
+ | vlc ''file.avi'' --sout='#transcode{vcodec=mp2v, acodec=mpga}:std{access=file, mux=ps,url=''file.mpg''}' | ||
+ | </blockquote> | ||
=== MPEG-1 Audio === | === MPEG-1 Audio === | ||
Line 43: | Line 48: | ||
{{wikipedia|MPEG-3}} | {{wikipedia|MPEG-3}} | ||
A largely unused audio and video compression format. | A largely unused audio and video compression format. | ||
− | * Note that [[MP3]] | + | * Note that the amazingly common [[MP3]] audio files are actually '''MPEG-1 Layer 3''' audio, not MPEG-3. |
== MPEG-4 == | == MPEG-4 == | ||
Line 50: | Line 55: | ||
* Audio codec: '''mp4a''' ('''m4a''') - this is [[AAC]]. | * Audio codec: '''mp4a''' ('''m4a''') - this is [[AAC]]. | ||
* Muxer: '''mp4''' | * Muxer: '''mp4''' | ||
− | MPEG-4 is a flexible audio and video compression format. The format describes audio and video compression, with a container format for streaming across networks and saving to disk. It also contains optional extra features, including [[DRM]] and [[subtitles]]. These extra features are only included in software if needed. | + | MPEG-4 is a flexible audio and video compression format. The format describes audio and video compression, with a container format for streaming across networks and saving to disk. It also contains optional extra features, including [[DRM]] and [[subtitles]]. These extra features are only included in software if needed. MPEG-4 can provide better quality than MPEG-2 at low bitrates. |
+ | |||
+ | Here is an example of how to transcode an AVI into an MPEG-4 video from the [[command prompt]] | ||
+ | <blockquote> | ||
+ | vlc ''file.avi'' --sout='#transcode{vcodec=mp4v, acodec=mpga}:std{access=file, mux=mp4,url=''file.m4v''}' | ||
+ | </blockquote> |
Revision as of 09:37, 9 December 2006
MPEG refers to a set of standards created by the Moving Picture Experts Group. MPEG refers to several video, audio and container formats; see the full list at the Codec page.
An MPEG file is a file using an MPEG container (these are called mpeg1, ts, ps, and mp4 for MPEG-4).
Contents
Creating an MPEG File with VLC
To make an MPEG file, you need to:
- Pick a container (see below)
- Transcode the audio and video to formats able to be held in the container: in general this is the MPEG video and audio formats only. Check the compatibility information in the official documentation, but be warned that while vlc allows any codec and mux, most other players support only a few combinations!
MPEG-1 and 2
- Video codec: mp1v, mp2v
- Audio codec: mpga, mp2a, mp3
- Muxer: ts, ps, mpeg1
MPEG-1 is a video and audio compression format, used in Video CDs. It is compatible with a large number of software and hardware devices.
Here is an example of how to transcode an AVI into a portable MPEG-1 video from the command prompt
vlc file.avi --sout='#transcode{vcodec=mp1v, acodec=mpga}:std{access=file, mux=mpeg1,url=file.mpg}'
MPEG-2 is used in digital television and DVB. It is also used as the format for DVDs. The biggest advantage of this format over MPEG-1 is in its support for interlaced pictures; MPEG-2 can cleanly compress interlaced video, while MPEG-1 internally only works on progressive-scan video, so interlacing must be faked.
Here is an example of how to transcode an AVI into an MPEG-2 video from the command prompt
vlc file.avi --sout='#transcode{vcodec=mp2v, acodec=mpga}:std{access=file, mux=ps,url=file.mpg}'
MPEG-1 Audio
MPEG-1 also contains several audio compression formats:
- mpga is MP1 or MPEG-1 (Part 3) Layer 1
- mp2a is MP2 or MPEG-1 (Part 3) Layer 2
- mp3 is MP3 or MPEG-1 (Part 3) Layer 3
Muxers
MPEG-2 specified 2 container formats, ts and ps. Containers hold video and audio information in them, and package them up so it can be sent over a network or stored on disk.
- ts (Transport Stream) should be used to store or send data where data loss will probably occur, such as over a network.
- ps (Program Stream) should be used to store or send data where data loss is not likely, such as on a DVD.
Both ps and ts can transport MPEG-4 Video, but only ts can send MPEG-4 Audio. In addition, MPEG-4 specifies it's own muxer, mp4 (see below)
MPEG-3
A largely unused audio and video compression format.
- Note that the amazingly common MP3 audio files are actually MPEG-1 Layer 3 audio, not MPEG-3.
MPEG-4
- Video codec: mp4v (m4v)
- Audio codec: mp4a (m4a) - this is AAC.
- Muxer: mp4
MPEG-4 is a flexible audio and video compression format. The format describes audio and video compression, with a container format for streaming across networks and saving to disk. It also contains optional extra features, including DRM and subtitles. These extra features are only included in software if needed. MPEG-4 can provide better quality than MPEG-2 at low bitrates.
Here is an example of how to transcode an AVI into an MPEG-4 video from the command prompt
vlc file.avi --sout='#transcode{vcodec=mp4v, acodec=mpga}:std{access=file, mux=mp4,url=file.m4v}'