[Live-devel] Inserting SPS/PPS repeatedly in TS file

Ross Finlayson finlayson at live555.com
Wed Nov 20 13:00:21 PST 2013


> ./openRTSP -v rtsp://192.168.1.214/axis-media/media.amp?streamprofile=Quality | ./testH264VideoToTransportStreamUDP
> 
> The issue I am encountering is that if, during the process of streaming, the client loses connection and then reconnects, it cannot decode the stream because it cannot see SPS/PPS.  I analyzed a saved TS file and I noticed that the SPS/PPS is only sent with the first IDR frame and then never again.  
> 
> So my question is what would be a way to have SPS/PPS NAL units repeated in the TS stream by the MPEG2TransportStreamFromESSource filter so that a UDP client (decoder) can resume decoding after intermittently disconnecting and reconnecting?

I suggest looking at how "openRTSP" outputs H.264 video data to a file.  In particular:
- See "testProgs/playCommon.cpp", line 830, and note the call to "subsession->fmtp_spropparametersets()".
- See also the implementation of the "H264VideoFileSink" class ("liveMedia/H264VideoFileSink.cpp", line 66), and note how it parses the 'sprop-parameter-string' into SPS/PPS NAL-units, by calling "parseSPropParameterSets()".

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/20131120/bd153dbe/attachment.html>


More information about the live-devel mailing list