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

Umar Qureshey umar at janteq.com
Wed Nov 20 11:37:57 PST 2013


Hi,
I am streaming from H.264 Elementary Stream (ES) over RTP from an IP camera and creating a Transport Stream (TS) which I send over UDP.  I have modified "testH264VideoToTransportStream" to take input from 'stdin' and send to a UDP client (H.264 decoder) by replacing FileSink with BasicUDPSink.  Here is my command line:

./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?

Thanks.



More information about the live-devel mailing list