Foscam FI8904W

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Foscam FI8904W

Post by Svenbobot »

Hello, I'm a Linux newbie and I managed to get Zoneminder to work on my Linux Mint. But now I can't get the first of 7 Foscam webcams to work in Zoneminder. I started with the old Foscam FI8904W. I can see the image in the browser via this stream: http://User:Password@192.168.178.20:80/videostream.cgi
This works, but the same stream with rtsp doesn't work in Zoneminder. (rtsp://User:Password@192.168.178.20:80/videostream.cgi)

What other settings do I need to make so that the camera is displayed? Thank you for your help.
User avatar
burger
Posts: 433
Joined: Mon May 11, 2020 4:32 pm

Re: Foscam FI8904W

Post by burger »

RTSP is not the same as HTTP. You must specify the second path as HTTP. It should still work in FFMPEG source type. I don't know if that camera has RTSP paths or not. Check the user manual. The foscam I have uses RTSP at rtsp://user:password@192.168.45.185:88/videoSub or videoMain but I can't say whether it will work for yours or not, as it's a different model.

See https://wiki.zoneminder.com/Foscam
https://wiki.zoneminder.com/Foscam_FI8904W
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
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

Thank you for your advice. Okay, rtsp is not the same as http. But how do I find out the rtsp port? The instructions don't say anything about it. On the internet I have port 88 or port 554. Nothing works. Am I setting it up wrong? I have the following address: rtsp://User:Password@192.168.178.20:88/videostream.cgi
or on my other Foscam camera: rtsp://User:Password@192.168.178.91:554/videoMain

Does it have to be rtsp? Can't you use http?
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

With my newer Foscam I managed it using the VLC player: rtsp://@192.168.178.91:554/videoMain
But then it asks for user and password, twice. If I now use the address with password: rtsp://User:Password@192.168.178.91:554/videoMain

That doesn't work and I think that's also the reason why it doesn't work in Zoneminder.
User avatar
burger
Posts: 433
Joined: Mon May 11, 2020 4:32 pm

Re: Foscam FI8904W

Post by burger »

Svenbobot wrote: Mon Oct 07, 2024 3:51 pm But how do I find out the rtsp port?
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
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

I managed it, the cameras work. Where are the recordings saved?
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

Unfortunately Zoneminder doesn't record. Is it possible to show me how to make the motion-controlled recording work?
Bildschirmfoto vom 2024-10-09 19-43-17.png
Bildschirmfoto vom 2024-10-09 19-43-17.png (164.42 KiB) Viewed 3143 times
User avatar
burger
Posts: 433
Joined: Mon May 11, 2020 4:32 pm

Re: Foscam FI8904W

Post by burger »

Default storage for Zoneminder is /var/cache/zoneminder/events. Although you may want to consider using external storage. See this link for instructions: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

Check that permissions are correct. They should be www-data:www-data. Check that the folders are being created. Also, your log is showing as red on the top nav bar. Check that, maybe the timezone is incorrect or something.

Other than that, I'm not sure why it is not recording, but we should be able to figure it out. Check the above, and if that does not work then go into Options - Logging - LOG_LEVEL_FILE and set to Info. Restart ZM and go to /var/log/zm and see what the logs say.

What guide did you use to install? The best guides are at wiki.zoneminder.com/Debian and wiki.zoneminder.com/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
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

Thank you for your feedback and your help. I have cleared the time zone. It doesn't have to be an external storage device. If possible, the oldest files are always deleted automatically. I have attached a screenshot showing the storage settings in zoneminder and also the storage path; no folders are created there. Where should www-data:www-data be entered, under URL?

Here is an excerpt from a log file:
10/09/24 22:14:27.086032 zmc_m5[208131].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 25700 - Capturing at 15.00 fps, capturing bandwidth 95119bytes/sec Analysing at 15.00 fps]
10/09/24 22:14:33.719371 zmc_m5[208131].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 25800 - Capturing at 15.08 fps, capturing bandwidth 86982bytes/sec Analysing at 14.92 fps]
10/09/24 22:14:35.913324 zmc_m5[247471].ERR-zm_monitor.cpp/678 [Can't mkdir /var/cache/zoneminder/events/5: Permission denied]
10/09/24 22:14:35.913391 zmc_m5[247471].INF-zmc.cpp/220 [Starting Capture version 1.36.33]
10/09/24 22:14:38.708492 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 0 - Capturing at 0.00 fps, capturing bandwidth 172bytes/sec Analysing at 0.00 fps]
10/09/24 22:14:40.033144 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 60 - Capturing at 45.29 fps, capturing bandwidth 269991bytes/sec Analysing at 34.73 fps]
10/09/24 22:14:41.364447 zmc_m5[247471].INF-zm_monitor.cpp/1680 [Eingang (Cam3): 80 - Capturing at 15.02 fps, capturing bandwidth 102374bytes/sec Analysing at 15.02 fps]
Bildschirmfoto vom 2024-10-09 22-06-33.png
Bildschirmfoto vom 2024-10-09 22-06-33.png (171.97 KiB) Viewed 3122 times
Bildschirmfoto1.png
Bildschirmfoto1.png (102.38 KiB) Viewed 3122 times
I have Linux Mint, a friend sent me the instructions for installing it:
sudo apt update
sudo apt upgrade

sudo apt install mariadb-server

sudo su
mariadb

CREATE DATABASE zm;
CREATE USER zmuser@localhost IDENTIFIED BY 'zmpass';
GRANT ALL ON zm.* TO zmuser@localhost;
FLUSH PRIVILEGES;
exit;

exit

sudo apt install zoneminder
sudo chgrp -c www-data /etc/zm/zm.conf
sudo a2enconf zoneminder
sudo a2enmod cgi
sudo systemctl reload apache2.service

sudo mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
Enter bei Passwort
sudo mysql -u root -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
Enter bei Passwort
sudo mysqladmin -u root -p reload
Enter bei Passwort

sudo systemctl restart zoneminder.service
sudo systemctl status zoneminder.service
User avatar
burger
Posts: 433
Joined: Mon May 11, 2020 4:32 pm

Re: Foscam FI8904W

Post by burger »

Svenbobot wrote: Wed Oct 09, 2024 8:26 pm 10/09/24 22:14:35.913324 zmc_m5[247471].ERR-zm_monitor.cpp/678 [Can't mkdir /var/cache/zoneminder/events/5: Permission denied]
What does ls -l /var/cache/zoneminder say?
You probably have to:

Code: Select all

chown -R www-data:www-data /var/cache/zoneminder
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
Svenbobot
Posts: 7
Joined: Sun Oct 06, 2024 12:39 pm

Re: Foscam FI8904W

Post by Svenbobot »

sudo chown -R www-data:www-data /var/cache/zoneminder

Now everything seems to be working, thank you very much.
Let me ask one last question: where can I set how long the recordings remain on the hard drive before they are automatically deleted?
Post Reply