MJPEG Streaming on VLC

DampSquib

n3wb
Sep 28, 2024
4
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