Camera works fine in VLC but won't work with libvlc source t

Forum for questions and support relating to the 1.28.x releases only.
Locked
dime
Posts: 2
Joined: Sun Nov 23, 2008 4:15 pm

Camera works fine in VLC but won't work with libvlc source t

Post by dime »

Hi all,

We recently created a new installation of ZoneMinder using the zmrepo on CentOS 6.5. When I add the camera using the libvlc source, it does not show up. I enabled debug logging for ZM, and on the console I see the following error messages that may be relevant:

Message from syslogd@localhost at Oct 24 09:16:18 ...
iled to connect to the D-Bus session daemon: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
Message from syslogd@localhost at Oct 24 09:16:18 ...
Message from syslogd@localhost at Oct 24 09:16:18 ...
6edc9f8]
Message from syslogd@localhost at Oct 24 09:16:18 ...
in interface error:
Message from syslogd@localhost at Oct 24 09:16:18 ...
suitable interface module

The log window inside of ZM's web interface looks like:

2014-10-24 11:42:11.821365 web_php 17811 ERR socket_sendto( /var/lib/zoneminder/sock/zms-021344s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2330
2014-10-24 11:42:01.752511 web_php 17399 ERR socket_sendto( /var/lib/zoneminder/sock/zms-021344s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2330
2014-10-24 11:41:59.334860 zmdc 17909 INF 'zmc -m 10' crashed, signal 134 zmdc.pl
2014-10-24 11:41:59.077080 zmdc 32767 INF 'zmc -m 10' started at 14/10/24 11:41:59 zmdc.pl
2014-10-24 11:41:59.075790 zmdc 17909 INF 'zmc -m 10' starting at 14/10/24 11:41:59, pid = 47624 zmdc.pl
2014-10-24 11:41:59.073360 zmdc 17909 INF Starting pending process, zmc -m 10 zmdc.pl
2014-10-24 11:41:51.659691 web_php 17401 ERR socket_sendto( /var/lib/zoneminder/sock/zms-021344s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2330
2014-10-24 11:41:51.176530 zmwatch 32767 INF Watchdog pausing for 30 seconds zmwatch.pl
2014-10-24 11:41:51.166940 zmwatch 32767 INF Watchdog starting zmwatch.pl
2014-10-24 11:41:51.104710 zmdc 32767 INF 'zmwatch.pl' started at 14/10/24 11:41:51 zmdc.pl
2014-10-24 11:41:51.103990 zmdc 17909 INF 'zmwatch.pl' starting at 14/10/24 11:41:51, pid = 47603 zmdc.pl
2014-10-24 11:41:51.075730 zmdc 17909 INF Starting pending process, zmwatch.pl zmdc.pl

What is so odd is that it works perfectly in VLC.

I had a small amount of success using ffmpeg source type, but it is hit or miss (not to mention, if I use ffmpeg as a source, the source column on the ZM console is blank, and I can't go back to edit it without removing the camera from zm and re-adding it...must be a bug). Also, when I add it as ffmpeg, it seems to be < 10 frames per second. Using the VLC app, it is a smooth 30fps.

I am a bit new to ZM (I used it several years ago with analog cameras), so please don't hesitate to ask me to send logs, etc.

Cheers.

Note: This is an LTS branded camera. With VLC, I just open a network stream, and put rtsp://ipaddress:554/ and it works fine.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Camera works fine in VLC but won't work with libvlc sour

Post by bbunge »

I had to install some extra packages in Ubuntu to get libvlc to work:

libvlc-dev libvlccore-dev vlc

Not sure what you will need to add. There is a how to for Ubuntu if you want to give it a try...

http://www.zoneminder.com/wiki/index.ph ... e_easy_way
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Camera works fine in VLC but won't work with libvlc sour

Post by knight-of-ni »

He's got the right libvlc libraries installed. For rpm based distros, it was a lot easier to determine what packages zoneminder needed than Ubuntu. All the right packages are all in zmrepo.

There really isn't enough information to get an idea of what the issue is. A more complete lsiting of the logs would help.
About the only thing I can tell from the log messages is that it appears that the live monitor was opened too quickly after starting zoneminder. You need to wait a minute for things to warm up.

Some things to try:
- reply with your make and model of camera
- Verify this is not a resource isssue by lowering the frame rate (in the camera) to 5-10 fps and turn off all cameras but one.
- Try the ffmpeg method as it is interchangeable with libvlc

The libvlc method doesn't seem to work as well as ffmpeg. Some, including myself, get a lot of crashes in the log files using libvlc. The problem seems to be within the library itself.
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/
dime
Posts: 2
Joined: Sun Nov 23, 2008 4:15 pm

Re: Camera works fine in VLC but won't work with libvlc sour

Post by dime »

Turns out it had nothing to do with ZM. Our central IT apparently created a VLAN on top of another VLAN, and long story short, the network wasn't functioning correctly. Using ffmpeg now, it works perfectly.

Sorry for not verifying something so basic.

Cheers.
Locked