Stream only camera

Hi, I’ve recently received this camera https://de.aliexpress.com/store/product/GADINAN-IP-Camera-2MP-1080P-IMX322-4MP-OV4689-ONVIF-Dome-Vandal-proof-IR-Outdoor-CCTV-Camera/316399_32846142251.html?spm=2114.12010615.0.0.510a393dYgJVJK

and played around quite a bit.

  • Nightvision is really good for my purpose (~5m between camera and door)
  • directly accessible rtsp streams (2)
  • H265 and H264 stream option with 2Mpx at 10 (or was it more?) fps works reliably
  • second stream with lower resolution available in addition
  • fairly cheap 22eur
  • pretty solid housing, easy to install

But I’m also facing one big issues: I can’t find an URL for a snapshot, seams like the camera only provides the rtsp stream, the Webinterface is only usable with IE and won’t provide an image using chrome / firefox.

So what I’ve done is: (after blocking internet access for the cam)
a) create a camera that uses the still_image_url from another camera (so basically ignore it) and
use the full 1080p rtsp stream as stream_source.

camera:

This works sort of fine. On a cable connected PC everything looks good in lovelace, but the stream lags on some wifi devices (I guess not a homeassistant issue).

So the next thing I’ve done was to switch to the D1 stream (720x480px) by switching the url to 1.sdp instead of 0.sdp. This looks a bit silly because the camera will distorted the 16:9 image into a 4:3 scaled stream, but now the stream works on all devices.

But all this only helps as long as I’m watching the video. I’d really like to grap a snapshot (once someone rings the doorbell) and send it to my phone.
I’ve tried camera.snapshot but this will grab the frame from the still_image_url which is connected to my “other” camera. My next attempt was to use ffmpeg:

ffmpeg -loglevel fatal -i rtsp://192.168.2.10//user=admin_password=_channel=1_stream=0.sdp -vframes 1 -r 1 -y /tmp/dome1_5.jpg

This works, most of the time. but every once in a while i get an old image… meaning: someone rings the doorbell at 9:00. I receive an image with 9:00 timestamp. Next person rings the bell at 10:00, I receive an image with timestamp 9:01 which i totally don’t understand.

So my question: does anyone know if there is an url for a snapshot for this type of camera (and yes, I’ve googled quite a bit to find the answer but didn’t succeed) ? Or is there something wrong with my ffmpeg command?

Thanks, JKW

1 Like

Somewhat late but might help.

http://192.168.0.28/webcapture.jpg?command=snap&channel=1&user=admin&password=MoGLxh8X

Use your own ip and password.