Open ibc opened 3 years ago
Running with --force-fieldtrials="WebRTC-Vp9DependencyDescriptor/Enabled/WebRTC-DependencyDescriptorAdvertised/Enabled"
enables the DependencyDescriptor extension also for VP9.
Tested with chromium 91.0.4434.0
@vpalmisano,
Can you please describe the current state of the implementation, and the decisions taken so far? Feel free to point the needed references to specs, etc.
Current state:
supportedRtpCapabilities
;worker/src/RTC/Codecs/AV1X.hpp
and worker/src/RTC/Codecs/AV1X.cpp
(https://github.com/versatica/mediasoup/commit/e0ded5e9b702fa65046328089a65cd4363e05a1a) that are basically a copy of VP9 classes with an initial parser of the OBU format used by AV1. In the case of single AV1 stream, the parser checks if the packet is the first of a coded video sequence (https://aomediacodec.github.io/av1-spec/av1-spec.pdf 5.3.1); in this case, the packet is marked as keyframe.WARNING:libaom_av1_encoder.cc(182)] Scalability mode is not set, using 'NONE'.
Thanks for the update @vpalmisano, it's looking awesome!
Hi @vpalmisano, if here is anything we can help with, let us know.
I'm digging into the code and AFAIK the best place where to collect the DD headers informations is inside the EncodingContext
class. I'm trying to figure out how this informations can be used also for VP8 and VP9 codecs, because using this header extension we could also support the SFrame approach.
I would not use DD with H264 and VP8. I do not believe DD is mandatory for SFrame. You can use SFrame with a different header extension than DD e.g. with H.264 and VP8. Those are orthogonal, SFrame is used sender and receiver side, DD or equalivalent are used by intermediary SFUs, they serve different purposes.
@agouaillard In the mediasoup case we need to know at least, for each arrived RTP packet, if it belongs to a keyframe or not, and actually this is done inspecting the video packet content. When using SFrame the packet content could be encrypted at client side, so I think that the only way to perform this parsing is using the DD information.
VP8: https://github.com/versatica/mediasoup/blob/v3/worker/src/RTC/Codecs/VP8.cpp#L14 VP9: https://github.com/versatica/mediasoup/blob/v3/worker/src/RTC/Codecs/VP9.cpp#L13 H.264: https://github.com/versatica/mediasoup/blob/v3/worker/src/RTC/Codecs/H264.cpp#L54
. When using SFrame the packet content could be encrypted at client side, so I think that the only way to perform this parsing is using the DD information.
You think wrong. This is not the only way.
https://tools.ietf.org/html/draft-ietf-avtext-framemarking-12
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
This is not the only way.
Correct. There are different ways to achieve it.
Anyway we are targeting AV1 here. Let's not add SFrame into play in this context please.
This is not the only way.
Correct. There are different ways to achieve it.
Anyway we are targeting AV1 here. Let's not add SFrame into play in this context please.
Yes. Just to close the digression, this is the discussion about the FrameMarking header usage: https://github.com/versatica/mediasoup/issues/298.
Updates: (This is related to chromium code, so maybe we should report this with a specific bug report, I'm reporting this if anyone could help)
I've followed what indicated in https://medooze.medium.com/mastering-the-av1-svc-chains-a4b2a6a23925 appling this patch https://chromium-review.googlesource.com/c/chromium/src/+/2623011 After this, seems that this https://chromium.googlesource.com/chromium/src/third_party/+/master/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc#352 fails, even if simulcast is enabled at web side. I've forced the scalability mode adding these instructions:
webrtc_encoding.scalability_mode = "L2T3_KEY";
webrtc_encoding.num_temporal_layers = 3;
Now chromium is actually using a AV1 simulcast configuration, but the problem I found is that the DependencyDescriptor header doesn't contain anymore the template_dependency_structure_present_flag
. Inspecting the chromium code, seems that here (https://chromium.googlesource.com/external/webrtc/+/HEAD/modules/rtp_rtcp/source/rtp_sender_video.cc#399) the descriptor.attached_structure
variable is not null when assigned, but it is null here (https://webrtc.googlesource.com/src/+/lkgr/modules/rtp_rtcp/source/rtp_dependency_descriptor_writer.cc#326) when the same variable should be used for writing the header.
Dependency Descriptor implementation status in chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1196318 https://bugs.chromium.org/p/webrtc/issues/detail?id=11999
Any update on this?
Any update on this?
More random info:
--force-fieldtrials="WebRTC-DependencyDescriptorAdvertised/Enabled"
enables the creation of DependencyDescriptor extensions headers.