[Live-devel] Streaming h264 MPEG-2 TS

Ross Finlayson finlayson at live555.com
Mon Sep 13 17:38:47 PDT 2010


>Sorry, my conclusion was much too general (and wrong). I will try to describe
>the problem better:
>
>The system is required to support multiple unicast streams of the same
>live/recorded video ( resuseFirstSource = True).

OK, that's a significant piece of information.  See below.


>I managed to use the "MPEG2TransportStreamFromESSource" class in order to
>multiplex the video in MPEG-2 ts, and used  "testOnDemandRTSPServer" to stream
>to a vlc client.
>>From the second connection on,vlc complains about "Waiting for PPS/SPS unit".

OK, now I know what your problem is.  The H.264 Video Elementary 
Stream data that you are using for input contains PPS/SPS NAL units - 
but apparently they occur only at the start of the stream.  Because 
you are using the same input stream for all clients (i.e., 
"reuseFirstSource = True"), only the first client will get to see 
these PPS/SPS NAL units.

Therefore you will need to modify your H.264 Video Elementary Stream 
so that it repeats the PPS/SPS NAL units periodically (e.g., every 10 
seconds).  (These NAL units are usually very small, so there will be 
little overhead in doing this.)


>  >From the mailing list I learnt that using "sprop_parameter_sets_str"
>of "H264VideoRTPSink::createNew()" is intended for use to provide the client
>with the correct PPS and SPS NAL units.
>However, If I understand correctly, no object of the 
>"H264VideoRTPSink" is used
>when streaming an MPEG-2 Transport Stream.

That's correct.  When streaming a MPEG Transport Stream via RTP, a 
"SimpleRTPSink" object is used.
-- 

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


More information about the live-devel mailing list