Live View [Experimental] - Works For Me

132 views
Skip to first unread message

John L. Poole

unread,
Aug 13, 2021, 9:56:12 AM8/13/21
to moonfire-nvr-users

I wanted to test the Live View [Experimental]  I am using Firefox on Windows and Linux.

When I selected a camera in the Live View mode, a blank dark screen would appear. i kept getting an error message at the bottom of the screen "WS 1006" which is a closed socket error message per Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

Live view requires that you configure a substream for the desired camera; I found this point in Scott's troubleshooting document at Live stream always fails with ws close: 1006.  

Substreams is a topic I am unfamiliar with.  I use Reolink cameras.  Reolink has an article about live viewing and suggested using a URL like this "Sub Stream: rtsp://admin:password@ip_address:554//h264Preview_01_sub" which differs from the URL I use for the "main stream" by the word "sub". 

I populated the sub streams for six cameras.  I specified a disk space "sandbox" and pointed all the substreams to "sandbox" and placed 5G limits for each feed on that directory.  It appears you have to activate the "record" feature in order to make the Live View work.  I am supposing that the "record" feature causes the stream to be cached so that the cache can be used for the live stream to whatever browser connects to moonfire-nvr.


I thought I would share the above generate interest and let it be known Live View and the error "WS 1006" can easily be overcome with a bit of knowledge and further configuration.

Questions I have:
  • okay to have mutliple cameras share the same subdirectory?  I normally devote a subdirectory to each camera.
  • is the approach to simply provide a cache area for live view, so choke down the space limits?  I tried 5T for each feed; is that too much?  Any suggestions on size of directory space use, possibly just a few minutes worth?
I really have wanted Live View and didn't know it.  I have been using Reolink's client on my Windows desktop, now with LiveView in Moonfire-nvr, I can monitor from my linux laptop and share the feed with other household member without having to install software on their machines.  This is great! 

Thank you, Scott.
--

John Laurence Poole
1566 Court ST NE
Salem OR 97301-4241
707-812-1323 office

John L. Poole

unread,
Aug 13, 2021, 11:03:18 AM8/13/21
to moonfire-nvr-users

And Moonfire-nvr is so much more timely:  3 seconds ahead of the Window Reolink client.  Here's a screenshot of the same feed pm a Windows 7 desktop with the reolink proprietary black box software on the right and the noble open source Moonfire NVR on the left.  Moonfire NVG is 3 seconds ahead of reolink.

I captured a Felony II theft (accused plead guilty) of a concrete saw from my contractor's truck, the entire event from the time the thief hopped out of his vehicle to the time he closed the door of the vehicle to proceed with his flight with his ill-gotten gains in hand was 28 seconds.  I submit 3 seconds might make a difference in the right circumstance.

Scott Lamb

unread,
Aug 13, 2021, 11:11:02 AM8/13/21
to John L. Poole, moonfire-nvr-users
On Fri, Aug 13, 2021 at 6:56 AM John L. Poole <jlpo...@gmail.com> wrote:

I wanted to test the Live View [Experimental]  I am using Firefox on Windows and Linux.

When I selected a camera in the Live View mode, a blank dark screen would appear. i kept getting an error message at the bottom of the screen "WS 1006" which is a closed socket error message per Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

Live view requires that you configure a substream for the desired camera; I found this point in Scott's troubleshooting document at Live stream always fails with ws close: 1006.  

Substreams is a topic I am unfamiliar with.  I use Reolink cameras.  Reolink has an article about live viewing and suggested using a URL like this "Sub Stream: rtsp://admin:password@ip_address:554//h264Preview_01_sub" which differs from the URL I use for the "main stream" by the word "sub". 

I populated the sub streams for six cameras.  I specified a disk space "sandbox" and pointed all the substreams to "sandbox" and placed 5G limits for each feed on that directory.  It appears you have to activate the "record" feature in order to make the Live View work.  I am supposing that the "record" feature causes the stream to be cached so that the cache can be used for the live stream to whatever browser connects to moonfire-nvr.

Yes, right now Moonfire only knows how to serve video from files on disk, even for live view, so you have to check "record". This is issue #120. Long story short, that limitation might go away as I'm restructuring recording and playback to add audio support.
 


I thought I would share the above generate interest and let it be known Live View and the error "WS 1006" can easily be overcome with a bit of knowledge and further configuration.

Questions I have:
  • okay to have mutliple cameras share the same subdirectory?  I normally devote a subdirectory to each camera.
Yes. I only have one sample file per drive.
  • is the approach to simply provide a cache area for live view, so choke down the space limits?  I tried 5T for each feed; is that too much?  Any suggestions on size of directory space use, possibly just a few minutes worth?
If you're only using the sub stream for live view, I think 1G should be enough.

But it can be handy in other ways too. It's a lower-bandwidth stream, so it's useful any time you're viewing remotely and/or multiple streams at once. When I expand the UI to support synchronized playback, sub streams are likely to be important there too.
 
I really have wanted Live View and didn't know it.  I have been using Reolink's client on my Windows desktop, now with LiveView in Moonfire-nvr, I can monitor from my linux laptop and share the feed with other household member without having to install software on their machines.  This is great! 

:-)
 


Thank you, Scott.
--

John Laurence Poole
1566 Court ST NE
Salem OR 97301-4241
707-812-1323 office

--
You received this message because you are subscribed to the Google Groups "moonfire-nvr-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moonfire-nvr-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moonfire-nvr-users/23010961-076d-a7de-d515-52142040de21%40gmail.com.


--

John L. Poole

unread,
Aug 13, 2021, 11:15:00 AM8/13/21
to Scott Lamb, moonfire-nvr-users

for posterity, there is an error in my first email of this thread: I wrote "5T" when I meant to write "5G" for the size specification of the sandbox drive.  5G is the amount I specified.

Scott Lamb

unread,
Aug 13, 2021, 11:19:11 AM8/13/21
to John L. Poole, moonfire-nvr-users
5G is pretty reasonable to use for live view only.

Here's how I have my cameras configured on my Pi4 (which has only one drive):
image.png

With just one sample dir, it's a lot easier to navigate the UI and shift capacity between streams.
Reply all
Reply to author
Forward
0 new messages