Page 1 of 3

new libvlc advantages

Posted: Fri Mar 21, 2014 12:44 am
by iitywygms
Just upgraded. Now we have this option. (libvlc)
I am able to use it but my cpu usage goes up from 7 or 8 to around 30.
Ffmpeg uses less cpu.
Any advantage to using the new libvlc option?
I am using foscam F19804W camera.
Thanks to all for the work into this great software.

Re: new libvlc advantages

Posted: Fri Mar 21, 2014 12:19 pm
by knight-of-ni
libvlc was implemented to give you more choices.
If, when using ffmpeg, you get images like the one in the thread below then try libvlc:
http://www.zoneminder.com/forums/viewto ... 30&t=21911

Bascially, if you are having any problems with ffmpeg at all, then try liblvlc and post your results.
You are free to use whichever one works best for your system.

Note that there is also a new method called libcurl too.

Re: new libvlc advantages

Posted: Fri Mar 21, 2014 1:27 pm
by BiloxiGeek
Do you have any data regarding which method is more or less of a load on the system? I tried libvlc with the 1.27beta and it didn't work too well for me. But if there's a chance of a performance gain in libvlc I'd give it another try and see if I can find good settings.

Re: new libvlc advantages

Posted: Fri Mar 21, 2014 2:05 pm
by knight-of-ni
No, we don't have any data. That's where you come in. You need to test the new libvlc method with your cameras and then provide feedback.

Note that transcoding an H.264 stream into jpeg's is always going to be expensive no matter what method you use. Certainly one method might be more efficient than others, but I wouldn't expect any miracles. Until we someday change the way zoneminder records to disk, you should expect to see relatively high cpu usage with h.264 cameras.

Re: new libvlc advantages

Posted: Fri Mar 21, 2014 6:38 pm
by mabene
knnniggett wrote:No, we don't have any data. That's where you come in. You need to test the new libvlc method with your cameras and then provide feedback.
As a starting point, I've just posted a comparisom of the methods available for my cameras: http://www.zoneminder.com/forums/viewto ... 30&t=21991
Expanding on that post, the problems mentioned for ffmpeg (stream doesn't recover after network failure) was fixed by the patch posted here: http://www.zoneminder.com/forums/viewto ... 6&start=43
So I'm now running my cams in rtsp/h.264 mode using ffmpeg/tcp.
let us know how different methods compare an your cam/your system.

Re: new libvlc advantages

Posted: Fri Mar 21, 2014 8:41 pm
by iitywygms
mabene wrote:
knnniggett wrote:No, we don't have any data. That's where you come in. You need to test the new libvlc method with your cameras and then provide feedback.
As a starting point, I've just posted a comparisom of the methods available for my cameras: http://www.zoneminder.com/forums/viewto ... 30&t=21991
Expanding on that post, the problems mentioned for ffmpeg (stream doesn't recover after network failure) was fixed by the patch posted here: http://www.zoneminder.com/forums/viewto ... 6&start=43
So I'm now running my cams in rtsp/h.264 mode using ffmpeg/tcp.
let us know how different methods compare an your cam/your system.
Is this patch a part of 1.27 now?

I would like to add to your other post but I am not sure how to set up each type of stream. So I cant be positive if zoneminder is not working correctly or I am configuring the camera incorrectly.

Re: new libvlc advantages

Posted: Sat Mar 22, 2014 5:49 pm
by BiloxiGeek
Thought I'd give libvlc a try with one of my Grandstream GXV-3672-FHD cameras. Changed the source type, left the source URL the same as I had for ffmpeg and clicked save. Right as I did that I got some error messages on the OS console. Dunno if these are pertinent or even interesting, but thought I'd get some other eyeballs on them just in case. Since they popped up right after saving the settings the console has been quiet.

Switched the camera back to ffmpeg and saved, and then put it back to libvlc and saved again. No errors on the console going to ffmpeg, but I did get what appear to be the same errors when I went back to libvlc, so the issue seems to be reproducible.

Code: Select all

Message from syslogd@icezone at Mar 22 12:44:50 ...
 7267188] 

Message from syslogd@icezone at Mar 22 12:44:50 ...
 hibit interface error: 

Message from syslogd@icezone at Mar 22 12:44:50 ...
 iled to connect to the D-Bus session daemon: /bin/dbus-launch terminated abnormally without any error message

Message from syslogd@icezone at Mar 22 12:44:50 ...
 

Message from syslogd@icezone at Mar 22 12:44:50 ...
 7267188] 

