Skip to content
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

Snapshot won't work with Reolink camera with 1.5.0 #417

Open
luisiam opened this issue May 4, 2023 · 6 comments
Open

Snapshot won't work with Reolink camera with 1.5.0 #417

luisiam opened this issue May 4, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@luisiam
Copy link

luisiam commented May 4, 2023

I am adding a snapshot stream using the reolink snapshot URL

streams:
  backyard:
    - http://192.168.10.24/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=xxx&password=xxx

I am using the frame.jpeg url to feed that snapshot to other services like scrypted.
image

It was working fine in previous version till I updated to go2rtc 1.5.0. Now, when I click that frame.jpeg link, I am getting exit status 1.
image

I had another amcrest camera and I am doing the same thing which still works with go2rtc 1.5.0

@AlexxIT AlexxIT added the bug Something isn't working label May 5, 2023
@Mr-HaleYa
Copy link

Tried with both my Reolink E1 Zooms, did what you are saying and the first one gave me the same error then the other did not. When I tried the first one again the error didn't show and I've restarted and retried many times and it has not come back...
I also have a Reolink Doorbell and it also worked fine. So I was able to recreate it once then never again...

running frigate 0.12.0 with go2rtc 1.15.0 binary installed

go2 rtc config snip

streams:
    loft_cam_test:
      - http://192.168.50.***/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=***&password=***
    lvrm_cam_test:
      - http://192.168.50.***/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=admin&password=***
    doorbell_cam_test:
      - http://192.168.50.***/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=***&password=***

What camera(s) are you using?

Do you have http access enable in the camera config? I tried using the snapshot feature without it enabled a while ago and it threw a lot of errors.
image

@luisiam
Copy link
Author

luisiam commented May 5, 2023

I figured it out. I have to set it up as a standalone stream. I had it set up as one of the sources in the same stream along with the main RTSP stream and it worked before version 1.5.0

@Mr-HaleYa
Copy link

so you fixed it? this can be closed?

@luisiam
Copy link
Author

luisiam commented May 6, 2023

The behavior is different comparing to previous version. My full config was like that:

streams:
  backyard:
    - http://192.168.10.24/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xxx&password=xxx
    - rtsp://xxx:[email protected]:554/h264Preview_01_main
    - ffmpeg:backyard#audio=opus
    - http://192.168.10.24/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=xxx&password=xxx

The frame.jpeg link was working with this config in previous version. But for go2rtc 1.5.0, I have to separate the snapshot into another stream.

streams:
  backyard:
    - http://192.168.10.24/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xxx&password=xxx
    - rtsp://xxx:[email protected]:554/h264Preview_01_main
    - ffmpeg:backyard#audio=opus
  backyard_snapshot
    - http://192.168.10.24/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=go2rtc&user=xxx&password=xxx

Not sure if this change is intended.

@AlexxIT
Copy link
Owner

AlexxIT commented May 6, 2023

This is expected behaviour for v1.5: AlexxIT/Blog#11

All streams now support JPEG snapshots. For MJPEG streams frame is taken directly.
For H264/H265 cameras automatic transcoding with FFmpeg is used.

So go2rtc will take first source and will try to transcode it to JPEG. But anyway it shouldn't fail.

@luisiam
Copy link
Author

luisiam commented May 6, 2023

I did further debug and found out that the snaphot won't work if I am using Reolink HTTP FLV source. If I changed to RTSP source, it will work. Following is the summary.

  1. Reolink with HTTP FLV source, go2rtc CANNOT generate snapshot
  2. Reolink with RTSP source, go2rtc can generate snapshot
  3. Reolink with HTTP snapshot source (from API), go2rtc can generate snapshot

I used HTTP FLV source for my reolink cameras because it is more stable than RTSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants