[Live-devel] receiving MPEG2 TS stream

Ross Finlayson finlayson at live555.com
Wed Aug 9 12:44:29 PDT 2006


>I am  not able to correctly receive  MPEG2 TS stream   transmitted 
>by testMPEG2Transportstreamer.cpp demo test program.For receiving I 
>am using sessionState.source = MPEG1or2VideoRTPSource::createNew

That's the mistake.  The "MPEG1or2VideoRTPSource" class is for 
receiving MPEG Video *Elementary Stream* data - not Transport Stream 
data.

To receive a MPEG-2 Transport Stream over RTP, you must first create 
a "SimpleRTPSource", and then pass its output to a 
"MPEG2TransportStreamFramer".  For an example of this, see lines 722 
through 726 of "liveMedia/MediaSession.cpp".

(If you intend only to store the received data in a file, then you do 
not need to create the "MPEG2TransportStreamFramer".  If, however, 
you want to render the data (in a media player, e.g.), then you 
should create the "MPEG2TransportStreamFramer", so that correct 
timestamps are generated.)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list