Message from syslogd@icezone at Mar 22 12:44:50 ...
 in interface error: 

Message from syslogd@icezone at Mar 22 12:44:50 ...
  suitable interface module

Message from syslogd@icezone at Mar 22 12:44:50 ...
 

Message from syslogd@icezone at Mar 22 12:44:51 ...
 ltiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (

Message from syslogd@icezone at Mar 22 12:44:51 ...
   

Message from syslogd@icezone at Mar 22 12:44:51 ...
 ytes of trailing data will be dropped!

Message from syslogd@icezone at Mar 22 12:44:52 ...
 264 @ 0x7fcb100d7160] Increasing reorder buffer to 1

Message from syslogd@icezone at Mar 22 12:44:52 ...
 264 @ 0x7fcb100922e0] corrupted macroblock 91 29 (total_coeff=-1)

Message from syslogd@icezone at Mar 22 12:44:52 ...
 264 @ 0x7fcb100922e0] error while decoding MB 91 29

Message from syslogd@icezone at Mar 22 12:44:52 ...
 264 @ 0x7fcb100922e0] concealing 4638 DC, 4638 AC, 4638 MV errors

Message from syslogd@icezone at Mar 22 12:44:52 ...
 7fcae8001268] 

Message from syslogd@icezone at Mar 22 12:44:52 ...
 in vout display error: 

Message from syslogd@icezone at Mar 22 12:44:52 ...
 iled to set on top

Message from syslogd@icezone at Mar 22 12:44:52 ...
 

Message from syslogd@icezone at Mar 22 12:44:52 ...
 7fcae8001268] 

Message from syslogd@icezone at Mar 22 12:44:52 ...
 in vout display error: 

Message from syslogd@icezone at Mar 22 12:44:52 ...
 iled to change source crop TODO implement crop at core

Message from syslogd@icezone at Mar 22 12:44:52 ...
 

Message from syslogd@icezone at Mar 22 12:44:54 ...
 ltiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (

Message from syslogd@icezone at Mar 22 12:44:54 ...
   

Message from syslogd@icezone at Mar 22 12:44:54 ...
 

Message from syslogd@icezone at Mar 22 12:44:54 ...
 ytes of trailing data will be dropped!

Message from syslogd@icezone at Mar 22 12:44:54 ...
 264 @ 0x7fcb10133480] Invalid level prefix

Message from syslogd@icezone at Mar 22 12:44:54 ...
 264 @ 0x7fcb10133480] error while decoding MB 86 40

Message from syslogd@icezone at Mar 22 12:44:54 ...
 264 @ 0x7fcb10133480] concealing 3323 DC, 3323 AC, 3323 MV errors

Message from syslogd@icezone at Mar 22 12:45:09 ...
 ltiFramedRTPSource::doGetNextFrame1(): The total received frame size exceeds the client's buffer size (

Message from syslogd@icezone at Mar 22 12:45:09 ...
   

Message from syslogd@icezone at Mar 22 12:45:09 ...
 ytes of trailing data will be dropped!

Message from syslogd@icezone at Mar 22 12:45:09 ...
 264 @ 0x7fcb100922e0] Invalid level prefix

Message from syslogd@icezone at Mar 22 12:45:09 ...
 264 @ 0x7fcb100922e0] error while decoding MB 52 67

Message from syslogd@icezone at Mar 22 12:45:09 ...
 264 @ 0x7fcb100922e0] concealing 117 DC, 117 AC, 117 MV errors

Re: new libvlc advantages

Posted: Mon Mar 31, 2014 1:01 pm
by Biggus
Here are my findings.

I have two cameras Foscam FI9828W and FI9805W
I suffered a lot with the smearing effect, I had more smearing events than live ones, so I was keen to test out the libvlc method.
The good news is that the smearing effect has reduced however I now experience grey screens every so often instead, generally it will pop up the title of the file too i.e http://192.168.0.6:/VideoMain
Is there a way of removing the video file title like that is explained in the following link? https://forum.videolan.org/viewtopic.php?f=2&t=50202
Image

Re: new libvlc advantages

Posted: Mon Mar 31, 2014 1:34 pm
by Biggus
Image

Re: new libvlc advantages

