Two cameras won't display feed

Forum for questions and support relating to the 1.29.x releases only.
Locked
miket0813
Posts: 5
Joined: Thu Aug 17, 2017 1:40 pm

Two cameras won't display feed

Post by miket0813 »

I am running a new installation of 1.29.0 on a raspberry pi3 box and am having problems displaying 2 of my 4 cameras. I have a dlink and foscam that work fine. I just acquired a Hikvision DS-2CD2122FWD-IS and also a Zavio B6210 but I can't get a good feed with ZM. If I load the source path into my VLC player on my windows laptop, I have a perfect stream for all the cameras.

For the Hikvision:
Source Type - Ffmpeg
Maximum FPS - 'blank'
Source Path - rtsp://login:password@ipaddress//Streaming/Channels/101
Remote Method - RTP/Unicast
Target colorspace - 24 bit color
Capture Width (pixels) - 320
Capture Height (pixels) - 240
hikvision.JPG
hikvision.JPG (16.39 KiB) Viewed 111408 times
For the Zavio:
Source Type - Ffmpeg
Maximum FPS - 'blank'
Source Path - rtsp://192.168.1.94/video.pro1
Remote Method - RTP/Unicast
Target colorspace - 24 bit color
Capture Width (pixels) - 320
Capture Height (pixels) - 240
zavio.JPG
zavio.JPG (13.29 KiB) Viewed 111408 times

Sometimes the zavio is all blue and sometimes it looks all distorted like the hikvision. I have tried a few different stream formats but am still getting the same results.

Foscam is 1, Dlink is 2, Hikvision is 3 and Zavio is 4. Here is my latest log snapshot.
zm-log.txt
(25.34 KiB) Downloaded 253 times
I am not sure where to even begin as it looks like I have many problems. I am not savvy with ZM or Pi, so any help would be greatly appreciated.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

Source Path - rtsp://login:password@ipaddress//Streaming/Channels/101
Not sure if this is just a typo, but you've got one too many slashes after ipaddress.

The camera configuration in ZoneMinder is set to 320x240 resolution, but are the two cameras in question actually sending 320x240 streams to ZoneMinder? If not, that's the problem.

Open each camera in VLC player again and then note the resolution reported by VLC. This has to be exact, down to the pixel, and it may not be the same as the advertised resolution.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

Just in case you aren't aware, scroll down to the table at the bottom of my blog to get a reasonable idea of what you can expect on a raspberry pi 3:
http://zoneminder.blogspot.com/p/raspberry-pi-3.html

As you can see, you won't be able to run four HD IP cameras on this hardware w/o significantly reducing the resolution and frame rate in each camera.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
miket0813
Posts: 5
Joined: Thu Aug 17, 2017 1:40 pm

Re: Two cameras won't display feed

Post by miket0813 »

knnniggett wrote: Thu Aug 17, 2017 3:45 pm
Source Path - rtsp://login:password@ipaddress//Streaming/Channels/101
Not sure if this is just a typo, but you've got one too many slashes after ipaddress.
I thought it was weird too, but this is what I found to be the proper source path
knnniggett wrote: Thu Aug 17, 2017 3:45 pm
Open each camera in VLC player again and then note the resolution reported by VLC. This has to be exact, down to the pixel, and it may not be the same as the advertised resolution.
Here is the info from the Hikvision:
Type: Video
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Resolution: 1920x1090
Display resolution: 1920x1080
Frame rate: 30
Decoded format: Planar 4:2:0 YUV full scale

So which do I use, 1920x1090 or 1920x1080? Anything else that I need to note?
miket0813
Posts: 5
Joined: Thu Aug 17, 2017 1:40 pm

Re: Two cameras won't display feed

Post by miket0813 »

knnniggett wrote: Thu Aug 17, 2017 3:55 pm Just in case you aren't aware, scroll down to the table at the bottom of my blog to get a reasonable idea of what you can expect on a raspberry pi 3:
http://zoneminder.blogspot.com/p/raspberry-pi-3.html

