[Live-devel] Problem with mpegts muxer

팜반푸 phuocpham at ssu.ac.kr
Wed Jan 15 21:16:53 PST 2014


Hi Ross,

Thank you for your response. I know how to use ServerMediaSession and ServerMediaSubsession to stream H.264 and AAC as separate RTP streams.
And I also know how to mux those two into a transport stream. But it seems that my problem happens with the last TS packets of each H.264 frame. I tried to increase 
MAX_INPUT_ES_FRAME_SIZE and it works on my PC for the testH264VideoToTransportStream.cpp case, but it does't work on my IP camera.
 


----------원본메세지---------- 
보낸사람: Ross Finlayson <finlayson at live555.com>
받는사람: LIVE555 Streaming Media - development & use <live-devel at ns.live555.com>
보낸날짜: 2014-01-15 00:08:42
제 목: Re: [Live-devel] Problem with mpegts muxer


I'm working on an embedded device, the IP network camera. I am using MPEG2TransportStreamFromESSource to mux H.264 and AAC into transport stream. I succedded the muxing. But at the client side, the bottom right corner always has some broken part as shown in the image of the link below. The broken part is shown in the red square of the image.
http://s1208.photobucket.com/user/phuocpham09t/media/mpegts.png.html


Do you have any ideas why?



No, unfortunately I don't.  However, why are you multiplexing your video and audio into a Transport Stream, and then transmitting the Transport Stream?  It is *much* more efficient (and robust) to stream the H.264 video and AAC audio separately, i.e., as separate RTP streams - without dealing with Transport Streams at all.


The way to do this is to create two different "ServerMediaSubsession"s (each one a subclass of "OnDemandServerMediaSubsession", assuming that your server is streaming unicast), and add each one to your server's "ServerMediaSession" (using two calls to "RTSPServer::addSubsession()").


One of your "ServerMediaSubsession" subclasses (for video) would create (in its "createNewRTPSink()" virtual function implementation) a "H264VideoRTPSink", fed from a "H264VideoStreamDiscreteFramer".  Your second "ServerMediaSubsession" subclass (for audio) would create (in its "createNewRTPSink()" virtual function implementation) a "MPEG4GenericRTPSink".  (See "ADTSAudioFileServerMediaSubsession.cpp" for an example of how to create a "MPEG4GenericRTPSink" for streaming AAC audio.)



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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140116/b91d3d43/attachment.html>


More information about the live-devel mailing list