Posted: Thu Apr 03, 2014 8:19 pm
by linuxsense
Just wanted to add some info to this thread. I picked up a cheap 1280x720 IP cam a few weeks ago (Amovision AM-Q630M - $65, uses the hi3510 chipset like the FI9821) and I have used it with ffmpeg and libvlc and the results with libvlc have been far superior to ffmpeg. Both put about the same load on the server but ffmpeg would get corrupted images quite often, so far I have not had that issue with libvlc. With 4 analog cams (320x240, 5 fps) and two IP cams (one FI8910W, 640x480, 10 fps and the AM-Q630M, 1280x720, 5 fps) my system load sits around 0.81 while having a custom montage page displayed on a LCD pulling images from ZM from everything but the AM-Q630M. For the AM-Q630M I pull the rtsp feed directly from the camera using VLC to run on the same LCD as the montage view. Pretty good considering the dedicated CCTV display is running on the server and VLC and the montage in Chrome and VLC suck a fair amount of CPU. Anyway, for my setup, libvlc is good to go. :wink:

Re: new libvlc advantages

Posted: Fri Apr 04, 2014 6:12 am
by PacoLM
linuxsense wrote:Just wanted to add some info to this thread. I picked up a cheap 1280x720 IP cam a few weeks ago (Amovision AM-Q630M - $65, uses the hi3510 chipset like the FI9821) and I have used it with ffmpeg and libvlc and the results with libvlc have been far superior to ffmpeg. Both put about the same load on the server but ffmpeg would get corrupted images quite often, so far I have not had that issue with libvlc. With 4 analog cams (320x240, 5 fps) and two IP cams (one FI8910W, 640x480, 10 fps and the AM-Q630M, 1280x720, 5 fps) my system load sits around 0.81 while having a custom montage page displayed on a LCD pulling images from ZM from everything but the AM-Q630M. For the AM-Q630M I pull the rtsp feed directly from the camera using VLC to run on the same LCD as the montage view. Pretty good considering the dedicated CCTV display is running on the server and VLC and the montage in Chrome and VLC suck a fair amount of CPU. Anyway, for my setup, libvlc is good to go. :wink:
Hi linuxsense,

Could you share a picture of the Amovision camera?. I'm looking for cheap HD cams and $65 seems a really good deal.

Thanks in advance,

Paco

Re: new libvlc advantages

Posted: Fri Apr 04, 2014 6:58 pm
by linuxsense
Sure, here is a screenshot from a few days ago of a zoneminder window. I'll grab a still using VLC a bit later.

https://dl.dropboxusercontent.com/u/6511963/drive.jpg

So far I have been impressed with that little cam. Hard to beat the price and it has a very well constructed body and mount although the mount cant be changed, but, at least its sturdy one. Low light performance exceeded my expectations. My only gripe is its web UI requires a proprietary plugin to view streams and its Windows only but I have no real need for it anyway. This is the cam:

http://goo.gl/uHe5I8

Re: new libvlc advantages

Posted: Fri Apr 04, 2014 7:23 pm
by knight-of-ni
linuxsense wrote:Sure, here is a screenshot from a few days ago of a zoneminder window. I'll grab a still using VLC a bit later.

https://dl.dropboxusercontent.com/u/6511963/drive.jpg

So far I have been impressed with that little cam. Hard to beat the price and it has a very well constructed body and mount although the mount cant be changed, but, at least its sturdy one. Low light performance exceeded my expectations. My only gripe is its web UI requires a proprietary plugin to view streams and its Windows only but I have no real need for it anyway. This is the cam:

http://goo.gl/uHe5I8
Nice image. Real sharp.
Care to add that camera config to the wiki?

Re: new libvlc advantages

Posted: Fri Apr 04, 2014 8:18 pm
by linuxsense
Yes, I'll absolutely add a page on it, I have been working on a control script to set brightness/contrast/saturation now that I figured out how to push commands to the device from a shell. Once I have all of that worked out I'll add it all to the wiki. I am currently just running the defaults on it (4096 bitrate with VBR option), I still need to see where the best compromise of speed and quality is but I am happy with it as is. Here is a snapshot I just took using VLC from its RTSP feed (it has 2 rtsp feeds, one full resolution, another at half) but its very overcast at the moment so keep that in mind.

https://dl.dropboxusercontent.com/u/651 ... 58s167.png

And while I had VLC open I dumped the video to a file. Pretty good image considering the lighting.

https://dl.dropboxusercontent.com/u/6511963/cap3.mp4

To stay on topic: I built ZM using the current repo yesterday AM and have been running libvlc with that cam for over 24 hours without a hiccup. It might be the build on my system but ffmpeg is just not reliable with it.

Re: new libvlc advantages

Posted: Sun Apr 06, 2014 9:55 am
by PacoLM
I just ordered one of this Amovision cams. Thanks!