You are here

Streaming Camera Video on Mesh

8 posts / 0 new
Last post
AB4YY
Streaming Camera Video on Mesh

I finally found the best solution for me to stream video from cameras on the mesh.  One issue is most cameras stream with RTSP protocol and web browsers (Firefox, Chrome, MSIE, etc.) do not support RTSP.  That is a major bummer.

I used to advertise a link that can be used with a rtsp-capable player such as VLC or SMPlayer.  That worked however whoever wanted to see the video could not use their browser and would have to do additional steps like setup shortcuts for VLC for each particular camera to be viewed.  Sometimes it may be possible to have a browser associate a rtsp URL (rtsp://...) with the rtsp-capable player but I found that to be too difficult or not possible.

So my solution is to use a RPI (Raspberry Pi) and install the Linux video surveillance software called "motion".  Actually my current solution is even easier as I install "MotionEye" and follow the directions exactly in this link:

Install On Raspbian

Once installed and rebooted, a web browser can access the MotionEye management page which by default is the ip of the RPI and port 8765 (http://10.xx.xx.xx:8765/ -or- http://rpiname.local.mesh:8765/).   From there you can add/delete cameras as well as modify camera parameters.  If you find you can't do much, then you are probably logged in as a User and not Admin.

By default the first camera setup will allow viewing with a browser pointed at the RPI's ip address and on port 8081 (http://10.xx.xx.xx:8081/ -or- http://rpiname.local.mesh:8081/).  Additional cameras will be on the next port number (8082, etc.).

Adding USB cameras ("webcams") is also real easy, just plug the camera into a USB port on the RPI then go to the MotionEye management page to proceed with the install.  I've tried a couple of different USB webcams and the RPI (using the latest Raspbian - stretch) recognizes the camera plugged in right off the bat.

  • If you need to verify the USB camera is working at all you may want to install "cheese" as it is an easy to use camera viewing program that works well with USB cameras.

Also as a test, I was able to easily set up a Wyze Cam2 with MotionEye.  In that case, the Wyze which only has WiFi capability, was WiFi linked to one of my Ubiquiti node devices with a recent Nightly Build.  That node had it's "Mesh RF" turned off and was set up as a 'normal WiFi' (non AREDN Mesh) AP (access point).  FYI, the URL used in the MotionEye setup for my Wyze was: rtsp://WyzeCam1.local.mesh:8554/unicast   Also I should mention that I was not using the stock Wyze firmware but instead was using Xiaomi-Dafang-Hacks (https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks).

 

Anyway, we have had really good success with cameras on the mesh, even over links that are not super fast.  Hopefully the method I describe above will help others who want to add cameras or may be struggling with the rtsp dilemma.

73 - Mike ab4yy

AA7AU
AA7AU's picture
Jesse?

Thanks for a very detailed and instructive post. I've been waiting for someone to point me in the right direction on this. However I do note that "These instructions apply only to an up-to-date Raspbian Stretch" - All our Pi3B running Raspian are standardized on Jesse. Does anyone have this running on Jesse? I guess if you think this approach requires its own box, I guess we could add one more PI to our [growing] mix.

TIA,
- Don - AA7AU

AB4YY
The MotionEye site uses 'stretch' for their install

Don,

The MotionEye site uses 'stretch' for their install.  I don't think that means it won't work on 'jesse' and may be worth trying on a backed-up RPI.

Also, a brief search turned up this URL where they are using jesse but for me it was very easy to get tangled up and not working until I went to the exact instructions that I posted.  https://medium.com/@gonzalovazquez/raspberry-pi-and-motioneye-setting-up-your-own-video-surveilance-95444e0faad

Other Internet searches might be fruitful but again, I've had various issues until I went to the one I pointed to.  

As for running MotionEye on its own dedicated RPI, I suspect in most cases that is not necessary especially if you are using a RPI 3 as the three installs I did are.  Even a RPI 2 would probably be able to hose multiple servers.  The RPI3 I have here is running several 'servers' including BPQ, Apache, Droopy, Webmin and Netdata and all seems nice and speedy.  I can even go in remotely from this Windows PC using ​mRemoteNG and even the desktop remains lively.

- Mike ab4yy
 

n5mdt
I use OMXPlayer on Raspberry

I use OMXPlayer on Raspberry Pi. I have scripts for starting 4, 9, or 16 screens into a monitor for that Pi.

I also have a DVR that all the cameras are streamed into all the time for recording. Chrome connects to the DVR without using any add ins like VLC, etc.

All cameras a Ubiquiti UniFi G3
DVR is the older 500gb Ubiquiti DVR.

The scripts are described in the Ubiquiti Community Support Forums.  Whether it is over the mesh, lan, or wan it is all the same.


Mark
 

wa2ise
wa2ise's picture
I have an "AXIS" IP camera,

I have an "AXIS" IP camera, which can output in "Motion Jpeg".  That mode doesn't seem to demand a plug in when using Firefox to view its video stream.  But motion jpeg would be a bandwidth hog. 

If I (mis)understand the above, the idea is to convert the camera's video stream into a form that won't demand a plug in to be viewed on Firefox. 
That it's [camera]-->[raspberry_converter}--->[local AREDN node]--->[AREDN network]--->[user's AREDN node]-->[user computer running Firefox]-->[seeing the video without having to install some plugin]. 

AB4YY
I also have an old Axis (

I also have an old Axis (​M1011-W) on the mesh and as you say, it doesn't need anything special to bring up video in a browser.  But, most of the newer cameras don't work like that and provide a rstp:// URL for the video stream.  My goal was to make it easy for the Users.  So if they see a camera link on my Node Status as an advertised Service, they can just click on it and the video will show up in their browser.  The only other way would be for them to mess around with another (non-browser) program (VLC, etc.) to bring up the video.

At the present I have 2 cameras on the mesh from here.  One is the Axis and another is a newer one that does rtsp.  Even though the Axis doesn't need the 'MotionEye' program to serve out the rtsp video, I went ahead and also added it to MotionEye just to keep it standard.  For a short period of time my node showed 2 hyper links just for the Axis camera where one was the direct jpeg video as you mention and the other was the video served from MotionEye.  For simplicity, I removed the jpg one.

  • By the way, just a reminder regarding removing or changing an advertised Service on the mesh: Once I removed the service and did the Save in the node and verified the service was gone from my node, I had to shutdown power for my node for about 10 minutes to clear out that advertised service from other nodes in the network.  If I didn't do that, on other nodes Status for my node, that old service would remain even though the hyperlink would not work.

Another interesting thing I tried was to have the RPI here (MotionEye) pull video from a distant RPI and serve it (re-serve?) here with MotionEye.  I briefly tried that as a test and it worked nicely but that was only a real brief test as that wasn't my goal.  Also I wonder if in that case I would be creating extra mesh traffic as that distant traffic would have to come to my node before going to any other user.  It seems to make sense for the MotionEye server to be located at the location of the cameras but I don't know if that is imperative.

Oh, back to your original question, I could never find any rtsp plug-in for any of my browsers.  In the past, I have spent a lot of time on trying to get a browser to show rtsp and my conclusion is they can't.

- Mike ab4yy

n5mdt
Mine is more like this:

Mine is more like this:

Location 1
Mesh Node connected to VLAN Switch (below)

VLAN Switch Port 1 -> Mesh Node
VLAN Switch Port 2 -> DVR
VLAN Switch Port 3 -> RPi -> Monitor
VLAN Switch Port 4 -> User Computer with Firefox pointing to DVR
VLAN Switch Port 5 -> Camera 1
VLAN Switch Port 6 -> Camera 2
VLAN Switch Port 7 -> Camera 3
VLAN Switch Port 8 -> WAN


Location 2
Camera 4 -> Mesh Node -> Mesh

Location 3
Camera 5 -> Mesh Node -> Mesh

Location 4
Camera 6 -> Mesh Node -> Mesh

ETC.


From any place on the mesh a users computer can access the DVR with Firefox and see any/all cameras. And, with the proper forwarding on the Location 1 Mesh node a link can be placed to the DVR. (Ubiquiti really favors Chrome. Other DVRs may use other browsers better.)


I hope that is correct...
Mark
 

wa2ise
wa2ise's picture
[quote]

[quote]

  • By the way, just a reminder regarding removing or changing an advertised Service on the mesh: Once I removed the service and did the Save in the node and verified the service was gone from my node, I had to shutdown power for my node for about 10 minutes to clear out that advertised service from other nodes in the network.  If I didn't do that, on other nodes Status for my node, that old service would remain even though the hyperlink would not work. [/quote]

I see this as well.  I have to reboot my nodes to flush out the old dead advertised services.  Just refreshing the "mesh status" page doesn't do it.  Guess it's a bug, but once you know the workaround, you learn to live with it.  Let the software guys worry about more important issues...  Another "bug" I found  another workaround for (someone on this board mentioned this): Seems that the "mesh status" page can get really slow to load, but if you pair the node in question with another node via RF, this problem goes away. 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer