IP Cam Talk

Welcome to the new IPCT! If you are having an issue logging in, please clear your cookies / cache.

How to view Dahua cameras without browser plugins

tangent

IPCT Contributor
Browser plugins are going the way of the dodo so how can I view/setup my cameras?

Good news, newer cameras and firmware updates for some cameras and NVRs no longer depend on Dahua's plugins. Unfortunately some now depend on Adobe Flash Player, which Adobe plans to kill in 2020. If your camera depends on flash, use a browser like Google Chrome that has an always up-to-date version of flash built in. Firmware dated 8/2018 or newer may work without plugins or with flash. If you've got a newer device or a recent firmware update, try your favorite browser then try another browser to see what works before you go too far down the rabbit hole of other options for making the dahua plugins work.

If you use Blue Iris or other VMS software with an HTML5 interface 95% of the time, you'll be using that software and won't have to worry about what the cameras support. In this scenario, you only need to access the cameras directly to occasionally change some settings on the cameras

Be careful if you attempt to update the firmware on your devices.
While firmware updates generally fix bugs and sometimes add features, sometimes features are removed or new bugs are added. Don't just update all of your cameras to the latest firmware, search out information regarding that fw version and test it on a single camera for at least a few weeks before you deploy it to multiple cameras! Be especially careful when updating the firmware on large PTZ cameras!

Browser plug-ins are generally awfully coded monstrosities full of security vulnerabilities, so it's a good thing most browsers are dropping support. If you keep a browser with plug-in support, I suggest only using it for your cameras or only allowing plugins to run on the pages for your cameras.

If you're having problems, please include the camera model, firmware versions, browser version, and if applicable the plugin version in your post.

Some recent threads discussing this in more detail:
Dahua camera web interface - OS support, plugins in 2018
Safari plugin for Dahua IPCs.
Dahua Web plugin has stopped working in Firefox


View your cameras that use plugins on windows using:
  • Internet Explorer 11
  • Pale Moon 32-bit (you need 32-bit because the plugins are 32-bit)
  • If pale moon gives you problems try other browsers you've never heard of like Basilisk (pale moon fork) and Midori that still support plugins
  • Use The chrome NACL Web Plug-in chrome app
    • Google plans to kill these native client chrome apps too, but there might be a fork of chromium that maintains support... time will tell.
    • How do I use this?
    • Go to chrome://apps
    • Click NACL Web Plug-in
    • A new window will appear that looks a little different, load your camera / nvr's webpage
    • It's generally a bit awful and prone to memory leaks.
    • upload_2018-5-18_20-35-28.png
  • SmartPSS - you may have some issues if your text scaling is set to something other than 100%
