How do I configure Firefox/Linux/VLC to work?

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
HikVision 7716NI & 2142FWD cameras.

As noted in many posts, when connecting with a non-IE browser one cannot use Live View or Playback.

Connecting to a camera from Firefox in Linux offers choice of VLC and Quicktime in addition to WebComponents (presumably Win only). With VLC installed I guess I need some kind of plugin also, but would it even work?

I found one post from last year mentioning VLC but no details.

Is anyone here using a browser on Linux that works with live view?
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
Thanks, I need to look at that more carefully. When I select VLC I get the following in a non-stop loop:

VLC could not connect to "people.videolan.org:5554".
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://people.videolan.org:5554/storewars3'. Check the log for details.
Connection failed:

It doesn't work with SMplayer either but at least you gave me some ideas. Not sure if I want to try to build a web page but it seems like a good idea.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
see if you can get an RSTP stream from your camera playing directly in the native VLC client, once you have that URI working make an .html page with:
Code:
<html><body><embed type="application/x-vlc-plugin" target="rstp://username:pass@yourstreamurlhere"></embed></body></html>
and see if that works.
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
see if you can get an RSTP stream from your camera playing directly in the native VLC client
Great, thanks! I tried getting to the stream earlier today and wasn't having any luck. The camera's are on private subnet and the NVR handles the linking via it's 'virtual host'. So trying to connect with rtsp://admin:MyPassord@192.168.1.20:65003/Streaming/Channels/1?tcp doesn't work (65003 is port for camera #3). Neither does replacing the camera port with 554 or even :65003:554 which seemed a bit far fetched but worth a try.

I suspect that the virtual host passthru is what my problem might turn out to be. Maybe I need to check some settings in the NVR but since iVMS4200 works on my XP laptop I figure the NVR settings are good.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
As you've got Virtual Host available and enabled, you should be able to reach the cameras directly if your network gateway is told to route the packets via the NVR LAN interface IP address.
Enabling Virtual Host activates Linux kernel 'ip_forward' between the NVR LAN and PoE interfaces.
Assuming the NVR PoE interface is the 192.168.254.0/24 network, adding a temporary route to the PC for testing, or, better, adding a route to the LAN router/gateway should work OK:
Route add for net 192.168.254.0/24 via gw 192.168.1.20 (if this is your NVR LAN interface address).
The other thing you will need is for the cameras on the PoE ports to have their default gateway set to the NVR PoE interface IP address, usually 192.168.254.1
To do this, you'd need the PoE channel set to Manual instead of Plug&Play.
The NVR firmware usually sets the NVR LAN interface default gateway on the PoE connected cameras, not sure why. That breaks the ability of the camera to get out of the PoE network.
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
As you've got Virtual Host available and enabled, you should be able to reach the cameras directly if your network gateway is told to route the packets via the NVR LAN interface IP address.
Yes, I can reach the cameras. I can access their web interface with Firefox (Linux), except for the video feed, which gives the well known missing plugin message. I started this thread because I noticed the live feed has a drop down that included VLC. I was hoping that was a key to making it work. I have also now discovered that I do not have a FF plugin for VLC. I haven't sorted that out yet, perhaps with the latest security updates to FF it is no longer available. But as Nayr pointed out, it may be possible to develop my own web page to allow VLC (and perhaps other video players?) to function. That will take some time to research, mostly because I'll have to learn Apache (I think).


Route add for net 192.168.254.0/24 via gw 192.168.1.20 (if this is your NVR LAN interface address).
Since I can already access the camera's from FF with 192.168.1.20:6500x where x is a camera number, is the above necessary? I tried to ping the private subnet and it doesn't work, of course, because there is no route. I'll play with that method and see if I get anywhere, it sounds promising. It's been awhile since I looked at the settings for my routing tables.

The NVR firmware usually sets the NVR LAN interface default gateway on the PoE connected cameras, not sure why. That breaks the ability of the camera to get out of the PoE network.
But isn't it getting out since I can access the camera web interface except video via FF? Or again, am I misunderstanding what you are advising? And isn't iVMS4200 (or is it 4500?, I forget) which I have working on a seldom used XP system showing that it is getting out? Or is that a different issue entirely.

Anyway, thanks for the great tips, both you & Nayr have given me some good info to work with.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
Since I can already access the camera's from FF with 192.168.1.20:6500x where x is a camera number, is the above necessary?
Not necessary if Virtual Host works OK for you.
The difference is that Virtual Host is a high-level facility of the NVR where it 'proxies' the camera HTTP port for use by the browser.
The spin-off method I described is where the Linux kernel in the NVR simply routes network traffic between the NRV LAN and PoE interfaces, so the access isn't limited to camera HTTP ports.

Below is an example of Firefox in Linux Mint directly accessing a camera on a PoE port on an NVR - not using Virtual Host. Check out the camera IP address.
Live View works with both the VLC and Quicktime plugin selection.
cam44.jpg
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
I've added the route to my network gateway. I changed the gateway of a single camera to the NVR. I can still see that camera in the NVR and but I have the same result with LiveView that I was getting before. See attached. I can ping that address.

I presume my issue now is the plugin. I'm using FF v45.0, I don't have an explict add-on nor can I find one in Mozilla's search (tried VLC & QT).

Where did you get the vlc & qt plugin's and what are their exact names?

camera1.jpg
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
If you can ping the PoE-connected camera, that's good.

The VLC in use is the standard Linux distribution, installed with:
sudo apt-get install vlc
FF add-ons as follows:
mint_1.jpg

And the quicktime plugin:
mint_2.jpg
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
OK, thanks. I am using openSuse and there are no FF add-ons in the repositories. Maybe there is a different repo that I need to find. I'll have to check around the Suse forums.
The install of VLC didn't seem to have a plugin included. Maybe I missed something, I'll need to check it more carefully

I also tried opening the stream directly from VLC, rtsp://admin:MyPass@192.168.254.3:554
I get error "VLC is unable to open the MRL 'rtsp://admin:MyPass@192.168.254.3:554"


 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
it seems the VLC plugin has not been officially picked up since they released VLC2, mac is missing it entirely.. but the code is there, so for linux its going to depend on your package maintainer.. if the OP is running a Debian he might still be on VLC1
 

username

Getting the hang of it
Joined
Feb 7, 2016
Messages
116
Reaction score
18
it seems the VLC plugin has not been officially picked up since they released VLC2, mac is missing it entirely.. but the code is there, so for linux its going to depend on your package maintainer.. if the OP is running a Debian he might still be on VLC1
Thanks alastair & nayr. I finally got the plugin, it's not available in the normal openSuse distro, I believe it has to do with codec's & copyright in the USA. It is available from a multimedia distro in Europe. So I have just installed 'npapi-vlc' and it works!!

Unfortunately, apparently it will not work accessing the NVR Live View, I guess the NVR will only work with WebComponents.
So to view multiple cameras, I need to open each camera in a new tab.

It's doable and better than running my laptop separately.
Thanks again for seeing me through this.
Jon
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
It is available from a multimedia distro in Europe. So I have just installed 'npapi-vlc' and it works!!
Hey, well done for persisting and (mostly) getting there.
You'd think the same methods would be used to do the same things between the cameras and NVRs.
But I suppose the separate development teams have a bit of a not-invented-here syndrome!
 
Top