pion / webrtc

Pure Go implementation of the WebRTC API
https://pion.ly
MIT License
13.21k stars 1.61k forks source link

AV1 packets are incompatible with GStreamer and possibly Chromium-based browsers #2788

Open anonymix007 opened 1 month ago

anonymix007 commented 1 month ago

Your environment.

What did you do?

Server is based on play-from-disk-renegotiation example, client is either Chromium or based on gstreamer-receive

What did you expect?

Video should play in both Chromium and Gstreamer

What happened?

It doesn't. Refer to the gstreamer issue above. Chromium doesn't report any errors and just doesn't play the video.

sdroege commented 1 month ago

The relevant part here is https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/560#note_2448414

In short, Pion currently includes the obu_has_size_field in the OBUs while the AV1 RTP spec recommends ("SHOULD") to not include them. GStreamer does not support that currently (but I'm changing that right now).

sdroege commented 1 month ago

Similarly, temporal delimiter OBUs are still part of the packets but should be stripped according to the AV1 RTP spec.

sdroege commented 1 month ago

Also the payload is generally invalid. The aggregation header claims that only a single OBU is contained in the packet, but the packets contain a temporal delimiter OBU followed by a sequence header OBU and others.

Additionally the N bit of the aggregation header is never set.