You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
H264 temporal layers no longer detected due to removal of frame-marking RTP extension in libwebrtc (must implement dependency descriptor RTP extension)
#1414
H264.cpp payload descriptor parser relies on frame-marking RTP extension to get information about temporal layer of the payload (among other fields). However, libwebrtc (AKA Chrome) no longer enables/implements frame marking RTP extension. Result is that, even if client enables temporal layers in H264, mediasoup will never detect them and will consider that all H264 received packets belong to temporal layer 0.
It also affects to the H264_SVC.cpp codec which also relies on frame marking RTP extension. In this case it means that mediasoup will consider that all H264_SVC received packets belong to spatial layer 0 and temporal layer 0.
RTP extensions offered by Chrome when using H264 codec with temporal layers enabled (by passing proper scalabilityMode value to the encodings) are the following:
Video Layers Allocation extension "is for a video sender to provide information about the target bitrate, resolution and frame rate of each scalability layer in order to aid a selective forwarding middlebox to decide which layer to relay."
So this is NOT what we need since it doesn't indicate which spatial/temporal layer current packet belongs to. This is a RTP extension to tell the remote side how many spatial/layers we are generating, the target bitrate of each layer and so on.
Conclusion
AFAIS there is literally no way to detect which spatial/temporal layer a received H264/H264_SVC payload belongs.
Or perhaps we must parse the codec payload to parse its spatial/temporal layers? Note that we already do a very basic parsing of the H264/H264_SVC payload to detect keyframes:
chrome use [dependency-descriptor-rtp-header-extension](https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension) on H264 too
ibc
changed the title
H264 temporal layers no longer detected due to removal of frame-marking RTP extension in libwebrtc
H264 temporal layers no longer detected due to removal of frame-marking RTP extension in libwebrtc (must implement dependency descriptor RTP extension)
Jun 28, 2024
H264.cpp
payload descriptor parser relies on frame-marking RTP extension to get information about temporal layer of the payload (among other fields). However, libwebrtc (AKA Chrome) no longer enables/implements frame marking RTP extension. Result is that, even if client enables temporal layers in H264, mediasoup will never detect them and will consider that all H264 received packets belong to temporal layer 0.RTP extensions offered by Chrome when using H264 codec with temporal layers enabled (by passing proper
scalabilityMode
value to theencodings
) are the following:Relevant RTP extensions are the following:
https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension
RTP Payload Format For AV1 extension "describes an RTP payload format for the AV1 video codec".
So clearly this is not valid here.
http://www.webrtc.org/experiments/rtp-hdrext/video-layers-allocation00
Video Layers Allocation extension "is for a video sender to provide information about the target bitrate, resolution and frame rate of each scalability layer in order to aid a selective forwarding middlebox to decide which layer to relay."
So this is NOT what we need since it doesn't indicate which spatial/temporal layer current packet belongs to. This is a RTP extension to tell the remote side how many spatial/layers we are generating, the target bitrate of each layer and so on.
Conclusion
AFAIS there is literally no way to detect which spatial/temporal layer a received H264/H264_SVC payload belongs.
Or perhaps we must parse the codec payload to parse its spatial/temporal layers? Note that we already do a very basic parsing of the H264/H264_SVC payload to detect keyframes:
The text was updated successfully, but these errors were encountered: