[mythtv] DVBCam Class

Ian Caulfield imc25 at cam.ac.uk
Wed Sep 22 06:36:10 EDT 2004


On Tue, 21 Sep 2004, Ed Wildgoose wrote:

>
>> There also may be some people on the list that can clarify what the true 
>> difference betwen a PS
>> and a TS is and keep me from reading the MPEG specs.  If not i'll figure 
>> it out because it didnt
>> look to difficult from a quick skim of the MPEG specs.
>> 
>
> TS is just mpeg broken up into something like 80 byte packets.  Each packet 
> starts with a unique code (for sync), and you basically just read each set of 
> 80 bytes and reassemble (I forget now if it's 80 bytes or 90 bytes, but you 
> get the basic idea).  Each packet has a pid and you can figure out the stream 
> from that.  You presumably understand the way the pid is described in the TS 
> stream already.

188 bytes (including 4-byte header)

> So it's quite easy to turn a TS into a PS, and vice versa, the difference is 
> really down to it being presumably easier to pack in more stuff into a TS, 
> whereas I'm not quite sure how multiple audio is handled in the PS..? 
> Just to really rock your boat there is also PES which is PS with some extra 
> info... I can dig out some docs with the details when I next get a chance, 
> but have a browse through the DVB mailing list where I and others have asked 
> this question and got good answers.

A PES is a single stream of audio or video or eg subtitles. PS and TS are 
methods of transporting more than one stream.

A PS is designed to hold a single program - DVDs and most .mpg files are 
PS generally. A PS is just all the packets from the component streams 
multiplexed together, with some extra headers containing some metadata. 
Multiple audio is handled by having several audio PES's with different 
stream id's.

A TS is designed to transport streams from several programs - each PES is 
transmitted in a separate PID, and then tables are used to provide the 
metadata describing how it's all disassembled into multiple programs 
again.

Generally PS format is recommended for file storage on reliable media - I 
think the overhead is smaller (don't need a 4-byte header every 184 bytes) 
and more programs will play PS...

Ian



More information about the mythtv-dev mailing list