nibi79 / synologysurveillancestation

Synology Surveillancestation Binding
45 stars 5 forks source link

Feature Request: Rotate picture #51

Closed koshisan closed 2 years ago

koshisan commented 2 years ago

Hi!

First: This add-on is a godsend! I have been annoyed by my rstp-only cams ever since I got them and this finally allows for an integration!

One small thing, though: Would it be possible to add rotation options to the camera thing? I know that in theory Surveillancestation already supports this - but only if it is directly integrated into the camera hardware. Which it isn't for me...

Thank you very much!

Pavion commented 2 years ago

Hi there and thanks for your feedback! What kind of rotation are you expecting? For any streaming URIs provided by this binding any video rotation have to come from Synology. If you mean the snapshot Image, then it might be possible to rotate it using JS Transformation. If this is your case and you're not into JS yourself, I could look into it.

koshisan commented 2 years ago

Thanks for your reply. It is indeed mainly the mjpeg stream. Is that one also generated on the nas? I had the impression Synology would only do rstp and therefore assumed the add-in would generate that one... A rotated snapshot would be a first step, though. I am not familiar with JS, but I do have a node-red running on the same machine, so I should be able to rotate the image there! Just hadn't thought of it...

Pavion commented 2 years ago

Yes, mjpeg stream is generated by Surveillance Station itself (and is a bit laggy too).
Obtaining the snapshot and transforming it using openHAB internal JS transformation plugin should work here, I'd assume no additional node setup is needed. However you might get higher network and CPU loads if using fast refresh rates. If used for sitemap only it might be possible to implement a rule which is only sending a REFRESH and transforming image on demand. Dunno, it's a while since I've played such tricks :) Feel free to share your thoughts on this :)