[Live-devel] Record a H265 stream from IP camera to file

Ross Finlayson finlayson at live555.com
Fri Sep 25 10:20:38 PDT 2020


No, there’s no bug in “openRTSP”.  It is simply copying the H.264 (or H.265) NAL units that it receives over the network, prepending each NAL unit with  a 0x00 0x00 0x00 0x01 ’start code’, and (here’s the important part) prepending the file with SPS, PPS, and (for H.265 only) VPS NAL units, that it gets by parsing the "sprop-parameter-sets” parameter in the stream’s SDP description (that it got in the result of the RTSP “DESCRIBE” command.

In your case, the file is prepended with (what appear to be) valid H.264 (*not* H.265) SPS and PPS NAL units, but there’s no H.265 VPS NAL unit.

In other words, your RTSP server (camera?) is apparently advertising that it’s stream is H.265, but its "sprop-parameter-sets” parameter (that it sends in the SDP that forms the result of the RTSP “DESCRIBE” command) contains H.264 SPS and PPS NAL units, *not* H.265 SPS, PPS, and VPS NAL units.

Or alternatively, your stream is really H.264, not H.265, in which case you should have renamed your video output file to have a “.h264” filename suffix, not “.h265”.

(To confirm this, you could send us the result of the RTSP “DESCRIBE” command, as shown by “openRTSP”.)


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




More information about the live-devel mailing list