As you can see, you won't be able to run four HD IP cameras on this hardware w/o significantly reducing the resolution and frame rate in each camera.
Well that is not too sweet. I was hoping to add several more IP cams to my pi, but not so much huh? Any recommendations on alternative hardware? This is for personal use inside and outside my home with maybe 10 ip cams, so I really don't want to spend a ton. Just need something that works well and isn't too complicated.
miket0813
Posts: 5
Joined: Thu Aug 17, 2017 1:40 pm

Re: Two cameras won't display feed

Post by miket0813 »

"No Server ID or Name specified in config. Not using Multi-Server Mode."

Also getting this error repeatedly in my log. Any ideas?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

miket0813 wrote: Thu Aug 17, 2017 4:43 pm So which do I use, 1920x1090 or 1920x1080? Anything else that I need to note?
Some of my cameras do the same thing. I use 1920x1090.

Frame rate is important. Recommend you set all your cameras to 5 fps or less since you are running on a raspberry pi.

Since the pi only has 1GB of ram, you also have to watch your memory. HD cameras eat up a lot of your ramdisk.

Code: Select all

df -lh /dev/shm
Will tell you how full your ramdisk is. Further details are mentioned in my blog.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

miket0813 wrote: Thu Aug 17, 2017 5:16 pm "No Server ID or Name specified in config. Not using Multi-Server Mode."

Also getting this error repeatedly in my log. Any ideas?
Look closely and you will see that message is not an error at all. It has as status of INFO, which means FYI.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

miket0813 wrote: Thu Aug 17, 2017 4:46 pm Well that is not too sweet. I was hoping to add several more IP cams to my pi, but not so much huh? Any recommendations on alternative hardware? This is for personal use inside and outside my home with maybe 10 ip cams, so I really don't want to spend a ton. Just need something that works well and isn't too complicated.
I'm using a raspberry pi 3 at my parent's home, but their three cameras are VGA resolution at 5fps.

My mother-in-law has got the machine described here, running three 1080p cameras at 5fps:
http://zoneminder.blogspot.com/p/hp-slimline-450.html

The HP Slimline 450 gets you a lot of performance for relatively little cost, but you won't be able get ten 1080p cameras to run reliably.
You should however be able to get 10 at 720p.

If you want a more precise answer than that, then we need to know the desired frame rate and resolution of each and every camera, how long you want the server to retain the video, and your budget.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
miket0813
Posts: 5
Joined: Thu Aug 17, 2017 1:40 pm

Re: Two cameras won't display feed

Post by miket0813 »

knnniggett wrote: Thu Aug 17, 2017 5:19 pm
miket0813 wrote: Thu Aug 17, 2017 4:43 pm So which do I use, 1920x1090 or 1920x1080? Anything else that I need to note?
Some of my cameras do the same thing. I use 1920x1090.

Frame rate is important. Recommend you set all your cameras to 5 fps or less since you are running on a raspberry pi.

Since the pi only has 1GB of ram, you also have to watch your memory. HD cameras eat up a lot of your ramdisk.

Code: Select all

df -lh /dev/shm
Will tell you how full your ramdisk is. Further details are mentioned in my blog.
Ok, thanks for the info. Here is my df output:
tmpfs 462M 383M 79M 83% /dev/shm

That is after I removed the Zavio. Not looking too good.

I tried to give the cameras 5 FPS but they all wen't wonky and digitized. The Hikvision went blue. I removed the 5 from the FPS field and all seems well.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Two cameras won't display feed

Post by knight-of-ni »

Make sure you set the frame rate in the camera's web portal, not in zoneminder.

You can increase the size of /dev/shm a little in your fstab, but you can't go too far or you steal memory away from the operating system which will cause other problems. Lower your image buffer from 50 -> 35 for each monitor. That will use much less ram.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked