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

Nicolas Julien nicolas.julien at cdvi.com
Sat Sep 26 05:01:35 PDT 2020


Hi,

Here is the command line :
openrtsp -b 400000 -u admin password -v -P 10 -O "rtsp://192.168.1.64:554/Streaming/Tracks/101"

And the DESCRIBE answer :

v=0
o=- 1601128359218639 1601128359218639 IN IP4 192.168.1.64
s=Media Presentation
e=NONE
b=AS:5100
t=0 0
a=control:rtsp://192.168.1.64:554/Streaming/Tracks/101/
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:5000
a=recvonly
a=x-dimensions:2560,1440
a=control:rtsp://192.168.1.64:554/Streaming/Tracks/101/trackID=1
a=rtpmap:96 H265/90000
a=fmtp:96 sprop-sps=Z00AMp2oCgAtabgICAoAAAMAAgAAAwBRCA==; sprop-pps=aO48gA==
m=audio 0 RTP/AVP 0
c=IN IP4 0.0.0.0
b=AS:50
a=recvonly
a=control:rtsp://192.168.1.64:554/Streaming/Tracks/101/trackID=2
a=rtpmap:0 PCMU/8000
a=Media_header:MEDIAINFO=494D4B48010200000400050010710110401F000000FA000000000000000000000000000000000000;
a=appversion:1.0


________________________________________
De : live-devel [live-devel-bounces at us.live555.com] de la part de Ross Finlayson [finlayson at live555.com]
Date d'envoi : vendredi 25 septembre 2020 19:20
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] Record a H265 stream from IP camera to file

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/


_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list