guino / Merkury1080P

Merkury1080P (CW017) Rooting and Customization
77 stars 16 forks source link

Snapshot quality #44

Open RomchikL opened 1 year ago

RomchikL commented 1 year ago

Is it possible to control the snapshot quality?

I have 1080p camera, but snapshots (via snap.cgi) are 640*360 pixels (96 DPI).

guino commented 1 year ago

@RomchikL unfortunately I have tried to increase the resolution of the snapshot and it always failed. The only suggestion I can make is use a computer/pi to provide snapshots from the device's RTSP feed -- I have something like this for one of my devices and you can see how it's done here: https://github.com/guino/rtsp2jpeg

RomchikL commented 1 year ago

@guino I use my camera with Home Assistant. If I specify a link to the snap.cgi script, HA use this link for snapshot service. Otherwise HA generates a screenshot from the stream (but there are some unpleasant bugs). Did I understand correctly that your script (rtsp2jpeg) does the same, but for all devices on the local network (via URL)? And is there a container for Docker with these libs and scripts?

guino commented 1 year ago

@RomchikL there are multiple scripts in my rtsp2jpeg project -- if you only want 1 (one) image, you can use ezvizsnap. If you expect yo request multiple images (i.e. a web page which refreshes every few seconds), then you should use ezvizjpegs (as it will start saving snapshots from the rtsp server so multiple requests will work faster).

There's no 'docker' for this stuff but really all you need is a computer with ffmpeg and some web server -- the scripts in the project are for lighthttpd which is small/easy to use. I suppose you could make a docker image for it if you like -- personally I just run it off a pi4 board hosting my homebridge server.