-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve snapshot quality (lower compression) / export still picture from stream? #19
Comments
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. |
I was in contact with Unifi. As the API is not intended for 3rd party use, they would not comment on parameters / usage. Also, they could not tell me wether they would "fix" the anonymous snapshot. I have posted a feature request to Unifi community forums, asking for a feature to expose still pictures in configurable resolution / compression. Read it here - maybe you care to "upvote"? @hjdhjd Would you have any pointers as to how I could use the video stream and extract a single frame / still picture with your API client? Greatly appreciated! |
Sorry, did not intend to close. |
Thanks for the request - I'll look into this as time allows in the near future, but I'm closing for this one for the time being. I'm certainly interested in improving snapshot quality...I appreciate you doing some homework to track down some of the detail of this. Having looked into it a bit further - this is an API choice by Ubiquiti. If there’s a way to produce snapshot images directly from the API that’s of higher quality, happy to look into it. Otherwise, this is what the API produces. Your alternatives are to generate a thumbnail using FFmpeg which the links you’ve shared also point you toward. It does work, at the expense of a small performance hit on modern systems. Best of luck. |
This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions. |
Is your feature request related to a problem? Please describe:
I bought a UVC-G5-Pro and mounted it to the tower of my flying club's airfield. We primarily want to use it as a "netcam" and upload a picture once a minute to our website, for pilots to judge weather condition or just admire the glider planes ;-)
This seems awkwardly difficult to achieve. The "anonymous snapshot" feature of the cam itself only returns 640px width and very highly compressed images - bummer.
I started researching and found no easy way to export still pictures from Unifi Protect nor the cam.
Finally, I came across this library. Thanks a lot for making this! I learned enough NodeJS to get it to call the "getSnapshot" via Unifi Protect API last night.
Now I can obtain 3840x2160 px resolution snapshot, but the pictures are still heavily compressed and look terrible...
Describe the solution you'd like:
I would liked to reduce JPEG compression on the getSnapshot returned image - or set it to a higher quality at least.
I am unsure if Unifi has necessary parameters, fiddling with the UI I could not find any. For playback it seems multiple channels with different compressions are supported, but I was not successful applying those params to the snapshot endpoint.
Describe alternatives you've considered:
If Unifi Protect snapshot endpoint does in fact not provide better quality image, an alternative approach might be to extract a higher quality still picture from the video stream. But I honestly don't know how to do that.
Maybe a convienience method could be added to the stream API?
Additional context:
I am attaching two JPEG show the problem. One was obtained through snapshot service, the other was exported from Unifi Protect UI. You also see a big difference in file size.
Snapshot:
Still picture taken from Unifi Protect UI:
The text was updated successfully, but these errors were encountered: