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

DVRIP stream opening delay #1595

Closed
maksz42 opened this issue Feb 13, 2025 · 3 comments
Closed

DVRIP stream opening delay #1595

maksz42 opened this issue Feb 13, 2025 · 3 comments
Labels
question Further information is requested

Comments

@maksz42
Copy link

maksz42 commented Feb 13, 2025

On Android, the official XMeye app and IP Cam Viewer can open the camera's stream almost instantly. However, when I open the RTSP restream of that camera with ffplay, I need to wait a few seconds to see the video (connection is already established by another ffplay instance). Why is that? Does DVRIP do something clever, or is it an inherent RTSP drawback? Maybe there's a trick to avoid opening delay with ffplay? Just curious
Thanks

@AlexxIT AlexxIT added the question Further information is requested label Feb 13, 2025
@AlexxIT
Copy link
Owner

AlexxIT commented Feb 13, 2025

I don't see a question about go2rtc here.

@maksz42
Copy link
Author

maksz42 commented Feb 13, 2025

Well, it's restreamed with go2rtc. I thought you or someone else maybe had figured it out. Sorry if this is off-topic.

@AlexxIT
Copy link
Owner

AlexxIT commented Feb 13, 2025

This is the decision of the camera's developer. Do they give each new client an independent stream. Or do they give them all one stream.

Go2rtc gives all clients a single stream.

A good camera starts its first stream with a keyframe. If it gives this stream to a second client - it will be from an random time. And the client will see the picture only at the moment of the next keyframe.

A good camera gives away keyframes every second. But there are cameras with keyframes every 5 and 10 seconds (very rare).

Sometime in the future go2rtc will try to start a stream for each client with a keyframe. But this is a very complicated development task at the moment - #96

@AlexxIT AlexxIT closed this as completed Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants