After trying out version 1.29 on ubuntu 15.10, after following instructions https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way and https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way, I was able to get my old chinese h264 streamer to work, which previously did not work on my zm 1.25 box. The device allows for 4 analog cameras to connect via bnc, then connects via ethernet, so I think it may be categorized as a network digitizer. I notice a difference in cpu usage depending on the configuration used for the Source Type. For testing purposes, I have the maxed out the cameras streaming at 30fps and I used the same source camera stream for each of the 2 entries in zoneminder, but using a different source configuration.
configuration for monitor 16:
source type: ffmpeg
source path: rtsp://192.168.1.160:554/user=admin&password=&channel=1&stream=0.sdp
remote method: rtp/rtsp
target colorspace: 24 bit color
capture width: 352
capture height: 240
configuration for monitor 17:
source type: remote
remote protocol: rtsp
remote method: rtp/rtsp
remote host name: 192.168.1.160
remote host port: 554
remote host path: /user=admin&password=&channel=1&stream=0.sdp
target colorspace: 24 bit color
capture width: 352
capture height: 240
Running the command "htop -u www-data" shows the processes of zoneminder. Monitor 16 cpu usage is about 4.3 and monitor 17 is about 2.8. I am not complaining that the cpu usage may be high, I am just describing that there seems to be a difference between the 2 source types. Is that the expected behavior?
cpu usage for source ffmpeg vs remote
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: cpu usage for source ffmpeg vs remote
The following three source types are interchangeable:
- ffmpeg
- libvlc
- remote/rtsp
Generally, you should always use ffmpeg as it is the most compatible and most efficient.
Note that you will get a performance boost if you change to 32bit colorspace.
- ffmpeg
- libvlc
- remote/rtsp
Generally, you should always use ffmpeg as it is the most compatible and most efficient.
Note that you will get a performance boost if you change to 32bit colorspace.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: cpu usage for source ffmpeg vs remote
Thanks for the tip about the 32bit colorspace. I also tried libvlc, after reading your response and then installing the lib. I am able to stream using that option, also. Comparing the 3 different options, monitor 16 is set for remote, 17 is ffmpeg, and 18 is libvlc. All 3 monitors are using the same remote stream as the source. Monitor 18 seems to use the most cpu and memory, followed by monitor 17, and then monitor 16. I am curious why there would be multiple pids per process. I am not a linux expert, so maybe that is normal for the different.knnniggett wrote:The following three source types are interchangeable:
- ffmpeg
- libvlc
- remote/rtsp
Generally, you should always use ffmpeg as it is the most compatible and most efficient.
Note that you will get a performance boost if you change to 32bit colorspace.
Re: cpu usage for source ffmpeg vs remote
Just found out that is an htop thing, showing threads per process. Pressing shift h will hide the threads. But the cpu usage is still the same, of course. All 3 options appeared to have the same quality, but for efficient cpu usage: remote > ffmpeg > libvlc, on my system, atleast.kevin186 wrote:I am curious why there would be multiple pids per process. I am not a linux expert, so maybe that is normal for the different.
Re: cpu usage for source ffmpeg vs remote
Wow, not only an improvement in the performance, the image quality (at least in my cameras) is way better after switching to 32bits from 24bits. I'm impresses, every day I learn something in this forum!knnniggett wrote:Note that you will get a performance boost if you change to 32bit colorspace.
Thanks a lot,
PacoLM
After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
Re: cpu usage for source ffmpeg vs remote
Sorry for the dumb question, but why is there a performance boost from 24 to 32bit colorspace? I did notice a small improvement when I changed it from 24bit to 32bit, just trying to understand.knnniggett wrote: Note that you will get a performance boost if you change to 32bit colorspace.
Thanks
-
- Posts: 17
- Joined: Mon Oct 31, 2011 5:19 pm
Re: cpu usage for source ffmpeg vs remote
I want to ask again, why 32bit boots performance?
Dont I also need more diskspace to store those images? Hope someone can explain this.
regards
Dont I also need more diskspace to store those images? Hope someone can explain this.
regards
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: cpu usage for source ffmpeg vs remote
See:thomas1977 wrote:I want to ask again, why 32bit boots performance?
Dont I also need more diskspace to store those images? Hope someone can explain this.
regards
viewtopic.php?f=36&t=25140&p=96041#p96041
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: cpu usage for source ffmpeg vs remote
I did an unscientific test on my production system of 17 cameras and set the colorspace to 32 bits on all the cameras. The system load went down a bit, color was improved and the image size (from one camera) went from 5.68 KB to 4.94 KB (camera at 320x240).thomas1977 wrote:I want to ask again, why 32bit boots performance?
Dont I also need more diskspace to store those images? Hope someone can explain this.
regards
-
- Posts: 17
- Joined: Mon Oct 31, 2011 5:19 pm
Re: cpu usage for source ffmpeg vs remote
thanks to both of you for the explanation