Page 1 of 2

FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 12:31 am
by stefferd
Hi,

My previous setup of zoneminder was version 1.28. I had 9 camera's capturing through RTP FFmpeg streams and it all worked fine. The system was running on a VMware ESXi6 server on Ububtu server 15.10. since we wanted 9 more camera's, i upgraded the mainboard from a Core i5 2x3500 MHz (where zoneminder slurped about 60% of computing power and i figured it wouldn't handle 9 more camera's) to an AMD FX8320 with 8x3500MHz.
The virtual machine couldn't handle the change, though - and crashed severely. So i built another one, based on Ubuntu 14.04 LTS with Zoneminder 1.29.0 from the PPA repository.
Now, when configuring my camera's in exact the same way in 1.29 - through FFmpeg, only one camera starts to stream. The rest gives me a blue screen with FFmpeg. Which was nasty because i litterally copied the configuration and changed nothing to the camera setting. So i poked around and searched some forums. When I choose libvlc for the blue screeners (except for the single FFmpeg survivor), they all work - except that my camera's stop capturing after some random time and no errors show up in the logfile. When doing a live view, it shows the camera view, but a picture from hours ago - when it stopped capturing (I have set up timestamp in the camera as well as on the Zoneminder server to easily compare).
BUT: The problem happens only on certain camera's.
In a blaze: 1 camera running with FFmpeg, 5 camera's running libvlc. All the same camera's with the same config. One works with FFmpeg and the rest gives me a blue screen with it. (They all worked fine in version 1.28 with FFmpeg, though). I changed the blue screeners to libvlc and they work a while and then freeze.

The previous setup was only with Aviglion 1.0-H3-D1-IR camera's inside and Aviglion 5.0-H3-BO1-IR camera's on the outside of the building. In the camera configuration i did a limit on 8 FPS, and configured Zoneminder to capture 8 FPS.
In the new setup I added 4 Foscam FI9853EP camera's and I will install more Foscams outdoors as soon as i figured out what's wrong.

Here's the deal:

- All Aviglion 1.0-H3-D1-IR camera's stop capturing with libvlc - only the single one that's running on FFmpeg keeps on working.
- All Aviglion 5.0-H3-BO1-IR Camera's just keep on working with libvlc (untill now - 24 Hrs after config) - allthough the configuration is exactly the same as the 1.0's and so is the camera firmware and all...
- All new Foscam's keep on working.

No single error shows up in the logfiles. I don't know where to bite. And i'm HUNGRY! Has anyone seen this before???

TIA,