But I use linux (I haven't tested these):
  • On linux, your best option that doesn't require a VM or WINE is to use Google Chrome and the NACL Web Plug-in chrome app (see windows section). I think this works in linux, but haven't tested it.
  • Open the video stream in VLC or similar software
  • Use VMS software that works in linux like veyesys | Video Management Platform
  • You may want to try running SmartPSS in WINE

I use a mac, I think different:
  • It's official, Safari 12 is out and has dropped plugin support.
  • Safari 11 still supports browser plugins, but you may have to whitelist the plugin.
    • On a mac plugins are generally stored in ~/Library/Internet Plugins or /Library/Internet Plugins to find these folders you'll need to use the Go menu or hit command-shift-g
    • Safari is supposed to drop plugin support this year
    • Your cameras must be set to use H.264 codecs not H.265, smart codec must be off
  • Firefox ESR 52 can be made to work with plugins. oddly, yes the 64 bit version works. Disable automatic updates!
    • You might have to change a setting in about:config
    • I recommend you rename the Firefox ESR app so you can tell it apart from the regular version, renaming it Firefox ESR.app instead of Firefox.app would be a good choice. This way you can still use the current version of firefox if you want, but probably not at the same time without some extra effort. You also could run into some profile compatibility issues if you're running different versions of firefox, there is a workaround but it's a little messy.
  • the chrome NACL plugin app works (see windows section above)
  • Use SmartPSS

Troubleshooting Plug-in Issues

Start by going to
Code:
about:plugins
this will make most browsers show information about plugins that are installed.
here's the dahua plugin in palemoon:
upload_2018-5-24_22-25-44.png
Different devices (cameras / nvrs) and different firmware versions often require different versions of the plugins. This can get pretty messy.
Always try simple things like quitting and reopening the browser or rebooting your computer.


BUT I WANT SOMETHING THAT DOESN'T REQUIRE A PLUGIN AT ALL!

Well, you can use Dahua's Smart PSS software. I works pretty well but does have a few bugs.
you can get it for Mac OS X and Windows here: Dahua Wiki

Some VMS software you can use to record your cameras can re-stream or transcode the stream to a format like HLS which modern web browsers support. Blue Iris can do this using the UI3 webserver. There are even some open source vms that can do this.
HLS typically adds about a 1 second delay.

You can also view the video stream using software like VLC or TinyCam (android) that can view the RTSP stream.
The stream address is formatted like this:
Code:
http://192.168.1.108/cgi-bin/realmonitor.cgi?action=getStream&channel=1&subtype=0
Substitute your camera's ip address
Change the channel number to view other cameras on an NVR
Change the subtype to switch between substreams.  0 = main, 1 = sub stream 1, 2 = sub stream 2.

You can add user:password@ to the beginning of the stream URL right after http:// if desired
NOTE: Newer firmware default to using digest authentication which may not be compatible with some software.
Your camera may have the option to change the type of authentication used for the rtsp stream.
More information can be found in the HTTP API Documentation

To view a camera in VLC choose "Open Network Stream" in the media menu. Then enter your stream URL. If VLC gives you any trouble click "show more options" and set caching to something like 200-500 ms which will add a slight delay to the video but will fix most issues.
upload_2018-5-18_18-0-48.png


BUT I WANT SOMETHING DIFFERENT!

Well, the good news is Dahua appears to be working on HLS video support.
The bad news is it will probably be a while and will likely find its way to new products first if it makes it to the old ones at all.

upload_2018-5-18_21-8-18.png


But I want a way to quickly view my camera in a browser that doesn't support plugins anymore!

Good news, there's an easy way to do this too using a bookmarklet. I wrote two simple bookmarklets that provide a simple fallback you can use if your browser doesn't support plugins. They are very simple, one displays a snapshot that reloads if you click it and the other displays an mjpg feed.

Limitations:
  • You can't define IVS or motion detection rules
  • No audio
  • No playback of recordings, live view only
  • Can't easily display multiple cameras (not very useful on NVRs)
  • Browser snapshot and record buttons don't work
  • Can't make the mjpeg or snapshot full screen at this point
  • Lower quality than using SmartPSS or VLC
  • Lots of other things I forgot to mention.

What's a bookmarlet? Bookmarlets are bookmarks that contain javascript instead of a link to a web page and modify the current page. They can be extremely useful. You can use them to do things like apply a dark theme to a website, reformat a website for easier printing, autofill a TPS report, generate a random password, or in this case display your cameras without plug-ins. More info here: Use bookmarklets to quickly perform common web page tasks | Firefox Help

To create a bookmarlet, make a new bookmark then edit the location and name of the bookmarlet. In chrome, copy the java script code, right click on your bookmark bar and choose add page. Then edit the name, keep it short, paste in the code from one of the code blocks below and save.
upload_2018-5-18_18-15-9.png

MJPG Bookmarlet:
Enable substream 2 and set it to mjpg 720p in order to use this. The video quality of MJPEG isn't as good as the normal RTSP stream.
Code:
javascript:(document.getElementById("video").style.background = "url('cgi-bin/mjpg/video.cgi?channel=1&subtype=2') 50% 50% / contain no-repeat rgb(0, 0, 0)")();
Didn't work? You have to enable substream 2 and set it to mjpeg as directed. Not all cameras support 2 substreams and some only support mjpg at lower resolution (which still works, it just looks worse). Modify the code if required (eg. change subtype=2 to subtype=1 and you'll get substream 1).

Snapshot Bookmarlet:
Display a snapshot using this code, click the image to reload the snapshot. This one's a little uglier to read as it contains % encoded characters
Code:
javascript:(function()%7Bvar vidDiv %3D document.getElementById("video")%3B function loadSnapshot()%7B%09vidDiv.style.background %3D "url('cgi-bin%2Fsnapshot.cgi%3F" %2B new Date().getTime() %2B "') 50%25 50%25 %2F contain no-repeat rgb(0%2C 0%2C 0)"%3B%7D loadSnapshot()%3B vidDiv.addEventListener("click"%2CloadSnapshot)%7D)()

Dahua should really implement something like this when plugins fail to load. These bookmarklets are pretty simple but might need some modification for your specific use case. You could also convert this to a userscript to make it run automatically.

How do I use the bookmarlet after I've created it?
Simply load the camera's page then click the bookmarklet. The snapshot one adds a cache busting timestamp to the url and reloads the snapshot when you click the image.

