Page 3 of 4

Re: ZM on FreeBSD

Posted: Tue Jul 05, 2016 5:42 pm
by knight-of-ni
melloa wrote:I've documented the steps to install ZM on FreeBSD and FreeNAS with Abi but can't attach a pdf to this forum (invalid file extension). I've posted on the FreeNAS forum but would like to have it available here as well. Any ideas how can I make this happen?
Upload it to Dropbox/Google Drive and then a post a link to it here?

Re: ZM on FreeBSD

Posted: Tue Jul 05, 2016 6:24 pm
by melloa
Upload it to Dropbox/Google Drive and then a post a link to it here?
Don't like share things from my cloud, but for the love of science: https://drive.google.com/file/d/0B6clHa ... sp=sharing

Please test.

Re: ZM on FreeBSD

Posted: Wed Aug 17, 2016 3:19 pm
by Z0RrO
First and foremost, thank you for your exhaustive guide. Zoneminder (1.30) works under FreeBSD 10.3
In order to contribute, here the issues I had:
  1. 1- ZMNinja fails to Montage. I had to add a new location to the nginx.conf (step 7.2 of your procedure) as follow:

    Code: Select all

            location = /cgi-bin/zms {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME
                $document_root$fastcgi_script_name;
                fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
            }
  • 2- API call to /api/monitors/daemonStatus/id:1 is causing a FatalErrorException. The API is used when navigating in the Monitors item in ZMNinja. The error return is:

    Code: Select all

    Error: Call to undefined function ctype_digit()	
    File: /usr/local/www/zoneminder/api/lib/Cake/Utility/Set.php	
    Line: 415
    I have yet to correct this issue
  • 3- External trigger (zmtrigger.pl enabled via OPT_TRIGGER) is missing perl module Device::SerialPort
    The perl module can be installed by doing

    Code: Select all

    pkg install p5-App-cpanminus
    cpanm install Device::SerialPort 

Re: ZM on FreeBSD

Posted: Sun Aug 28, 2016 10:08 am
by abi
2. http://www.freshports.org/textproc/php56-ctype/
3. http://www.freshports.org/comms/p5-Device-SerialPort/

I'll include them in next port revision. Thanks for report.

Re: ZM on FreeBSD

Posted: Fri Feb 24, 2017 6:40 pm
by eracc
(Copied from the 1.30 Support Forum)

-----
Greetings folks, long time, no post. :D I may need the assistance of ZM on FreeBSD experts on this one. ;)

I am trying to get a USB Logitech HD Pro Webcam C920 working with ZoneMinder 1.30 on my FreeBSD 11.0 workstation at work. This is not a business related task, so it won't be earth shattering if I can't make it work. I do have the camera working with webcamd (which creates /dev/video0 as expected) and pwcview, so I know the camera does work. However, I want the control that ZM would give me.

Here are the specifics:
  • FreeBSD 11.0-RELEASE x86_64
    NGINX1.10.2_3,2 (installed from pkg)
    ZoneMinder h264 1.30.20161104_1 (installed from pkg)
    webcamd 4.8.0.4 (installed from pkg)
When I attempt to create a monitor in the ZM web gui using the /dev/video0 device all I get is a "broken image" icon and errors in the log. Yes, the www user is a member of the webcamd group that owns the file:

Code: Select all

$ getent group webcamd
webcamd:*:145:www
Here is a relevant section from the log of last Friday ('cause I removed the monitor not long after this and there is nothing relevant in the days since):

Code: Select all

2017-02-17 02:33:38.664580	zmdc		95250	ERR	'zmc -d /dev/video0' exited abnormally, exit status 255	zmdc.pl	
2017-02-17 02:33:38.645311	zmc_dvideo0		101541	FAT	Failed to get picture attributes: Invalid argument	zm_local_camera.cpp	941
2017-02-17 02:33:38.643617	zmc_dvideo0		101541	INF	Starting Capture version 1.30.0	zmc.cpp	250
2017-02-17 02:33:38.635208	zmc_dvideo0		101541	INF	No direct match for the selected palette and target colorspace. Format conversion is required, performance penalty expected	zm_local_camera.cpp	551
2017-02-17 02:33:38.084850	zmdc		96408	INF	'zmc -d /dev/video0' started at 17/02/16 17:33:38	zmdc.pl	
2017-02-17 02:33:38.084670	zmdc		95250	INF	'zmc -d /dev/video0' starting at 17/02/16 17:33:38, pid = 96408	zmdc.pl	
2017-02-17 02:33:38.082070	zmdc		95250	INF	Starting pending process, zmc -d /dev/video0	zmdc.pl	
2017-02-17 02:33:33.259660	zmfilter		96400	INF	Scanning for events	zmfilter.pl	
My questions:
  • Should I expect ZM on FreeBSD to work with the /dev/video0 device created by webcamd?
  • If not, what should I be using instead of the webcamd daemon?
  • Should I expect a USB webcam to work with ZM on FreeBSD? Is that something that is supported?
If any of you have some information for me about this, awesome. If you need more information, tell me what you want to know. Thanks!
-----

P.S. I was told this forum thread is where all the cool kids hang out. ;)