Stefferd

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 2:24 am
by bbunge
This is not a fix but bring your database over from your working server. All your existing cameras will be configured and should work.You might want to give 16.04 final beta a try as it comes with 1.29.0.

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 10:39 am
by stefferd
Well, since the diskspace it used (750Gb) i had to say goodbye to the previous VM of Zoneminder. The new server is running on an SSD drive with events and video on different storage, so it will be easier to migrate in the future. So there is no more chance to grab the previous database. I did write down the configuration, though and I am sure it is exactly the same.
As for FFmpeg v16.04 (which I suppose that's what you mean) - doesn't it have to be compiled with Zoneminder? Because i compiled nothing myself - I installed Zoneminder from the PPA:Iconnor repository.

Thanks in advance

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 1:00 pm
by bbunge
No, I mean Ubuntu 16.04 final beta. It comes with 1.29.0
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

As for your blue screen errors, they are likely caused by your video resolution not being right on. As for the database, it is a good idea to back up your database once you have ZM configured and working. Save it somewhere for future disaster recovery. I recently switched my production server from Ubuntu 14.04 with ZM 1.28.1 to CentOS 7 and ZM 1.29.0. I imported the database backup to the new server. I was aware of the changes I had to make to the ZM settings and had the system back in operation in an hour.

As for libvlc, I've had limited success using it and have switched back to ffmpeg or remote. I do take some heat from the other "experts" for running ZM on old equipment. My 17 camera system is running on an Optiplex 780 Core2 Quad with 12 GIG RAM, 1 TB WD Blue drive and working very well!

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 1:55 pm
by stefferd
Well i am sure the resolution is ok, as stated i have used the same settings as my previous system, and that worked well. Maybe i just have to go back to version 1.28, because now withh ffmpeg and libvlc not working properly it renders my zoneminder useless as a security system...

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 3:16 pm
by bbunge
I would question why you are trying to run a production Zoneminder system on a VM? Sure does not make sense to me why you would add extra layers that the processor(s) need to manage. Hardware RAID is OK. I've tried to use LVM and gave that up. Yes, I do use a VM for testing as it is easy to clone a VM to test something then blow it away.

But that does not solve your problem. Have you checked the usage on the tmpfs, think it is /run/shm in 14.04? Ubuntu, by default, uses half of the available RAM for tmpfs. If you are using high resolution settings the space, in tmpfs, can be used up quickly. Some cameras may work, however. I recommend setting your monitors at a low resolution, in ZM, check the tmpfs usage and increase the resolution a step at a time.

I install and test the latest procedures a couple of times a week, as retirement allows. Have not changed anything in the 14.04 WIKI instructions in a while. Have worked on the Ubuntu 16.04 this morning and made a couple of minor changes. Ubuntu 16.04 is a couple weeks away from release and, in my opinion, works well the way it is! Am running it now with the Mariadb 10.0 SQL server.

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 6:40 pm
by stefferd
Gosh, that's a difficult question to answer. I am quite a virtualisation guy. I am allready virtualising things since ESXi was still named GSX - so that's a long way back. And frankly, the (very) small footprint a VMware setup takes up, does not compare in any ways to the flexibility it gives. I am that kind of freak that runs ESXi on a whitebox at home, combined with Active Directory (On Zentyal server), NAS, VOIP, monitoring with Zabbix, domotica, ... It all works like a charm... and if for some stupid reason my mainboard or architecture breaks up, it is much less effort to rebuild my infra on VMware than it would be on physical architectures.
Nevertheless that does not seem to be the problem with the issues that i have with zoneminder. I suppose - trying to be humble now - that a physical setup would give me the same issues in this specific configuration. The zoneminder installation is also not at my home but for a client of mine who runs public services and needs some form of backwards security checking. It is me who recommended the VMware setup. And again frankly it is still for the best of it. The ESXi server also runs a Windows 7 management machine, and a Zabbix monitoring machine. The new mainboard with its 8 cores runs it all like a charm. I really think te problem is software related. Also because the previous installation had the same concurrent VM's running (on an Intel i5 with ESXi6) and then zoneminder worked perfectly.
The problem really started when rebuilding to Zoneminder version 1.29 - i'm sorry to say, but it doesn't seem to be a mature version just yet? And again, I don't mind, though - just trying to figure things out. It is open source software and i am very gratefull to the developers for their effort and dedication!

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 6:45 pm
by bbunge
I ask again: Have you checked the usage on the tmpfs, think it is /run/shm in 14.04?

If you are adding more cameras you will need to allocate more RAM to your VM.

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 7:06 pm
by stefferd
Yes, i did... df -h shows me a tmpfs with a size of 3.9Gb with 45% in use... The VM has 4 cores of 3.5GHz and 8Gb of RAM. It is consuming an average of 37% of the 4 cores and a little more then 5GB of memory...

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 7:12 pm
by stefferd
But: I have 13 camera's installed now and 5 more outdoors to go - and the specific problem allready started when installing the second camera. It wouldn't go with FFmpeg. And i got stuck to that untill - after searching forums and manual - i changed the second one to LIBvlc. The problem allready took place with just two camera's, and the machine allready had 4 cores and 8GB of RAM - which i think is quite overkill for just two camera's.
The only reason why i decided to change to verson 1.29 of Zoneminder is because it has onboard ONVIF support. All my camera's have ONVIF on board. But after testing that through the Zoneminder interface, i can not control anything through ONVIF. Zoom and focus functionality doesn't work with my camera's. So the upgrade was quite useless...
So i think it still might be best to just start from scratch and revert to version 1.28.

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 7:25 pm
by stefferd
BBunge: i will try to go for a Ubuntu 16.04 version and ZM v1.29 as you say... It might be a good experience! Thanks for your superb advice allready and I will keep you posted about my whatabouts. (My whereabouts would be stupid, because i think in a ##shithole## like Belgium you would just lose track of yourself ;-)

Re: FFmpeg not working - libvlc stops.

Posted: Sun Apr 03, 2016 8:09 pm
by bbunge
stefferd wrote:BBunge: i will try to go for a Ubuntu 16.04 version and ZM v1.29 as you say... It might be a good experience! Thanks for your superb advice allready and I will keep you posted about my whatabouts. (My whereabouts would be stupid, because i think in a ##shithole## like Belgium you would just lose track of yourself ;-)
F.Y.I. I have successfully switched to MariaDB server 10.0 on Ubuntu 16.04 final beta. I have my steps documented in the WIKI.
https://wiki.zoneminder.com/Install_MariaDB_Server_10.0

Re: FFmpeg not working - libvlc stops.

Posted: Mon Apr 04, 2016 8:19 pm
by stefferd
So, today I tried Ubuntu 16.04 with Zoneminder 1.29 and faced the same problems. After some testing, searching and trying i didn't find anything usefull that could solve these issues.
I went back to Ubuntu 15.10 with Zoneminder 1.28.1 as it was in my initial and stable setup. But I faced several new problems, though - which could all be solved. The funniest thing i had was Zoneminder confusing camera's: when clicking on the live view of one camera it showed the image of another one. And then started changing cam to cam in the live view. Found and fixed the problem, though. Libvlc is rendered unusable is this version - it just doesn't work. After searching forums i found out it supposibly had nothing to do with Zoneminder but most probably with the Libvlc version that was incompatible.
I surely will come back to version 1.29 when i can safely use a test enviroment and not a production one.
One thing i did - and it really speeded up things - is change the SWAP folder to the ramdisk (in options > paths > change PATH_SWAP from /tmp/zm to /dev/shm)...
Thanks for all the good advice!

Re: FFmpeg not working - libvlc stops.

Posted: Mon Apr 04, 2016 9:37 pm
by bbunge
HAd a thought today while driving home... You did not try to do a separte install for ffmpeg?

Re: FFmpeg not working - libvlc stops.

Posted: Mon Apr 25, 2016 12:20 pm
by chebo
Have a similar problem. Everything works on 1.28 and 1.29 with the same settings no. In the main menu source lights in red. In the view of the camera not even blue screen.

Cam: Hikvision DS-2CD2032-I

Source Type: FFmpeg
Source Path: rtsp://admin:admin@10.10.10.10//Streaming/Channels/1
Remote Method: rtp/rtsp
Capture Width (pixels): 1280
Capture Height (pixels): 720