Troubleshooting two cameras that won't work at the same time [Solved]

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Troubleshooting two cameras that won't work at the same time [Solved]

Post by Grewen » Tue Sep 01, 2020 11:10 am

I could need some help with troubleshooting an issue configuring two cheap aliexpress cameras to work at the same time.
They both work if only one is connected. If both are hooked up only one will show video and record events.
I´ve tried reducing the resolution of the stream to all the differnent ones reading that it might be a memory issue but it doesn't help.
I have one camera with green name, function(modect) and source and it is recording and showing events. The second camera has red name and source while function (modect) is green...?
I then disconnect the first camera and then the second camera turns all green and start recording events.
Could it be some confict in the setup?

Running ZM v1.34.16 on a raspi 4 (4GB) running Raspberry Pi OS booting from a 250gb SSD.
/dev/shm: 10%
grabbing the stream url from onvif device manager they look something like this:
camera1: rtsp://10.0.0.10:554/user=admin_password=xyz987_channel=0_stream=0.sdp?real_stream
camera2: rtsp://10.0.0.11:554/user=admin_password=abc123_channel=0_stream=0.sdp?real_stream

cheers
Last edited by Grewen on Thu Sep 03, 2020 10:08 am, edited 1 time in total.

Magic919
Posts: 223
Joined: Wed Sep 18, 2013 6:56 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Magic919 » Tue Sep 01, 2020 12:41 pm

Can you configure both monitors to look at one camera and see how it behaves.

Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Grewen » Tue Sep 01, 2020 12:47 pm

Magic919 wrote:
Tue Sep 01, 2020 12:41 pm
Can you configure both monitors to look at one camera and see how it behaves.
Do you mean clone the working camera? if so, no only one camera works at the time also if they are identical...

Magic919
Posts: 223
Joined: Wed Sep 18, 2013 6:56 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Magic919 » Tue Sep 01, 2020 1:08 pm

What's the lowest resolution and frame rate the cameras can produce? is it at the level the Pi should cope with?

User avatar
Bluemax
Posts: 105
Joined: Wed Jun 12, 2019 5:15 pm

Re: Troubleshooting two cameras that won't work at the same time

Post by Bluemax » Tue Sep 01, 2020 4:03 pm

Maybe they have the same mac address?

Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Grewen » Tue Sep 01, 2020 4:33 pm

Magic919 wrote:
Tue Sep 01, 2020 1:08 pm
What's the lowest resolution and frame rate the cameras can produce? is it at the level the Pi should cope with?
I've tried setting both to 176x120 QCIF... but only one will work

Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Grewen » Tue Sep 01, 2020 4:36 pm

Bluemax wrote:
Tue Sep 01, 2020 4:03 pm
Maybe they have the same mac address?
Good point, but no, they have different mac address and get different IP from DHCP

fontiano
Posts: 27
Joined: Wed Dec 25, 2019 10:29 am

Re: Troubleshooting two cameras that won't work at the same time

Post by fontiano » Tue Sep 01, 2020 5:17 pm

Can you post logs?

It's a very strange problem.. try to configure and add third camera to zoneminder. If you don't have other cameras available you can install an application that transform your smartphone in ip camera and attach it to zoneminder (via wifi) to see if the problem is your zoneminder installation or if those "strange" cameras are the problem.
zm 1.34.22 - Debian 10

burger
Posts: 187
Joined: Mon May 11, 2020 4:32 pm

Re: Troubleshooting two cameras that won't work at the same time

Post by burger » Tue Sep 01, 2020 10:53 pm

You didn't mention what FPS you are running. Lower FPS to something like 5 to start.

https://wiki.zoneminder.com/Single_Board_Computers

RPI is limited. Not a good place to start with ZM. Lower FPS, lower resolution. Don't use 'cheap aliexpress cameras'. That is a recipe for disaster. Start with Monitor, not Record, or Mocord, etc.
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

If you are new to cctv, read this:
https://wiki.zoneminder.com/Dummies_Guide

Magic919
Posts: 223
Joined: Wed Sep 18, 2013 6:56 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Magic919 » Wed Sep 02, 2020 7:21 am

Grewen wrote:
Tue Sep 01, 2020 4:33 pm
Magic919 wrote:
Tue Sep 01, 2020 1:08 pm
What's the lowest resolution and frame rate the cameras can produce? is it at the level the Pi should cope with?
I've tried setting both to 176x120 QCIF... but only one will work
Can you confirm you have set this on the cameras, not ZM.

Then have you validated the camera output? VLC, ffprobe or whatever will do this.

Beetleboy
Posts: 5
Joined: Tue Feb 18, 2020 10:24 pm

Re: Troubleshooting two cameras that won't work at the same time

Post by Beetleboy » Wed Sep 02, 2020 12:50 pm

I have seen this problem on Raspberry pi as well. What worked for me was increasing the amount of memory allocated to the GPU, a setting that can be modified using the raspi-config command, advanced options, memory split. I allocated 256 meg on my Pi 4 and I can support three cameras with that at 6 frames per second

Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Re: Troubleshooting two cameras that won't work at the same time

Post by Grewen » Thu Sep 03, 2020 10:07 am

Beetleboy wrote:
Wed Sep 02, 2020 12:50 pm
I have seen this problem on Raspberry pi as well. What worked for me was increasing the amount of memory allocated to the GPU, a setting that can be modified using the raspi-config command, advanced options, memory split. I allocated 256 meg on my Pi 4 and I can support three cameras with that at 6 frames per second
YES! This solved it. Default was set to 64. I upped it to 512 and now they both work at 960p (dev/shm at 11%). Also checked with zmninja and it worked too.

Thanks to all for your help!

Grewen
Posts: 9
Joined: Thu Jan 16, 2020 10:14 am

Re: Troubleshooting two cameras that won't work at the same time [Solved]

Post by Grewen » Wed Sep 16, 2020 8:44 pm

Just an update. Now running 3 cameras, all connected through WiFi, including the raspberry. I upped the split memory to 800 (going above will crash the raspberry)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests