Page 1 of 1

Cloned FFMpeg camera not working

Posted: Sun Jul 17, 2016 9:39 pm
by sdi
Hi. I have spent a couple of days on this, and not getting anywhere, so would be very grateful for any suggestions.

I have two Foscam cameras running the same firmware. They are setup exactly the same as FFMpeg sources following the instructions on the wiki https://wiki.zoneminder.com/Foscam_FI9903P

The first is monitor number 3, and works fine.
The second camera is monitor number 8, and I get no images from it in ZoneMinder.

If I change the IP and port numbers in monitor 3 to point it to my second camera, I get the pictures from the second camera fine, so I know it isn't an issue with the camera.

If I change the IP and port numbers in monitor 8 for my first camera, I still don't get any pictures.

I also tried taking a snapshot of my system and removing the third monitor (just in case there was a limit on the number of FFMpeg transcodes), but this did't work either.

It is as if there is a hidden setting preventing it from working.

Thanks in anticipation.

I am running on Ubuntu 16.04 64 bit
In the log it states : Shared data not initialised by capture daemon for monitor Front_Door

Re: Cloned FFMpeg camera not working

Posted: Sun Jul 17, 2016 11:09 pm
by asker
Its entirely possible you are running out of memory with the 2nd camera.
Do a "df -h" and see if you are running out of mapped memory (typically an entry called tmpfs mapped to /run or similar)

Re: Cloned FFMpeg camera not working

Posted: Mon Jul 18, 2016 9:41 pm
by sdi
Thanks. The output of that returns...

Code: Select all

zmadmin@zoneminder64:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               478M     0  478M   0% /dev
tmpfs                              100M   11M   89M  11% /run
/dev/mapper/zoneminder64--vg-root   15G  5.8G  7.8G  43% /
tmpfs                              497M  497M     0 100% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              497M     0  497M   0% /sys/fs/cgroup
/dev/sda1                          472M  193M  255M  44% /boot
tmpfs                              100M     0  100M   0% /run/user/1000
...also disabling all of the cameras except one didn't help. What I have found is that editing an old monitor and replacing with the settings for my new device seems to work OK, it is just newly created monitors aren't working. Really strange. I can't see what the difference is. Maybe some corrupt config or a hidden setting I am missing. I am going through each tab on the Add Monitor tab and carefully copying and pasting the settings. Hmmm.

Re: Cloned FFMpeg camera not working

Posted: Mon Jul 18, 2016 9:50 pm
by gerdesj
This doesn't look healthy: "tmpfs 497M 497M 0 100% /dev/shm"

Here's a non formatted dump straight off my personal (non public) wiki, valid for Trusty - 14.04 but should get you there:

---------------------------------8<------------------------------
To temporarily set it, use something like the following command and restart Zoneminder:

root # mount -o remount,size=2048M /run/shm
Once the right size has been found then set it permanently. See /lib/init/fstab for how the defaults are set, copy the line for /run/shm to /etc/fstab and add a size parameter and then reboot:

File/etc/fstab Snippet from fstab
none /run/shm tmpfs nosuid,nodev,size=2G 0 0
---------------------------------8<------------------------------

Cheers
Jon

Re: Cloned FFMpeg camera not working

Posted: Mon Jul 18, 2016 10:19 pm
by sdi
Thanks - since it is running on a VirtualBox VM I have given it another half GB of RAM so now it looks like this...

Code: Select all

zmadmin@zoneminder64:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               715M     0  715M   0% /dev
tmpfs                              147M  2.5M  145M   2% /run
/dev/mapper/zoneminder64--vg-root   15G  5.8G  7.8G  43% /
tmpfs                              733M  396M  338M  54% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              733M     0  733M   0% /sys/fs/cgroup
/dev/sda1                          472M  193M  255M  44% /boot
tmpfs                              147M     0  147M   0% /run/user/1000
The new monitors are now working, so thanks both for the steer on that! :D

Re: Cloned FFMpeg camera not working

Posted: Mon Jul 18, 2016 10:29 pm
by gerdesj
Cool! I remember hitting the same brick wall as you, except I had four cameras working but the fifth tipped it over the edge and I only noticed the shm thing by chance.

Now, if you happen to know Perl well I have a query posted here 8)

Cheers
Jon

Re: Cloned FFMpeg camera not working

Posted: Mon Jul 18, 2016 10:44 pm
by sdi
I wish I could help, but I don't. :-/