scottlamb / moonfire-nvr

Moonfire NVR, a security camera network video recorder
Other
1.25k stars 138 forks source link

Reolink Duo 2 PoE Test Problem: Unexpected RTSP Response #268

Closed jlpoolen closed 1 year ago

jlpoolen commented 1 year ago

Unable to run "Test" in configuration of "REOLINK 4K PoE Security Camera System, Home Outdoor IP Camera in 180 Degree Viewing Angle".

To Reproduce Steps to reproduce the behavior:

  1. sudo moonfire-nvr config 2>debug_apr_15_2023.log
  2. Click on cameras, click on new Reolink 180 entry
  3. Scroll down to "Test"
  4. See error containing "Unexpected RTSP Reponse": MediaHub_2023-04-15_21-05-29

Expected behavior Successful test result.

Screenshots Here's the configuration (screenshot in this Issue #268 EDITED and replaced to remove password): firefox_2023-04-16_18-37-28

Server (please complete the following information):

Camera (please complete the following information):

Desktop (please complete the following information): Not applicable -- using PuTTy for configuration

Additional context Add any other context about the problem here.

jlpoole@pi:/usr/local/src/moonfire-nvr $ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
jlpoole@pi:/usr/local/src/moonfire-nvr $ git log -n 1
commit 2667dd68cb823350859ecabc32f6f019e674070d (HEAD -> master, origin/master, origin/dev, origin/HEAD)
Author: Scott Lamb <slamb@slamb.org>
Date:   Sun Jan 8 04:07:17 2023 -0600

    CI/build improvements

    - use cache restore keys so that there's some caching even after deps
      change
    - don't install ffmpeg stuff that hasn't been needed in a while
jlpoole@pi:/usr/local/src/moonfire-nvr $

The camera does work with Reolinks software on Windows [7]. I was expecting two streams, one from each camera, but apparently the stitching of the image stream is performed on the unit and what is sent over the network in a merged image showing 180 degrees; the sidewalk appears in a U-shape.
Reolink_Client_2023-04-15_21-19-16

jlpoolen commented 1 year ago

I should note I am using an older Reolink Windows Client. I have just now tried installing their current version on Windows 7 and it abruptly fails to install with no error message or log. The software download site says their software is compatible with Windows 7.

Edit: I finally was able to install Reolink's current (4/15/2023) client software by uninstalling previous version 7 (but I was able to retain earlier 2018 version)

jlpoolen commented 1 year ago

I have a Wireshark log (isolated to just the problem camera) for a session of running config with 2 tests: main and sub, and then a log of just the main Test. Not sure how to convey the file and/or its contents and need instruction.

jlpoolen commented 1 year ago

Correction: On the "sub" URL, I had an error; I had "1" instead of "168". I corrected the URL for the sub and the test worked. However, the "main" still does not. This is a stitched video and I wonder if there may be a horizontal width limitation?

putty_2023-04-16_18-30-18

I also tried testing both URLs, main and sub, using VLC on Windows 7 and successfully connected and the video displayed.

Also, I have the "sub" checked to record since the test succeeded. Yet, when I run Moonfire-nvr thereafter and try the Live view, I get the error message saying see Issues #119 & #120.
firefox_2023-04-16_18-47-27

Perhaps it is assumed the main stream is set to record that is triggering this error message. In my case for this new camera, I do not have the "main" set to record since the test failed and if I run Moonfire-nvr, I get repeated error messages.

jlpoolen commented 1 year ago

I've had Moonfire-nvr running now for over 20 minutes with the configuration of saving the sub feed of camera Court180 when the main feed did not succeed in the test and is not checked for recording.

When I visit the recording page, no entries exist for the "sub" feed, so while the Test in the configuration states success, something is causing recording of the sub feed to fail.

I have specified "default" as the transport for the sub feed.

jlpoolen commented 1 year ago

I started reviewing the log as it flies by on the screen (in tmux) and realized I may not have properly set my disk space allocation for the sub and main feeds of the new Court180 camera. Turns out I did not specify a maximum, e.g. 2G, for either the sub or main disk space. I changed the configuration so 2G was allocated to each feed and restarted. Now there is showing saved videos for the sub feed and the Live view for the sub feed works (probably because Live view fees off what has immediately been saved).

So, at this point, getting the main feed to pass the Test seems to be the only issue I am facing. At least having the sub is helpful.

jlpoolen commented 1 year ago

This issue was filled with my "user" errors which is muddying the waters. I'm going to close this issue and start a new one dealing only with the "main" feed of the Reolink Duo camera. The fact that VLC can access the rtsp server for the main feed makes me think I must have some setting that is haunting me... like an additional underscore characters in the URL or whatever. I regret time people will have spent reading this issue.

jlpoolen commented 1 year ago

Ahah. The problem arises from the fact the Reolink has decided that 8 megapixel streams, i.e. "main", will be in H.265 and that "sub" streams will be in h264. I recall Moonfire does not support H.265.

From https://support.reolink.com/hc/en-us/articles/900000638523-What-s-the-Format-of-the-RTSP-Video-Audio-that-Reolink-Cameras-Use/ [I added the yellow highlighting.]

firefox_2023-04-16_20-17-28

I therefore will not be opening another Issue. My problem is that the new Duo camera requires H.265 support for its "main" feed and currently Moonfire-nvr does not support H.265

Edit: See Issue #33.