MJPEG Streaming on VLC

DampSquib

n3wb
Sep 28, 2024
8
1
.
Hello All,

I've done quite extensive searching and testing without success.
So I'm asking for a bit of help.

  1. I've got a Dahua IPC-HFW1230S-0360B-S5 camera.
  2. I've enabled sub stream and set it to MJPEG (frame rate 15, bit rate 2304).
  3. I've entered this string in VLC:
  4. It gives me the login pop-up and I enter correct credentials
The stream never loads.

So two questions...

Is that string correct for MJPEG?

Is 'sub stream' on Dahua - channel 1, sub1? Or is it channel0?
 
You're web browser should display MJPEG natively.
If you're using VLC to view you're better off viewing a different type of stream unless it's just for testing purposes (I'm not even 100% certain VLC can play an MJPEG stream).
 
Thanks for the reply tangent, you're spot on - I was having a brain fart.
RTSP works fine in VLC, but I need MJPEG.
In a browser - all I get is:

Error
Bad Request!

1727518099475.png

Is Sub Stream here, Channel 0, Subtype 1 in strings?

Any ideas?
 
I've enabled sub stream and set it to MJPEG (frame rate 15, bit rate 2304).
  1. I've entered this string in VLC:
  2. It gives me the login pop-up and I enter correct credentials

there is no such thing as /cgi-bin/realmonitor.cgi over HTTP protocol..

there is: rtsp:/ /user: pass@192.168.1.108/cam/realmonitor?channel=1&subtype=1

(delete spaces from url)...

which works over RTSP protocol. This protocol is supported by VLC, not web browsers.

If You use this link in VLC (with correct user/pass/ip address) You will see secondary stream. Also in MJPEG version.

If You want mjpeg in browser, the only solution is to write java-script which will refresh every 1 second image loaded from:


for that You don't need to configure mjpeg on second stream.
 
Last edited:
This works fine on my Dahua and Amcrest, using Brave (Chromium) browser:

Code:
http://user:passsword@192.168.200.205/cgi-bin/mjpg/video.cgi?subtype=1
 
DampSquib, can you share a bit more of your configuration? I'm trying to follow along and we're using similar camera gear (I have Lorex, you're using Dahua). I'm getting a broken tile in ActionTiles and I can get the images to show on a webpage but when I drop the link into ActionTiles, the tile is broken.
Specifically, can you share the link you put into "My Media" in Action Tiles and if it's a MJPEG or if it's a still image / GIF? I'm not having much luck unfortunately.
 
@black2.5rs , try this:

In your browser settings, configure to "disable or turn off safe browsing" or "allow insecure content" or "allow mixed content" then close and re-open.
 
Thanks for the suggestion. I am still getting a broken tile in Action tiles even though I can see the image in a browser and if I add the webpage as a link. However, when adding it under "My Media"; it doesn't appear to be working, here's my config in a bit more detail:
Chrome: Settings --> Privacy & Security --> "Safe Browsing" --> No protection
Edge: Settings --> Security (Defender SmartScreen) --> Disabled

The links i'm using in Action Tiles are (trying both Blue Iris and iSpy and will stick with whatever I get working first):
Blue Iris: :password@192.168.1.52:81/image/FrontDoor?q=70&s=70
iSpy: