Recommended way to communicate stream resolution changes

33 views
Skip to first unread message

Nimi Wariboko Jr

unread,
Aug 10, 2022, 1:35:46 PMAug 10
to discuss-webrtc
I am sending a video over RTSP with (gstreamer with rtppay to an appsink where I ultimately feed the packets into webrtc-rs) and I have a feature that allows the user to change the quality of the stream (the peer will re-transcode the video, if needed, in gstreamer). 

What I am unsure about is how this should be signaled to the web browser. Currently I'm using `ReplaceTrack`, which works well sometimes. Othertimes I may see multiple messages about frames being received outside of the delay bounds:

```

[24744:31747:0810/102707.507180:WARNING:frame_helpers.cc(32)] A frame about to be decoded is out of the configured delay bounds (47688338 > 10000). Resetting the video jitter buffer.

[24744:19971:0810/102707.522519:WARNING:frame_helpers.cc(32)] A frame about to be decoded is out of the configured delay bounds (47688239 > 10000). Resetting the video jitter buffer.

[24744:19971:0810/102707.629640:WARNING:frame_helpers.cc(32)] A frame about to be decoded is out of the configured delay bounds (47688138 > 10000). Resetting the video jitter buffer.

[24744:29187:0810/102707.729836:WARNING:frame_helpers.cc(32)] A frame about to be decoded is out of the configured delay bounds (47688038 > 10000). Resetting the video jitter buffer.

```

Other times there may be issues with NACKS

```

[24744:86067:0810/102605.692740:WARNING:packet_buffer.cc(178)] PacketBuffer is already at max size (2048), failed to increase size.

[24744:86067:0810/102605.692791:WARNING:packet_buffer.cc(98)] Clear PacketBuffer and request key frame.

[24744:86067:0810/102605.745404:WARNING:nack_requester.cc(357)] Sequence number 11520 removed from NACK list due to max retries.

[24744:86067:0810/102605.745474:WARNING:nack_requester.cc(357)] Sequence number 11522 removed from NACK list due to max retries.

[24744:86067:0810/102605.745484:WARNING:nack_requester.cc(357)] Sequence number 11523 removed from NACK list due to max retries.

```

Are there any recommendations in how stream resolution/format changes should be handled? Should I be creating a new track and pushing that?

Lorenzo Miniero

unread,
Aug 12, 2022, 10:37:14 AMAug 12
to discuss-webrtc
There's no need to do anything: as soon as a new keyframe arrives it will contain the resolution of the new stream, and the browser will handle that automatically.

L.
Reply all
Reply to author
Forward
0 new messages