Re: ZM on FreeBSD

Posted: Fri Feb 24, 2017 9:18 pm
by achix
just get a network camera which works with FreeBSD, lots of work, patience and possibly pray. Webcam?? The chances are small.

Re: ZM on FreeBSD

Posted: Fri Feb 24, 2017 11:51 pm
by eracc
Yeah ... no. I am not going to buy a network camera just for this. If it were something work related that had to be working with ZM, then I would probably get an Axis and be done with it. But this is a "free" webcam that was given to me that I am just playing around with.

That said, if there is a way to make it work with ZM on FreeBSD, even if it requires some effort, I would like to do that for the learning experience if nothing else. So, I am still open to suggestions for getting the webcam working with ZM here.

Thanks for the reply none the less. :)

Re: ZM on FreeBSD

Posted: Sat Feb 25, 2017 5:28 am
by achix
back in the day (2007?) when I got my hands dirty porting the ZM linux camera code to FreeBSD ZM (was it 1.23?) with the bktr driver, it was a lot of work. Later when I tried porting 1.25, touching the local camera was out of the question - it was getting harder to understand the code. Now I guess I would not touch anything.

Is there any service on FreeBSD that would serve webcamd via e.g. http? If so, your chances are getting bigger.

Re: ZM on FreeBSD

Posted: Sat Feb 25, 2017 1:48 pm
by knight-of-ni
I would like here from abi, the maintainer of the current port, to see what he might have done to handle local video devices on FreeBSD.
He pops in from time to time. He might not have touched this part of zoneminder, but it would be good to know that.
That would at least help define what exactly still needs to be done.

Re: ZM on FreeBSD

Posted: Sun Feb 26, 2017 7:17 am
by achix
Browsing here : https://svnweb.freebsd.org/ports/head/m ... rtdir=down I don't think there is any local camera code ported. When bsam took over he didn't even own a camera. I don't know the status with abi.
What's the status of v4l on FreeBSD?

Re: ZM on FreeBSD

Posted: Sat Mar 18, 2017 9:42 pm
by abi
(installed from pkg)
I disabled local code in default package because it left untested as I don't have any USB cameras. You need to compile ZM from ports with V4L knob on.

Re: ZM on FreeBSD

Posted: Mon Mar 20, 2017 6:56 pm
by eracc
abi wrote:
(installed from pkg)
I disabled local code in default package because it left untested as I don't have any USB cameras. You need to compile ZM from ports with V4L knob on.
Ah, okay. That will have to wait a bit. I will report back once I try that. Thanks!

Re: ZM on FreeBSD

Posted: Tue May 16, 2017 11:02 pm
by Paul Jones
melloa wrote:
Tue Jul 05, 2016 6:24 pm
Upload it to Dropbox/Google Drive and then a post a link to it here?
Don't like share things from my cloud, but for the love of science: https://drive.google.com/file/d/0B6clHa ... sp=sharing

Please test.
Thanks Bro! For the love of science!

Cheers!
Paul Jones
http://www.stlouiscitytowing.com/

Re: ZM on FreeBSD

Posted: Sun May 28, 2017 7:20 am
by fabbat
Hi Guys,
finally I installed ZoneMinder on my FreeBSD/FreeNAS box. And it works great. Now I would like to customize it a bit, putting control GUI for the PTZ functions as described in the wiki https://wiki.zoneminder.com/Foscam_Clones.
The problem is reated to different path of the filesystem between Ubuntu and FreeBSD. Does anyeone know the correct path where to put scripts of zoneminder under FreeBSD installation?
Thnak you so much

Re: ZM on FreeBSD

Posted: Sun May 28, 2017 8:41 pm
by abi
vendor_perl under FreeBSD is /usr/local/lib/perl5/site_perl