Code:
//Snapshot version without % encoding (won't work without encoding) for easier reading
var vidDiv = document.getElementById("video");
function loadSnapshot(){
    vidDiv.style.background = "url('cgi-bin/snapshot.cgi?" + new Date().getTime() + "') 50% 50 / contain no-repeat rgb(0, 0, 0)";
}
loadSnapshot();
vidDiv.addEventListener("click",loadSnapshot);


// % encoded version of the mjpeg one in case your browser can't handle the non-encoded version
javascript:(function()%7Bjavascript%3A(document.getElementById(%22video%22).style.background%20%3D%20%22url('cgi-bin%2Fmjpg%2Fvideo.cgi%3Fchannel%3D1%26subtype%3D2')%2050%25%2050%25%20%2F%20contain%20no-repeat%20rgb(0%2C%200%2C%200)%22)()%7D)()
hikvision
 
Last edited:

Engee

Young grasshopper
ive tried to use chrome on my mac, and the easy viewer exrension installed. looks the same as your nacl plugin.
 

Francisco73

Getting the hang of it
On linux, your best option that doesn't require a VM or WINE is to use Google Chrome and the NACL Web Plug-in chrome app

I have tried to use Chrome and Slimjet. Cannot find NACL or IE tab plugin. Easy View app can be installed but does not work. Have Mint 64 bit latest version.
 

tangent

IPCT Contributor
On linux, your best option that doesn't require a VM or WINE is to use Google Chrome and the NACL Web Plug-in chrome app

I have tried to use Chrome and Slimjet. Cannot find NACL or IE tab plugin. Easy View app can be installed but does not work. Have Mint 64 bit latest version.
I haven't actually tried to use the NACL web plugin in linux. I suggested to someone in another thread and I believe they got it to work.
 

Francisco73

Getting the hang of it
I have some questions about the "messy plug ins". Does each camera require a plug in of its own or one plug in is enough for each camera model? Some days ago I tried to install plug ins in IE for four Dahua 4431s and one Dahua Starlight. Was not asked to install five plug ins but maybe three of them. Anyway the install attempt was unsuccessful since the plug ins were rejected for security reasons. The 4431 of course has hacked firmware. Does a safe plug in for this model exist or is it totally unknown territory? Thanks.
 

tangent

IPCT Contributor
I have some questions about the "messy plug ins". Does each camera require a plug in of its own or one plug in is enough for each camera model? Some days ago I tried to install plug ins in IE for four Dahua 4431s and one Dahua Starlight. Was not asked to install five plug ins but maybe three of them. Anyway the install attempt was unsuccessful since the plug ins were rejected for security reasons. The 4431 of course has hacked firmware. Does a safe plug in for this model exist or is it totally unknown territory? Thanks.
Different cameras and nvrs can require different plugins. If you can update cameras such that the "WEB Version" displayed on the info page of the cameras/nvrs is the same you can generally reduce this mess.
 

adamg

Getting the hang of it
The most fun is, even if using something plugin-friendly like Win7 and IE11, it seems that:
a) every Dahua camera and every firmware version on that camera uses a different version of the plugin;
b) some Dahua camera-versions conflict with other Dahua camera-versions, so if you want to view one, then the other, you have to install each camera's plugin every time you view it, and you can't view them at the same time
 

tangent

IPCT Contributor
The most fun is, even if using something plugin-friendly like Win7 and IE11, it seems that:
a) every Dahua camera and every firmware version on that camera uses a different version of the plugin;
b) some Dahua camera-versions conflict with other Dahua camera-versions, so if you want to view one, then the other, you have to install each camera's plugin every time you view it, and you can't view them at the same time
Yep the plugins suck. If you can keep all your cameras on firmware the has the same "WEB Version" as shown on the info page you can generally make things work alright. I dug into the Mac OS X plugin a while ago and found a bunch of typos that were causing plugin detection issues.

I haven't taken the time to mess with it, but I've thought about playing around in js to see if I could expand plugin version compatibility.
 

Francisco73

Getting the hang of it
Thank you for your reply. I have not spent much time on this and even less with a Windows PC since I do not have one. I have several old PCs with Linux and they are not "fit" for Wine, Virtual Box or Windows. The best advice so far has been to arrange a modern Windows machine and install PSS or Blue Iris.

I think that upgrading firmware in my case is difficult and may brick my hacked cameras and/or the NVR.

