Open dbuezas opened 1 year ago
The hack I am using at the moment is this:
I call a 2nd go routine that starts a new connection and then is closed quickly.
The only issue I have is that the video startup time is still super slow if I'm not the first coonsumer in the list, because of stream reuse inside go2rtc
Ok thanks for the pointers. I'll research a bit more. This would make dvrip cameras incredibly snappy. I tried sending a "Start" action on the existing connection but that broke the stream. I'll try again to be sure.
Any clue as to why the first IFrame doesn't make it to the consumer? That would already make a big difference
Producer can start send frames before consumer can receive this frames. This is architecture problem for some producer and some consumer formats.
I see. The problem has gotten worse since the latest firmwares increase the distance between IFrames. I'll see if I find any orderly way of sending a command to the DVRIP cameras when new consumers come in. This could make it the quickest protocol to start up video :)
Problem also will be fixed with #96
@dbuezas did you find a workaround for this in the meantime? My camera also supports rtsp, but I notice the same behaviour when using dvrip or rtsp.
@michaelarnauts The only work around I found was to add a second stream to the same camera to go2rtc. That stream is not used by anything else, so opening it causes the camera to add an iframe to all streams. Not great but it does make the normal stream "wake up" quickly
@michaelarnauts The only work around I found was to add a second stream to the same camera to go2rtc. That stream is not used by anything else, so opening it causes the camera to add an iframe to all streams. Not great but it does make the normal stream "wake up" quickly
Late reply, i know, but how did you integrate this? I'm trying to find a way to make sure frigate (and Home Assistant) can start playing a stream as soon as possible. Now, it can take up to 10 seconds for a stream to start, while frigate is actively reading the stream, so the data is already passing through the whole pipeline.
I was thinking about transcoding the stream, but that does seem to have the same issue. I've also tried to add you change to go2rtc to initiate a new connection, but the code has been refactored since, and I couldn't find the right location anymore.
but how did you integrate this?
I didn't. I just had a second stream I would open briefly just to "wake it up". Since then I change the camera for a "HiSeen" branded one that doesn't have the issue.
Hi Alex! I've been experimenting with DVR-IP quite a bit and found that the startup time of a camera is way longer than when using dedicated Apps like ICSee or XMEye. I also noticed that the video of my DVR-IP cameras starts up instantly on go2rtc AFTER as I connect to them through one of those apps. By adding logs in the code, I realised exactly what's going on:
So my questions are:
Thank you!