0
Answered: Discussion Open

Swann NVR camera feeds using VLC to transcode.

edmond 5 years ago in Media Tiles / Video Camera Feeds updated by westyscott1 3 years ago 8

i have a swann nvr8000 with 4 4k cameras and 2 4mp ptz's running on onvif on the nvr, 6 channels in all. im using vlc to transcode the 6 rstp channels from the nvr into an http mjpeg feed, ive added the transcoded feeds to my media in actiontiles, but im only able to see the feeds in windows running firefox, no other browser and os seems to pull up the feeds on the tiles, which is a real bummer because i had a fire hd10 ready to wall mount, now it looks like i need to go with a windows based wall tablet. ive read through a bunch of posts regarding the user:pass part of the rstp url causing problems with various browsers, but does that still apply if im letting vlc handle the rstp url and im using the http that vlc spits out. if anyone has any suggestions or troubleshooting ideas, id love to sort it out.

here are some technical details for anyone interested in the nvr configuration

swann nvr8000 rstp format is rtsp://192.168.1.199:1085/Streaming/Channels/102 (change ip and port to match yours.102 is channel 1 (02) substream 101 for channel 1 (01) mainstream. 201, 202 and so forth.

the code to transcode in vlc commad promp is below (replace bold sections with your details)

vlc.exe -R rtsp://user:pass@192.168.1.199:1085/Streaming/Channels/102 --sout "#transcode{vcodec=mjpg,vb=2500,scale=1.0,fps=10,acodec=none}:standard{access=http{mime=multipart/x-mixed-replace; boundary=7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/videostream.cgi}

the resulting http that vlc generates is http:// ip adress of device running vlc:8888/videostream.cgi

so mine was http://192.168.1.164:8888/videostream.cgi this is the url i input in my media for the tile

bonus points if you forward port 8888 and then use your ddns service if you want to use out of local network, i use dyndns and works great

Answer

PINNED

Always great to hear back from staff, a co-founder none the less, i think its awesome that you find the time to engage with your users.

All the devices and hardware that are associated with this setup all run on the same LAN, even though i can reach the

http://192.168.1.164:8888/videostream.cgi from outside with my ddns using the 8888 port forward, i kept things simple and kept it in-house so to speak.

So, this morning i came back to my setup to mess around with it a bit more after i read your reply. i noticed the frame rate on the vlc code was set to 10 frames per second, i decided to play around with it and switched it to 15 fps, and just like that, the tiles are showing the live stream, all six, including the ptz's running on onvif on the nvr. so that's great news. not sure why some browsers don't like the 10fps, but that seems to have done the trick. i now got it working on just about all browsers and devices including Fully with 192.x.x.x and with my ddns. the only browser that's still giving me a hard time is windows/ie, its prompting me to either run or save videostream.cgi instead of just streaming the camera, i clicked save and it will sit there and download at a constant download speed, the file just gets bigger and bigger but no video is displayed.

Waiting for Customer

Thanks for this write-up, Edmond.

I've read through a bunch of posts regarding the user:pass part of the rstp url causing problems with various browsers, but does that still apply if im letting vlc handle the rstp url and im using the http that vlc spits out.

