is it possible to streaming video from zoneminder at low bandwidth ?

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
dasti
Posts: 3
Joined: Fri Dec 21, 2018 3:51 am

is it possible to streaming video from zoneminder at low bandwidth ?

Post by dasti »

Dear zoneminder dev team and users,


I discovered recently that viewing live camera through zoneminder (and a browser) is using around 30 times more bandwidth then streaming from the camera to, in example, VLC+RTSP or to the camera's brand (smartpss that is also using RTSP).


Here's some numbers
- from camera to VLC : 50~150 Kb/s (bit rate will go up when )
- from zoneminder to a browser (using high bandwidth profile)
-- JPEG_STREAM_QUALITY 70% / 25fps -> 4200 Kb/s
-- JPEG_STREAM_QUALITY 40% / 25fps -> 3800 Kb/s
-- JPEG_STREAM_QUALITY 70% / 30fps -> 8200 Kb/s


The hardware
- camera :
-- dahua - IPC-HDW1230C-A - firmware 2.622.0000000.9.R
-- video settings : H264 / VBR / quality 4 on 6 / max bitrate 2048kb/s / 25fps / smart encoding on (= variable keyframes?) / resolution 1280*720
-- audio settings : no stream
- server : zoneminder 1.32.3 or 1.32.2 / ubuntu 18.04 + ppa


Some tips (correct me if I'm wrong) :
- video is streamed from the server to the browser via a stream of jpeg pictures
- it seems possible to use mpeg stream but requite a plugin didn't find how to install for now
- detection of the capability of the browser to stream is controlled in WEB_H_CAN_STREAM, configuring it to 'no' will make the stream very choppy (1 frame / 3 seconds)
- WEB_H_VIDEO_BITRATE has no effect on the bandwidth
- good source of infirmation -> https://zoneminder.readthedocs.io/en/la ... ns_bw.html


In Zoneminder, here's some workaround to reduce the bandwidth (that will degrade video quality or fluidity)
- reduce frames per sec -> WEB_H_VIDEO_MAXFPS
- degrade the quality of the picture -> JPEG_STREAM_QUALITY
- reduce the scale of the picture when viewing the monitor


I found this open source project that is an application that will allows you to view several camera using their rtsp stream (using vlc libraries)
https://github.com/grigory-lobkov/rtsp-camera-view


I tested also zmninja that seems to have the same behavior as zoneminder with the WEB_H_CAN_STREAM desactivated = low bandwidth but 1 frame every 3 sec approximativaly.



Is it possible to have very fluid videos in the browser but using low bandwidth ?
- Can FFMPEG_OUTPUT_OPTIONS be used to influence the jpeg stream ? do variable bitrate ?
- is it possible to do a kind of "rstp passtrough" from the camera trough zoneminder to the browser ? like the new feature in the monitor recording that is, by the way, working extremely well !!!
- Is it linked to this card in the zoneminder 1.34.0 roadmap ? https://github.com/ZoneMinder/zoneminde ... d-13833656
- is it even considered as a problem/feature in zoneminder ?


I found informations in this topic https://stackoverflow.com/questions/224 ... a-web-page
- using VLC activeX could be a solution, means only internet explorer that's bad
- maybe this html5 rstp player https://github.com/Streamedian/html5_rt ... TSP-Player
- maybe stream in webrtc ?
Post Reply