Hi.
I have carried out tests with the h264 codec and the insert-sps-pps parameter is the one that causes the same problem with this codec.
This chain works correctly. If the web client disconnects and reconnects, the video shows it without problems.
gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,width=1280,height=720 ! timeoverlay
valignment=4 halignment=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720' ! nvv4l2h264enc maxperf-enable=1 disable-cabac=true idrinterval=5 insert-sps-pps=true ! video/x-h264 ! rtph264pay ! udpsink host=<IP JANUS> port=<PORT JANUS>
If we remove the parameter or insert-sps-pps=false. The same problems appear as with AV1. If the web client is disconnected and reconnected, it receives a stream but the browser does not display the video.
From what I have been able to test (statistics by type) the “codec” information node is only generated when we connect the client and then generate the source on the server.
NOTE: Information obtained from the edge browser debugger for webrtc (edge://webrtc-internals)
codec (mimeType=video/AV1, payloadType=96, id=CITcam00DD1_96_level-idx=5;profile=0;tier=0)
Statistics CITcam00DD1_96_level-idx=5;profile=0;tier=0
timestamp 13/6/2024, 15:24:16
transportId Tcam00DD1
payloadType 96
mimeType video/AV1
clockRate 90000
sdpFmtpLine level-idx=5;profile=0;tier=0
If the source on the server is already broadcasting and we connect the client to the previous one, the “codec” node never appears in the webrtc debug trace
Browser rtp statistics where Client connects after source server begin (no video) :
inbound-rtp (kind=video, mid=cam00DD, ssrc=1055871779, rtxSsrc=3497071643, id=ITcam00DD1V1055871779)
Statistics ITcam00DD1V1055871779
timestamp 14/6/2024, 14:15:04
ssrc 1055871779
kind video
transportId Tcam00DD1
jitter 0.004
packetsLost 0
trackIdentifier januscam00DD
mid cam00DD
packetsReceived 21178
[packetsReceived/s] 396.897612758397
bytesReceived 26350674
[bytesReceived_in_bits/s] 3950740.8317232314
headerBytesReceived 592984
[headerBytesReceived_in_bits/s] 88905.06525788092
rtxSsrc 3497071643
lastPacketReceivedTimestamp 1718367304593.996
[lastPacketReceivedTimestamp] 14/6/2024, 14:15:04
jitterBufferDelay 0
[jitterBufferDelay/jitterBufferEmittedCount_in_ms] 0
jitterBufferTargetDelay 0
[jitterBufferTargetDelay/jitterBufferEmittedCount_in_ms] 0
jitterBufferMinimumDelay 0
[jitterBufferMinimumDelay/jitterBufferEmittedCount_in_ms] 0
jitterBufferEmittedCount 0
framesReceived 0
[framesReceived/s] 0
[framesReceived-framesDecoded-framesDropped] 0
framesDecoded 0
[framesDecoded/s] 0
keyFramesDecoded 0
[keyFramesDecoded/s] 0
framesDropped 0
totalDecodeTime 0
[totalDecodeTime/framesDecoded_in_ms] 0
totalProcessingDelay 0
[totalProcessingDelay/framesDecoded_in_ms] 0
totalAssemblyTime 0
[totalAssemblyTime/framesAssembledFromMultiplePackets_in_ms] 0
framesAssembledFromMultiplePackets 0
totalInterFrameDelay 0
[totalInterFrameDelay/framesDecoded_in_ms] 0
totalSquaredInterFrameDelay 0
[interFrameDelayStDev_in_ms] 0
pauseCount 0
totalPausesDuration 0
freezeCount 0
totalFreezesDuration 0
firCount 0
pliCount 241
nackCount 0
minPlayoutDelay 0
remoteId ROA1055871779
Browser rtp statistics where Client connects before activating server source (video ok) :
inbound-rtp (kind=video, mid=cam00DD, ssrc=1650625963, rtxSsrc=1117715192, decoderImplementation=ExternalDecoder (D3D11VideoDecoder), powerEfficientDecoder=true, [codec]=AV1 (96, level-idx=5;profile=0;tier=0), id=ITcam00DD1V1650625963)
Statistics ITcam00DD1V1650625963
timestamp 14/6/2024, 14:21:39
ssrc 1650625963
kind video
transportId Tcam00DD1
jitter 0.005
packetsLost 0
trackIdentifier januscam00DD
mid cam00DD
packetsReceived 27717
[packetsReceived/s] 392.5681934550618
bytesReceived 34507337
[bytesReceived_in_bits/s] 3919432.9717985354
headerBytesReceived 776076
[headerBytesReceived_in_bits/s] 87935.27533393384
rtxSsrc 1117715192
jitterBufferDelay 34.660939
[jitterBufferDelay/jitterBufferEmittedCount_in_ms] 16.6955333333334
jitterBufferTargetDelay 23.860934999999998
[jitterBufferTargetDelay/jitterBufferEmittedCount_in_ms] 11.452666666666644
jitterBufferMinimumDelay 23.860934999999998
[jitterBufferMinimumDelay/jitterBufferEmittedCount_in_ms] 11.452666666666644
jitterBufferEmittedCount 2059
framesReceived 2059
[framesReceived/s] 30.120321748470214
[framesReceived-framesDecoded-framesDropped] 0
framesDecoded 2059
[framesDecoded/s] 30.120321748470214
keyFramesDecoded 1
[keyFramesDecoded/s] 0
framesDropped 0
totalDecodeTime 7.364809999999999
[totalDecodeTime/framesDecoded_in_ms] 4.729299999999981
totalProcessingDelay 42.593056
[totalProcessingDelay/framesDecoded_in_ms] 21.609166666666606
totalAssemblyTime 4.664156999999999
[totalAssemblyTime/framesAssembledFromMultiplePackets_in_ms] 2.0894666666666653
framesAssembledFromMultiplePackets 2059
totalInterFrameDelay 68.57
[totalInterFrameDelay/framesDecoded_in_ms] 33.39999999999985
totalSquaredInterFrameDelay 2.5700879999999944
[interFrameDelayStDev_in_ms] 15.370100845474685
pauseCount 0
totalPausesDuration 0
freezeCount 0
totalFreezesDuration 0
firCount 0
pliCount 0
nackCount 0
minPlayoutDelay 0
codecId CITcam00DD1_96_level-idx=5;profile=0;tier=0
[codec] AV1 (96, level-idx=5;profile=0;tier=0)
lastPacketReceivedTimestamp 1718367699387.669
[lastPacketReceivedTimestamp] 14/6/2024, 14:21:39
frameWidth 1280
frameHeight 720
framesPerSecond 30
decoderImplementation ExternalDecoder (D3D11VideoDecoder)
powerEfficientDecoder true
remoteId ROA1650625963
It seems that Decoded keyFrames are only sent once at the start of the server streamer.
How can I check if the encoder is generating keyframes regularly?
Thanks