Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing the data from RTP header extensions #227

Open
destructeur opened this issue Apr 16, 2024 · 2 comments
Open

Accessing the data from RTP header extensions #227

destructeur opened this issue Apr 16, 2024 · 2 comments

Comments

@destructeur
Copy link

From what I understand, it's possible to use and define custom RTP Header Extensions to suit our needs.
As long as the extension is not mandatory for properly receiving and decoding the video, there's nothing that prohibits its use.
It's possible to negotiate the use of these extensions in the SDP, but there's no way to access the raw data of the received packets.

Should it be possible with the RTCRtpReceiver/RTCEncodedVideoFrame to access the data of the different header extensions received in the RTP packets?

@fippo
Copy link
Collaborator

fippo commented Apr 17, 2024

Header extensions would need to be negotiated in the SDP so are not freeform.
Exposing them in the API is tricky because they tend to be on individual packets (first, last or all of the frame) and it is not known up-front how many packets a frame is going to be split up into.

@destructeur
Copy link
Author

Exactly, however, it's possible to add the extensions we want to the SDP and to accept these same extensions during the negotiation.
When we receive a frame, we could simply have a list of all the header extensions present in the frame with their ID and other useful information.
Alternatively, we could allow the reception of individual RTP packets and not just complete frames.
We can receive the data of the encoded frame but not the data from the header extensions. In my opinion, this information is just as useful, if not more, than the data of an frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants