[Live-devel] RTSP server on live555 start send client on I-Frame (h264)

Худаев Илья hudaev at domination.one
Wed Feb 28 00:20:23 PST 2024


Everything in the SDP description is correct, and the client works correctly. There are no problems with this.
I wanted to know if it was possible, for example, to store each new GOP, so that when a client connects, first transfer it to it and then the rest of the data.

Can define its own implementation H264VideoRTPSink or elsewhere.

I connected to several real IP cameras and saw that the first packages that I received were NAL units with SPS, PPS and I-frame. I don’t know for sure whether it waits for the encoder for this data and only then starts sending it, or whether it always stores this data somewhere in order to send it first (although this option may create artifacts on the first frames). But I would like to implement something like this if possible

E-mail: hudaev at domination.one



-----Original Message-----
From: live-devel <live-devel-bounces at us.live555.com> On Behalf Of Ross Finlayson
Sent: Wednesday, February 28, 2024 12:39 PM
To: LIVE555 Streaming Media - development & use <live-devel at us.live555.com>
Subject: Re: [Live-devel] RTSP server on live555 start send client on I-Frame (h264)

> How can I make the new client start receiving data from the last GOP (SPS, PPS and I-FRAME)?

You can’t do this if you ever want to have more than one client playing/receiving the stream concurrently, otherwise your server would need to (somehow) arrange to send different data, at different times, to each concurrent client.  Instead, your server currently sends the same data - at the same time - to each client, which is much simpler to implement.

But you should not need to do this, because each client - when it connects to the server using a RTSP “DESCRIBE” command - should receive in return a SDP description that contains a "sprop-parameter-sets=“ attribute.  This attribute encodees the SPS and PPS NAL units, which should give the client enough information to decode the stream (at least, after the arrival of the next ‘key frame’), even if the SPS and PPS NAL units do not appear in the stream.


> I took most of the code from here Live555: X264 Stream Live source based on "testOnDemandRTSPServer".

Note that this is not our code (although it’s modeled after some of our code), so we don’t support it.  But note that the “checkForAuxSDPLine1()” code in your server is intended to read through the input video source - when the server starts up - until it sees a SPS and PPL NAL unit.  Once it sees this, the server code should save this, so that it can include it in the SDP description that it returns in response to each RTSP “DESCRIBE” command.

I suggest first using our “openRTSP” command-line client; see
	http://live555.com/openRTSP/
to receive your stream, to make sure that the SDP description contains a "sprop-parameter-sets=“ attribute.   If so, your server should be working correctly, and clients should be able to use this information to help decode the stream.


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