Video stream by HTTPS cgi-bin/mjpg/video.cgi?channel=0&subtype=1

SemVC

n3wb
Joined
Jan 29, 2021
Messages
8
Reaction score
0
Location
Belgium
Hi there,

I have a DAHUA IP Camera setup & trying to vizualise & control movement on my website.
On my website I'm sending an AJAX call to my server side .php file.

The server side code connects by DIGEST AUTHENTICATION with the API (see videostream.png attachment) & gives us a response.

Now here comes the issue. I don't have any idea how I can handle the response (see mjpeg_response.png attachment) returned after the successful API call.
Can someone please advice me what I should do to get the streaming video in HTML?
Should this response be added to an iframe?

I'm really desperate to find a solution to get this up and running on my clients website.

Thanks in advance for any help / tips.

Best regards,
Sem
 

Attachments

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
Your request return data block: head + jpeg data.
Remove head & use binary block as jpeg picture
 

SemVC

n3wb
Joined
Jan 29, 2021
Messages
8
Reaction score
0
Location
Belgium
Your request return data block: head + jpeg data.
Remove head & use binary block as jpeg picture
Do you have any code example?
The result is actually a requested Multipart JPEG image.

Looked all over the internet + stackoverflow to find some code examples, but couldn't make it work.

Thanks in advance for your help.
 

iTuneDVR

Pulling my weight
Joined
Aug 23, 2014
Messages
846
Reaction score
153
Location
Россия
I don't have work example.
You have a task to do it on, so it is necessary to act with its means.
The variable $responce receives as a result of the query, what is shown in the second picture?
Parse the data using built-in tools or write an external parsing library by saving the data to a file.
There are a lot of options and all for a specific situation.
And you know better how to interpret the data further.

Maybe curl have build in method's parsing the answer into parts.
Many ways.
 

SemVC

n3wb
Joined
Jan 29, 2021
Messages
8
Reaction score
0
Location
Belgium
It's incredible to notice that no one has a clear solution for embedding an Dahua camera stream onto their website by using HTTPS or RTSP.

Still haven't found the solution for my problem.
 
Top