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

use case:disable A/V sync for remote control or online gaming #78

Closed
bdrtc opened this issue Nov 28, 2022 · 8 comments
Closed

use case:disable A/V sync for remote control or online gaming #78

bdrtc opened this issue Nov 28, 2022 · 8 comments

Comments

@bdrtc
Copy link

bdrtc commented Nov 28, 2022

sometimes online cloud gaming or remote control need very low video latency, they may need playout delay video extension in sender side , and set the min/max delay to 0 as describe in playout-delay draft

but it only control video delay and is best effort, it will also be affected by audio and video synchronization, in this case, user need
disable A/V sync for low interactive delay of video.

@fippo
Copy link
Collaborator

fippo commented Nov 28, 2022

I don't think there is action needed, it is already possible to not enable AV sync.

@bdrtc
Copy link
Author

bdrtc commented Nov 28, 2022

yes, it's possible by change sdp, i do't think it's a good way, most users may do't kown how to achive this by default and even do't kown disable A/V sync will optimaze such use cases.

@henbos
Copy link

henbos commented Nov 28, 2022

The A/V sync group is controlled by the stream group though, so if you don't want the two tracks to be synced and don't want to SDP munge, can you not simply not put them in the same stream? E.g.

pc.addTrack(audioTrack, new MediaStream([audioTrack]);
pc.addTrack(videoTrack, new MediaStream([videoTrack]);

Or simply omit the optional stream argument

@bdrtc
Copy link
Author

bdrtc commented Nov 29, 2022

The A/V sync group is controlled by the stream group though, so if you don't want the two tracks to be synced and don't want to SDP munge, can you not simply not put them in the same stream? E.g.

pc.addTrack(audioTrack, new MediaStream([audioTrack]);
pc.addTrack(videoTrack, new MediaStream([videoTrack]);

Or simply omit the optional stream argument

great, that make sence, summarize it here for those may have such requirement for low interactive delay scenario

  1. use playout-delay extension in sender end.
  2. disable A/V sync in receiver end.

@henbos
Copy link

henbos commented Nov 29, 2022

I may lack context but I don't think the receiver should be the one to disable A/V sync, if the sender sets the sync group up correctly (=meaning no sync group) then the receiver can just accept what they are offered, no need for special logic or having different stream groups on different endoints.

@bdrtc
Copy link
Author

bdrtc commented Nov 30, 2022

I may lack context but I don't think the receiver should be the one to disable A/V sync, if the sender sets the sync group up correctly (=meaning no sync group) then the receiver can just accept what they are offered, no need for special logic or having different stream groups on different endoints.

in p2p mode this is ok, but in sfu mode it's hop by hop not end2end negotiation. perform it in receiver maybe more suitable

@fippo
Copy link
Collaborator

fippo commented Nov 30, 2022

on the receive side this is controlled by what the values of the msid field in the SDP are. What a SFU (or another server) puts there is not controllable via a browser API.

@bdrtc
Copy link
Author

bdrtc commented Jan 17, 2023

Yes, both ways are possible, depending on implementation preference, since there is already solution for this, close this issue, Thanks @henbos @fippo 🥇 .

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

3 participants