[Live-devel] testRTSPClient / H.264 Network Camera Stream

Markus Schumann markuss at sonicfoundry.com
Fri Apr 26 13:02:40 PDT 2013


I decode H.264 from a network camera.

My decoder wants SPS/PPS once before the first I-frame in band delivered.
So I wait until I get the first I-frame and then insert 0x0000001/SPS/0x0000001/PPS before the I-frame.
Interestingly - one of the cameras I test with sends SPS/PPS inside the RTP stream - I drop those SPS/PPSs.

But you are right - it's decoder dependent.

Markus.

From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Jeremiah Morrill
Sent: Friday, April 26, 2013 2:23 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] testRTSPClient / H.264 Network Camera Stream

After you parse the nal records from parseSPropParameterSets, store them.

For each sample that comes through, construct the buffer you send to your upstream decoder like this:

Where start_code is 4 bytes 0x00, 0x00, 0x00, 0x01

[start_code][NAL_record_1][start_code][NAL_record_2][start_code][sample_data]

There may be some more correct way, but this has worked for me.  Also some h264 decoders are different in how they except NAL units, so you may want to check with the documentation.

-Jer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130426/450a785c/attachment-0001.html>


More information about the live-devel mailing list