[Live-devel] Problem with mpegts muxer

Ross Finlayson finlayson at live555.com
Tue Jan 14 07:08:42 PST 2014


> 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/20140114/e1ae4624/attachment.html>


More information about the live-devel mailing list