No. The "user:password@address" is only blocked if that is in the embedded URL (i.e., the URL inside the Media Tile definition). Some browsers will also block non-SSL content (i.e., you need to serve over https://, not http:// - but actually, I've found that problem is usually on desktop not mobile).

So this format should be compatible with the Fire Tablet if on the same LAN with no firewall or VLAN blocking the server:   http://192.168.1.164:8888/videostream.cgi

Did you test this exact format of URL in the URL bar of Silk? How about as the Start URL of Fully?

What happens in desktop/Windows Chrome? If it doesn't work there, use F12 to view the Browser Debugger - Console pane to see what error is occuring.

PINNED

Always great to hear back from staff, a co-founder none the less, i think its awesome that you find the time to engage with your users.

All the devices and hardware that are associated with this setup all run on the same LAN, even though i can reach the

http://192.168.1.164:8888/videostream.cgi from outside with my ddns using the 8888 port forward, i kept things simple and kept it in-house so to speak.

So, this morning i came back to my setup to mess around with it a bit more after i read your reply. i noticed the frame rate on the vlc code was set to 10 frames per second, i decided to play around with it and switched it to 15 fps, and just like that, the tiles are showing the live stream, all six, including the ptz's running on onvif on the nvr. so that's great news. not sure why some browsers don't like the 10fps, but that seems to have done the trick. i now got it working on just about all browsers and devices including Fully with 192.x.x.x and with my ddns. the only browser that's still giving me a hard time is windows/ie, its prompting me to either run or save videostream.cgi instead of just streaming the camera, i clicked save and it will sit there and download at a constant download speed, the file just gets bigger and bigger but no video is displayed.

Answered: Discussion Open

Glad to hear of some success, Edmond.  It certainly is odd that a faster frame rate would make a difference, but who knows what underlying mechanism is getting quirked up.

As for Internet Explorer:  IE has always done many things differently than Chrome & Firefox. I can only presume the "save as" behavior is IE not conforming to the standards followed by Chrome & Firefox, and since those are leading browsers, we recommend just not using IE for ActionTiles.

Thanks,

...Terry.

I also have a Swann camera system, however I am new to this and did not understand what you did to get it to work. If possible, could you simplify it for a novice and list step by step how you were able to accomplish this? Thank you for your help.

sorry for the super late response, kinda put this project on the shelf for a while, finally have some time to tinker with it again. So, where do we begin, do you have a working rtsp url on vlc from the swann nvr?

try the following format on vlc (file-open network location)

rtsp://user:pass@ip:554/Streaming/Channels/101

rtsp://user:pass@ip:554/Streaming/Channels/102

you're gonna replace user:pass@ip with your nvrs info /101 is gonna be channel 1 high res feed and /102 is gonna be your secondary feed, same feed you get on your phone if you use swanns mobile app for remote view, i would recommend you probably use the 02 for whatever channel you want to add, the high resolution is nice but it will likely not play smoothly


let me know if you follow this far and if you have success on vlc playback

hi all, 

I have a working rtsp feed from my swann Dvr. It works perfectly  in vlc. I'd like to create a tile in actiontiles to show the live feed ( same as above) .

can any one help I'm not tonsure on the instructions in this post as I'm new to it .

basically, you will need to have a pc running vlc in the background at all times open a command promt on the windows pc and navigate to vlc directory by typing in the following cd C:\Program Files\VideoLAN\VLC after copy the code below and paste in word or notepad

vlc.exe -R rtsp://user:pass@192.168.1.199:554/Streaming/Channels/102 --sout "#transcode{vcodec=mjpg,vb=2500,scale=1.0,fps=10,acodec=none}:standard{access=http{mime=multipart/x-mixed-replace;boundary=7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/videostream.cgi}

do not just paste my code in the command promt, you need to change the bold sections first like substitute user for your  nvr user name and pass for your password and also the 192.168.1.199 ip for your nvrs ip address port 554 will likely be the same unless you changed the defaults, after you've made all those changes in notepad then you can copy and paste the whole code in command prompt and hit enter, if all is well vlc should start up and begin transcoding the feed, you can then access the feed at the following address http://xxx.xxx.x.xxx:8888/videostream.cgi  replace the xxx's with the ip address of the pc running the vlc session that is the url you need to enter in action tiles media should the pc running vlc be turned off or the vlc sessio closed, the feeds will not work

edited to add that for multiple feeds you need to change the "8888" port number to a unique number for each feed so for example 8888 is front door, for back door you need to change the port to 8889 for example on both the command prompt code and the output http stream

hope this helps

-ed

Hi edmond,

Sorry for late reply just got round to trying this. I've followed your guide and i can access the feed on my PC browser by using the machine ip address   http://xxx.xxx.x.xxx:8888/videostream.cgi

but when i build the media tile it still does not work?? any ideas 


could this be a fire wall issue?