For what it is worth: some things that the NVR does not have like adjusting camera settings can be achieved with latest 64 bit Linux Mint based Firefox. Chrome, Slimjet and Opera with Mint and my two attempts with borrowed IE did not get me that far. IE with Wine crashed and Virtual Box did not install due to a dependency problem.

The more I mess with this the less the new Starlights co-operate.

What is "js"?
 

Francisco73

Getting the hang of it
The most fun is, even if using something plugin-friendly like Win7 and IE11, it seems that:
a) every Dahua camera and every firmware version on that camera uses a different version of the plugin;
b) some Dahua camera-versions conflict with other Dahua camera-versions, so if you want to view one, then the other, you have to install each camera's plugin every time you view it, and you can't view them at the same time
Can these problems be avoided by using PSS or BI? Any idea?
 

Francisco73

Getting the hang of it
javascript, i was just pondering if some of the plugin incompatibility issues between plugin versions could be smoothed out client side using javascript (inevitably breaking some functions).
Everything is possible with time, money and reasonable IQ. Have you any experience of stuff that works with Linux like Kerberos and Xeon? I have understood that Zoneminder can be challenging.
 

tangent

IPCT Contributor
Everything is possible with time, money and reasonable IQ. Have you any experience of stuff that works with Linux like Kerberos and Xeon? I have understood that Zoneminder can be challenging.
There are better linux options than zoneminder. I know my way around linux, but haven't used a linux desktop regularly in a while.

A Xeon CPU generally isn't the first choice for video recording. Hardware graphics acceleration generally isn't available, but not all software supports that. Generally a Xeon to record security cams will just waste electricity compared to other options. If you do set up a pc to record your cameras, don't build, buy a cheap refurbished 6th, or 7th gen i5 or i7.

This is a good list of lots of different VMS: Free VMS Software Directory
 

Francisco73

Getting the hang of it
Can these problems be avoided by using PSS or BI? Any idea?[/QUOTE
There are better linux options than zoneminder. I know my way around linux, but haven't used a linux desktop regularly in a while.

A Xeon CPU generally isn't the first choice for video recording. Hardware graphics acceleration generally isn't available, but not all software supports that. Generally a Xeon to record security cams will just waste electricity compared to other options. If you do set up a pc to record your cameras, don't build, buy a cheap refurbished 6th, or 7th gen i5 or i7.

This is a good list of lots of different VMS: Free VMS Software Directory
Thanks. I found yesterday a list of 6 Linux based options but in my usual way did not save the link. There was one for older PCs with only 1 gb ram. If I had a way to power one camera without the NVR I would try. I also found that you have in another thread posted links to learn about IP basics. Do you have that information easily available? If not I can search for it again and yes I should finally start to keep better records of what I find.
 

105437

Getting the hang of it
I'm trying to use the ESR version of Firefox on my Mac to login to my Dahua cameras and adjust things. How do I get the webplugin working so I can see lice previews while logged into the camera? Thanks!
 

TonyR

IPCT Contributor
I'm trying to use the ESR version of Firefox on my Mac to login to my Dahua cameras and adjust things. How do I get the webplugin working so I can see lice previews while logged into the camera? Thanks!
I suggest you instead try the 32 bit version of Palemoon, here.
 

tangent

IPCT Contributor
Looking for something to run on my Mac. Looks like Pale Moon is PC or Linux. Thanks for the reply.
Your best options are (as explained at the start of the thread):
  • Record your cameras using a pc running vms software that has a webserver that uses hls or webrtc and will display on any modern device
  • Use Firefox 52 ESR and the dahua plugin (this may be difficult in Mojave).
    • Code:
      about:plugins
      is the place to start your troubleshooting
  • Use the Chrome app
 

105437

Getting the hang of it
Your best options are (as explained at the start of the thread):
  • Record your cameras using a pc running vms software that has a webserver that uses hls or webrtc and will display on any modern device
  • Use Firefox 52 ESR and the dahua plugin (this may be difficult in Mojave).
    • Code:
      about:plugins
      is the place to start your troubleshooting
  • Use the Chrome app
Thanks @tangent. I can view the cams via the webserver on BI. What I'd like to do is be able to log into the camera UI from the Mac and see the image previews etc.
 

tangent

IPCT Contributor
Thanks @tangent. I can view the cams via the webserver on BI. What I'd like to do is be able to log into the camera UI from the Mac and see the image previews etc.
Well for that purpose, I'd recommend you use Blue Iris instead when you want to view the cameras. You can set up a more restricted user in blue iris for camera viewing if you want.
When you want to view the camera web pages directly to adjust image settings, use the bookmarklets I posted above or open another browser window with the BI web server.
 
Top