-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Question about latency #281
Comments
It's a bit strange too because stuff is only moving on the stream if I'm actively moving something on the computer screen but whats moving on the stream is the movements from like 5 seconds back. |
Sounds like it might be something with the capturing of the display that's causing this issue. If the code is otherwise very similar to one of the play from disk examples that leads me to believe the issue is on the source side |
Also, the timebase should match the negotiated timebase of the stream typically, |
vpx_encode is from @astraw maybe he has some input? |
Did you change the timebase? |
Yes, no difference. I also tried the library that vpx_encode is using for the screen capture. The theories I've had is.
I'm not experienced enough in either |
I think the other issue is the hardcoded duration of the samples. I know the examples do this, but it's a bit dodgy. What you ought to do instead is specify the correct duration of the samples |
Great thanks I will check that out! |
Yes! |
So I made the duration use the same amount of milliseconds that the frame capture loop does, in this case 40 and there was a big difference. But when I try that locally I don't even notice a lag. |
Ok, one reason could be that the pixel streaming plugin uses Nvidia's NVENC hardware encoder. |
Seems like ffmpeg has support for serveral hardware encoders, would be interesting to try. |
@stellanhaglund it would be fantastic if you could contribute this as a simple example once you're happy with it! 🤩 |
I'm doing a quick test to stream a recorded screen over webrtc but I'm experiencing multi second latencies, if you have any ideas that would help a lot!
here's the poc for the capturing part.
And here's the reciever.
I've tried both with and without the waiting parts.
The text was updated successfully, but these errors were encountered: