I
I
itprogressuz2020-11-04 13:25:00
PHP
itprogressuz, 2020-11-04 13:25:00

How to properly organize broadcasting from ip-cameras to the site?

I am developing a web application in PHP (Laravel), which will be stored on a local server.

There are about 50 Dahua ipc-k42a IP cameras.

All cameras are local.

Cameras also have an SDK. True, I didn’t quite understand how to integrate it into my web application.

There is an HTTP Camera API.
At the moment, with the help of it, I take the mjpg stream from the camera to the site.
This format turned out to be inconvenient to use, because when 2-3 users are connected at the same time, the broadcast starts to freeze terribly, besides, the video quality is lame.

As I understand it, in addition to this, there are several more solutions:

1) Broadcast the recording via an rtsp stream, however, for this, as I understand it:
- You need to use third-party services to convert the stream into a browser-friendly format.
- All IP cameras must be globally accessible.

2) Converting the rtsp stream directly on the server using the ffmpeg program. But, as I understand it, if the local machine in which the conversion will be launched goes to reboot, then it will be necessary to re-enter all the commands for the conversion.

3) Use the Flashphoner service, deploy a web call server in your virtual server, and through it already broadcast the rtsp stream in the browser. It seems to me that the most convenient option, however, is a paid service, and it costs a lot of money relative to the project budget)

Which of these solutions would you recommend to choose, or, if there are other options, you can also offer.

I would be very grateful if there is an expert on this topic who can advise (for a separate fee) on this topic.

Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2020-11-04
@itprogressuz

Option 2. Take nginx-rtmp to convert the stream, and put ffmpeg into autoload is quite simple.
Keep in mind that for different clients and different devices you need to make different streams in different formats, because somewhere browsers understand webm, somewhere there is junk that is only capable of flv and flash, and old iPhones only understand HLS

V
Vladimir, 2020-11-04
@MechanID

nginx-rtmp was already mentioned above, there is also an ant media server that can HLS, WebRTC

M
MihaTronik, 2020-11-04
@mixatronik

Not a specialist in web programming, so I won’t give specific advice, but I’ll point out the direction. The manufacturer of the video surveillance system Line has a free service for creating broadcasts from cameras to the site. It is called RTSP.ME. Real IP, of course, is needed, but not necessarily for each camera, you can solve it with different ports. Look. Perhaps it will fit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question