As part of this project in Krasnogorsk, we decided to install a pair of network cameras and make it convenient to view streaming video. Looking ahead, the result can be viewed on our website or from a mobile phone on wap www.ventumnet.ru/camera
There was some experience with Axis cameras, which, of course, are the flagships of the industry, but we stopped at a more budget option - D-Link DCS-2102 network cameras. They cost around 4,000 rubles. For this money you get a decent picture and bitrate, and most importantly - access via the RTSP protocol, and immediately with a configured profile for viewing on mobile phones having an onboard player 3gp, in our case it was the Sony Ericsson T650i . ')
Implementation
For viewing convenience, the web decided to convert video online to flv using vlc running in vlm mode. This is done like this:
All caching options are chosen empirically, in your case they may be different. In principle, there is also sound from the cameras, but we don’t need it, therefore --no-sout-audio.
Preparing the config /home/vlc/playlist.txt:
new kamera4 broadcast enabled setup kamera4 input "rtsp://ip_address:554/mp4" setup kamera4 output #transcode{vcodec=FLV1,vb=2048,acodec=mp3,samplerate=22050} :std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:8084/stream4.flv} new kamera3 broadcast enabled setup kamera3 input "rtsp://ip_adress2:554/mp4" setup kamera3 output #transcode{vcodec=FLV1,vb=2048,acodec=mp3,samplerate=22050} :std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:8083/stream3.flv} control kamera4 play control kamera3 play
Pay attention to the dst, the web server's built-in vlc ports are different, they could not be started on the same ones, although this is strange, and it is likely that in the next vlc releases it will be possible to distinguish streams only by the second part of the url, such as /stream1.flv /stream2.flv. .etc. Cameras are configured accordingly, give 2 megabits.
# telnet localhost 4212 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Password: Welcome, Master > load /home/vlc/playlist.txt > exit Connection closed by foreign host.
JW FLV Player was used as a player. To get static pictures, not streaming video, I had to sign an NDA with D-Link in order to access the cameras via http. For reasons of the NDA, we will not provide a link, it is simply of the form kamera / cgi-bin / dai_mne_kartinuku_plz.cgi
Along the way, we are doing a wap site where you can either look at the pictures or directly follow the link rtsp: // directly to the camera. At the same time we take with the gismeteo.ru weather in / tmp / temp and overlay it with
At the moment there is some problem in combining adobe flash player 10, jw flv player 4.1.6 and specifically our streaming video.There are no problems in the adobe flash player 9. The problem is defeated, it was decided by an additional initialization parameter start for the jw flv player, which is responsible for which frame to start playing the video. Very helpful post from here , many thanks to the author!
Cameras hang once a month, sometimes more often. They are accessible via http but they stop giving rtsp. With the recently updated firmware, they began to work better, but the problem persisted. All cameras break simultaneously, i.e. time plays a role here. In the new firmware, by the way, support for the night mode was added, now even with headlights, something is visible.
VLC can also fall if the stream is unavailable for a long time.
All mobile phones directly turn to the cameras, which, of course, creates a burden on them. The manufacturer promised up to 10 simultaneous mobile clients, in practice, you need, of course, with time and increasing load, to shift the function of mobile video delivery also to vlc.
I want to take the weather not from open sources, but from network sensors of humidity / temperature, tell me, are there such ones on sale?
It is necessary to solve the problem of recording video, tried the zoneminder, did not like it, more options?
The article was published in the sandbox, there was no reaction, so at the request of the author decided to post on his behalf. Accordingly, the author himself will respond to the comments (as far as possible) on my behalf.