[solved] Can not connect cameras (Unable to open input ... No such file or directory)

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
ElectricGears
Posts: 2
Joined: Mon Oct 12, 2020 11:42 am

[solved] Can not connect cameras (Unable to open input ... No such file or directory)

Post by ElectricGears »

I have some Axis 207MW cameras that I am trying to use with Zoneminder but I can not get them connected. When I try to set them up the log is filled with repeating errors and the camera's entry in the console says it's not capturing and there is no video when I click on the camera's name.

Code: Select all

zmc_m2	ERR	Unable to open input 192.168.1.80/axis-cgi/mjpg/video.cgi?camera=&resolution=320x240 due to: No such file or directory	zm_ffmpeg_camera.cpp	393
zmc_m2	ERR	Failed to prime capture of initial monitor	zmc.cpp	257
If I enter the url into Firefox I get a live image from the camera and I can use the camera's web interface. (I've left it unencrypted and without a password for testing purposes for now.)

I am new to Zoneminder and somewhat new to Linux so I tried the Docker image. I found instructions to check ZM_PATH_ZMS and ScriptAlias in some configuration files but they did not exist on my system. (I assume this is because they are in inside the Docker container but I couldn't find out how to modify it.) I tried the native install which did leave some configuration files for me to find.

/etc/apache2/conf-enabled/zoneminder.conf contains ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" (the last line is an existing directory)

As instructed by the readme file in /etc/zm/conf.d I added a new file containing ZM_PATH_ZMS=/cgi-bin/nph-zms (I also tried ZM_PATH_ZMS=/usr/lib/zoneminder/cgi-bin/nph-zms) but neither worked. The readme instruction sudo chown root:apache *.conf returned chown: invalid group: ‘root:apache’ apache2 also doesn't work, but I don't know if this is a problem because the permissions on that new file allow anyone to read it.

Ubuntu 20.04.1 LTS, Zoneminder v1.34.21, Firefox 81.0 (64-bit)
Last edited by ElectricGears on Thu Oct 15, 2020 11:14 am, edited 1 time in total.
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Can not connect cameras (Unable to open input ... No such file or directory)

Post by burger »

First off, 1.35 is unstable. You should have 1.34. That aside.

Some (older) axis cameras only work w/zm when anonymous auth is enabled. Don't use docker w/zm unless you know how to use docker. Or, expect to learn docker when things don't work. Test path in vlc and or ffmpeg. Firefox may have a different path for the video, or it may serve the video on a webpage... You need the path for the video, not the webpage itself.

Install Ubuntu using https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.34.x
from https://wiki.zoneminder.com/Ubuntu These guides are tested, and will work. Ubuntu 18 is not 20, so things might be different. Maybe bbhunge can help you here, as I don't use Ubuntu.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ElectricGears
Posts: 2
Joined: Mon Oct 12, 2020 11:42 am

Re: Can not connect cameras (Unable to open input ... No such file or directory)

Post by ElectricGears »

[It looks like I accidentally posted this in the wrong section, it should be in the 1.34.x board.]

The url I used doesn't go to a web page served bu the camera. It's what's listed in the wiki for this Axis camera. (Other resolutions work too.) Firefox just shows a single image in the center of the screen like when you view raw .png of .jpg files. The camera's interface (which also shows the live video) is just the IP address. http://192.168.1.80/axis-cgi/mjpg/video ... on=320x240 entered as a Network stream works in VLC (albeit with a significant delay).

I had a lengthy draft post, but in the process of trying and confirming things I found out it was the line in /etc/apache2/conf-enabled/zoneminder.conf It needed to be ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin/nph-zms" I suppose that's the default location for zoneminder since I didn't do anything to install it differently than the standard apt system.

In addition, I removed the custom ZM_PATH_ZMS=/zm/cgi-bin file leaving the default of ZM_PATH_ZMS=/zm/cgi-bin/nph-zms and it's still running correctly after restarting apache and zoneminder.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: [solved] Can not connect cameras (Unable to open input ... No such file or directory)

Post by Magic919 »

My Ubuntu machine has Apache conf - It shouldn't reference nph-zms

Code: Select all

ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
The custom path is

Code: Select all

# ZoneMinder url path to the zms streaming server
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
-
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: [solved] Can not connect cameras (Unable to open input ... No such file or directory)

Post by burger »

So it was an install issue...

Recommended guides for install are:
https://wiki.zoneminder.com/Ubuntu
https://wiki.zoneminder.com/Debian

Users coming across this thread having trouble connecting to cameras:
https://wiki.zoneminder.com/Finding_Camera_Stream_Paths
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Post Reply