[Live-devel] MPEG-TS demuxer

Thomas Christensen tchristensen at nordija.com
Tue Aug 21 15:50:52 PDT 2007


Hi

It has been mentioned before on this mailling list that live555  
contains a demuxer for program stream and not for transport streams  
and I was wondering why. Has someone written such a demuxer and  
whishes to share if?

I would like to write a program that receives MPEG2-TS through  
multicast, decodes the video into a frame and then saves the image. I  
know that decoding the mpeg2 encoded frame can be done using  
libavcodec and that libavformat offers to convert the raw yuv frame  
into an image, however collecting MPEG2-TS packets requires some work.

My guess would be to implement the following:

MPEG2TransportParser - Should look for MPEG2-TS sync byte in the  
buffer and decode the header. It should locate and update an memory  
based version of the PAT and PMT mustly for debuggin purposes since I  
need to specify a filter_pid up front - since the MPEG2-TS stream can  
contain more than one Packetized Elementary Stream, this filter_pid  
should be used to filter out unwanted packets, leaving me with a  
complete PES with video and sound which I then pass to a new  
MPEG1and2PESParser. MPEG1and2PESParser, parses the PES header fields  
and collects the payload into a Program Stream before that is passed  
to MPEG1and2Demux?

Any input on this?

Thomas



More information about the live-devel mailing list