Difference between revisions of "MPEG"

From VideoLAN Wiki
Jump to navigation Jump to search
(Replaced content with 'Penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis ...')
Line 1: Line 1:
{{wikipedia|MPEG}}
+
Penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis
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 ''mpeg1'', ''ts'', ''ps'', and ''mp4'' for MPEG-4).
 
 
 
 
 
== Creating an MPEG File with VLC ==
 
To make an MPEG file, you need to:
 
* Pick a container (see [[#Container_formats|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, but be warned that while vlc allows any codec and mux, most other players support only a few combinations!
 
 
 
== MPEG-1 and 2 ==
 
{{wikipedia|MPEG-1}}
 
{{wikipedia|MPEG-2}}
 
 
 
* 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.
 
 
 
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>
 
 
 
=== Video ===
 
{{codec video|id=mp1v}}
 
{{codec video|id=mp2v|altid=mpgv}}
 
Codecs for MPEG-1 and MPEG-2 Video
 
 
 
=== Audio ===
 
{{codec audio|id=mpga|info=MP2 audio.}}
 
{{codec audio|id=mp3|info=[[MP3]] audio.}}
 
Codecs for MPEG Layer 1/2 audio and MPEG Layer 3 audio.
 
 
 
=== Container formats ===
 
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 container format, '''mp4''' (see [[MPEG-4]])
 
 
 
==== TS ====
 
{{mux|id=ts|encoder=y}}
 
 
 
===== Module options =====
 
* --ts-extra-pmt ([[string]])
 
*: Extra PMT. Allows a user to specify an extra pmt (pmt_pid=pid:stream_type[,...]).
 
* --ts-es-id-pid" ([[boolean]])
 
Set the internal ID of each elementary stream handled by VLC to the same value as the PID in the TS stream, instead of 1, 2, 3, etc. Useful to do '#duplicate{..., select="es=<pid>"}'."). Default is true.
 
* --ts-out ([[string]])
 
*: Fast [[UDP]] streaming. Sends TS to specific ip:port by udp (you must know what you are doing). Default off.
 
* --ts-out-mtu ([[integer]])
 
*: MTU for out mode. Default 1500.
 
* --ts-csa-ck ([[string]])
 
*: Control word for the CSA encryption algorithm.
 
* --ts-csa-pkt ([[integer]])
 
*: Default: 188
 
* --ts-silent ([[boolean]])
 
*: Supresses complaints for encrypted PES. Default false.
 
* --ts-dump-file (file name)
 
*: A filename do dump ts into.
 
* --ts-dump-append ([[boolean]])
 
*: Append data to the dump file. Default is false, which overwrites the file.
 
* --ts-dump-size ([[integer]])
 
*: The size of the buffer for reading/writing an integer number of packets. Default: 16384 bytes.
 
 
 
===== Accepted video codecs =====
 
* [[mpgv]]: MPEG-1 or MPEG-2 video
 
* [[mp4v]]: MPEG 4 video
 
* [[h264]]
 
* [[jpeg]]
 
* [[ms]]: MS codecs (nonstandard?)
 
 
 
===== Accepted audio codecs =====
 
* [[MP1]], [[MP2]], [[MP3]]
 
* [[mp4a]]: MPEG-4 Audio (MP4)
 
* [[a52]]
 
* [[lpcm]]
 
* [[dts]]
 
 
 
===== Accepted subtitle codecs =====
 
* [[spu]]
 
* [[subt]]
 
* [[telx]]
 
 
 
==== PS ====
 
{{mux|id=ps|encoder=y}}
 
 
 
===== Module options =====
 
* --ps-trust-timestamps ([[boolean]])
 
*: Turns on or off trusting the timestamps in the file. Set as false to work it out from the [[bitrate]]s. Default true.
 
 
 
===== Accepted video codecs =====
 
* [[mpgv]]: MPEG-1 or MPEG2
 
* [[mp4v]]: MPEG-4
 
 
 
===== Accepted audio codecs =====
 
* [[mpga]]: MP1, MP2 or MP3
 
* [[mp4a]]: MPEG-4 (MP4)
 
* [[dts]]
 
* [[a52]]
 
* [[lpcm]]
 
===== Accepted subtitle codecs =====
 
* [[spu]]
 
* [[ogt]]
 
* [[cvd]]
 
 
 
{{clear}}
 
 
 
== MPEG-3 ==
 
{{wikipedia|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.
 
{{clear}}
 
 
 
== MPEG-4 ==
 
''See '''[[MPEG-4]]'''.''
 
 
 
 
 
== Source code ==
 
{{file|modules/mux/mp4.c|output muxer}}
 
{{file|modules/demux/ps.c|input demuxer}}
 
{{file|modules/demux/ts.c|input demuxer}}
 
{{file|modules/demux/ps.h|input demuxer}}
 

Revision as of 02:07, 12 January 2010

Penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis penis