question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Absolute Send Time' WebRTC extension bug

See original GitHub issue

Hi, I get the following warning upon the successfull connection of the two peers (but in fact it is an error since it prevent completely the tracks to be sent and received):

[WARNING][2022-06-28 13:00:29,863](72026)aiortc.rtcdtlstransport: RTCDtlsTransport(client) Traceback (most recent call last):
  File "/home/bob/ws/modules/streaming-module/venv/lib/python3.8/site-packages/aiortc/rtcdtlstransport.py", line 531, in __run
    await self._recv_next()
  File "/home/bob/ws/modules/streaming-module/venv/lib/python3.8/site-packages/aiortc/rtcdtlstransport.py", line 630, in _recv_next
    await self._handle_rtp_data(data, arrival_time_ms=arrival_time_ms)
  File "/home/bob/ws/modules/streaming-module/venv/lib/python3.8/site-packages/aiortc/rtcdtlstransport.py", line 575, in _handle_rtp_data
    packet = RtpPacket.parse(data, self._rtp_header_extensions_map)
  File "/home/bob/ws/modules/streaming-module/venv/lib/python3.8/site-packages/aiortc/rtp.py", line 710, in parse
    packet.extensions = extensions_map.get(extension_profile, extension_value)
  File "/home/bob/ws/modules/streaming-module/venv/lib/python3.8/site-packages/aiortc/rtp.py", line 89, in get
    values.abs_send_time = unpack("!L", b"\00" + x_value)[0]
struct.error: unpack requires a buffer of 4 bytes

I investigated a bit and I understood that is caused by the RTP extension “Absolute Send Time” (https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/rtp-hdrext/abs-send-time) In the specification it is written that this extension is 4 bytes long, but the code in aiortc/rtp.py seems to ignore this and try to get the extension value as for any other extension. Then this value is unpacked but being too short an exception from the struct package is thrown. You think all this I supposed is right? I can try patching it and sending you a first fix. Have a great day

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
david-goldbcommented, Nov 15, 2022

Hi, is there something new to update regarding this one? I experience the same thing when I try to receive the rtp_data

0reactions
david-goldbcommented, Nov 27, 2022

After I removed this a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n from the offer before I sent it to the master peer, I was able to stream media between the two peers. It looks fine - no delay and good sync of audio-video tracks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Both abs-send-time and timestamp offset being negotiated.
It appears that both abs-send-time and timestamp offsets are incorrectly being added to RTP packets when both sender and receiver support ...
Read more >
docs/native-code/rtp-hdrext/abs-send-time - src
The Absolute Send Time extension is used to stamp RTP packets with a timestamp showing the departure time from the system that put...
Read more >
Explainer | webrtc-extensions - W3C on GitHub
The solution proposed in this document is based on a new RTP header extension, absolute capture time, which contains two data fields:.
Read more >
What abs-send-time mainly used for?
When we recording in our webrtc gateway, sometimes it went out of sync, it very difficult for us debug this, so we use...
Read more >
Safari Technology Preview Release Notes
Note: Shared Tab Groups and syncing for Tab Groups, Website Settings, and Web Extensions are not enabled in this release. WebAssembly. Fixed error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found