keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.59k stars 223 forks source link

Fix time getting slowly out of sync #366

Closed GwnDaan closed 6 days ago

GwnDaan commented 3 months ago

Probably fixes #302

What's changed

Changed the default factor with which the timestamps in the "write_timestamp_trailer" are multiplied from 100 to 90. I have no clue why and what this number does, but it completely resolves the issue with the time getting out-of-sync for me 🤷🏽.

To modify the value to anything other than 90 you can use the option: --timestamp-modifier <insert number here>.

While making this factor modifiable, I found that the write-timestamps option is never used, hence I also removed it in the PR.

Testing

The docker image built with my changes can be found at gwndaan/unifi-cam-proxy:timestamp-modifier. I've been running it over the last 24hrs and haven't found anything out of the ordinary yet.

I'm curious if this also solves/breaks things for others, so let me know! 😄

zacharee commented 2 months ago

The time still seems out of sync on my generic Hikvision camera, but maybe I need to readopt it?

I'm also trying to make a bit of a continuation repo since this one seems abandoned for the timebeing. I don't plan on actively developing, but I'll keep an eye on PRs so people hopefully don't need to go searching around PRs and forks to find fixes as much: https://github.com/zacharee/unifi-cam-proxy.

simclancy commented 1 month ago

The time still seems out of sync on my generic Hikvision camera, but maybe I need to readopt it?

I'm also trying to make a bit of a continuation repo since this one seems abandoned for the timebeing. I don't plan on actively developing, but I'll keep an eye on PRs so people hopefully don't need to go searching around PRs and forks to find fixes as much: https://github.com/zacharee/unifi-cam-proxy.

Does it include the supposed bandaid "fix" for the sync issue?

stale[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.