[Live-devel] Fwd: H.264 PPS/SPS for the second client

Dmitry Bely d.bely at recognize.ru
Mon May 17 05:33:03 PDT 2021


I'm trying to create a live555-based RTSP server streaming H.264 via
unicast from a live source. I'm able to stream video to the first
client without errors, but when the second client connects
concurrently to the same URL it fails to find PPS/SPS NALs in the
beginning of H.264 stream (ffmpeg client log goes below):

[rtsp @ 000001ab1d028d80] video codec set to: h264
[rtp @ 000001ab1d02dfc0] No default whitelist set
[udp @ 000001ab1d030400] No default whitelist set
[udp @ 000001ab1d030400] end receive buffer size reported is 393216
[udp @ 000001ab1d040700] No default whitelist set
[udp @ 000001ab1d040700] end receive buffer size reported is 393216
[rtsp @ 000001ab1d028d80] setting jitter buffer size to 500
[rtsp @ 000001ab1d028d80] hello state=0
Failed to parse interval end specification ''
[h264 @ 000001ab1d02fd80] non-existing PPS 0 referenced
[extract_extradata @ 000001ab1d02b2c0] nal_unit_type: 1(Coded slice of
a non-IDR picture), nal_ref_idc: 2
[h264 @ 000001ab1d02fd80] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 2
[h264 @ 000001ab1d02fd80] non-existing PPS 0 referenced
[h264 @ 000001ab1d02fd80] decode_slice_header error
[h264 @ 000001ab1d02fd80] no frame!
[h264 @ 000001ab1d02fd80] non-existing PPS 0 referenced
[extract_extradata @ 000001ab1d02b2c0] nal_unit_type: 1(Coded slice of
a non-IDR picture), nal_ref_idc: 2
[h264 @ 000001ab1d02fd80] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 2
[h264 @ 000001ab1d02fd80] non-existing PPS 0 referenced
[h264 @ 000001ab1d02fd80] decode_slice_header error
[h264 @ 000001ab1d02fd80] no frame!
[h264 @ 000001ab1d02fd80] non-existing PPS 0 referenced

There was a similar question in the list:
http://lists.live555.com/pipermail/live-devel/2014-October/018772.html
I've tried to follow the answer: verified that reuseFirstSource was
set to true, and tried to set PPS/SPS in my
RTPSink* H264LiveServerMediaSubsession::createNewRTPSink(Groupsock*
rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource*
inputSource)
implementation. But unfortunately it simply is not called when the
second client connects (I double-checked that in debugger). Can you
provide more detail on how to make the second concurrent client start
its RTP session from correct PPS/SPS NALs?

- Dmitry Bely


More information about the live-devel mailing list