cameras don't display image from camera, windo just flashes on and off

Forum for questions and support relating to the 1.30.x releases only.
Locked
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

I Got a new computer and installed Ubuntu 18.04 fresh. Local webcam on /dev/video0 and remote camera don't show image/video from camera. it appears to be connected i.e. it is in green not red but when I click on the camera the window opens and it looks like it tries to show the image but then flashes off quickly and keeps trying in a loop of blank window flashes trying to display the image although it is still blank and then flashes back to blank except for the header and footer info in the window. If I stop zoneminder I am able to connect to my webcam via cheese or vlc so I know /dev/video0 is set up properly. It appears zoneminder 1.30.4 is jacked up. The difficulty I always have getting zoneminder to work always amazes me. I have followed the manual instructions exactly and even used the install script in case there was something I forgot to no avail. zoneminder starts and works, I can add cameras etc and they appear as though they should function but just simply don't. I don't really have any hope of getting any help here as I never have in the past, just always eventually figured it out on my own but I thought I would post and hope for the best that there is someone out here that could help in this case. Any ideas?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: cameras don't display image from camera, windo just flashes on and off

Post by bbunge »

If you used the install script from the WIKI then it is your camera that is not set up right.
For the USB camera try PAL B, 32 bit colour and 640x480 resolution.
For the ip camera use the string you used in VLC and the reported resolution in VLC with ffmpeg.
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

PAL? in the U.S.? I have never used that in the past. I set these up the same way I had them set up in my last Ubuntu 18.04/zoneminder 1.30.4 install on my old machine I just replaced that worked fine 2 weeks ago so I am confused why all of a sudden I should use PAL. What would have changed in 2 weeks?
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

I tried your recommendation and the camera is now in red and doesn't even try to open so that would be wrong. any other ideas?
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

I also notice that if zoneminder is running the Cheese app in Ubuntu will not show my webcam but it works if I stop the zoneminder service so it is taking control of the video device it just won't show any image from either of them.
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

I don't expect that I will get any response but I have decided to just call it quits with zoneminder. it is always extremely difficult to get working and I go through this every time I upgrade or get a new system. I will just use the Android app and Web App through d-link instead but thanks for trying to help it's just too bad that zoneminder tries to do so many things, that it can't do the basics correctly.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: cameras don't display image from camera, windo just flashes on and off

Post by rockedge »

PAL? in the U.S.?
PAL or NTSC only matters when broadcasting....PAL and NTSC are how colors are generated on televisions by the signal type sent to them. I do not think a computer LCD screen or other monitor types or webcams use PAL or NTSC.

I have extensive experience streaming webcams from zoneminder....different than IP net cams in the fact that the machine must decode the camera signal and needs a driver of some sort to make the webcam function.....adds to the CPU loads in a big way, Most machines can not run more than 1 or 2 webcams and zoneminder together.

your problem sounds like the resolution is incorrect. I would have tried either PAL or NTSC and *MJPEG with 3-5 frames max and a res of 320x240 to start. Sometimes (a lot) it happens that the webcam or /dev/video0 does not have the correct permissions.....simple to to test with a quick

Code: Select all

chown www-data /dev/video*
or add www-data to the video group...this is in the instructions.

Code: Select all

adduser www-data video
before you throw in the towel did you check these things? what does the /dev/shm values say? webcams like I mentioned are resource hogs.
95% of the time it is a permissions problem 4% wrong resolution ..I have used PAL, Auto or NTSC with the same camera..(Logitech cheapo)
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

Thanks but I have tried all of these things. I have had zoneminder 1.30 working with these same cameras in the past on ubuntu 18.04 on my old computer that took a dump. I got a new machine, hp omen with nvidia 1070 and installed ubuntu 18.04 fresh on the 256 GB SSD drive. As I say, I am able to get zoneminder (1.30 and 1.31, tried both) installed and added the cameras but using the same settings I have used in the past for these cameras and trying your suggestions it does not work. Your suggestions the camera stays in red i.e. not connected, not recognized etc. if I use the same settings that worked in the past i.e. local cam on /dev/video0 and ip cam with user:password@ipaddress:port the cameras are listed in green i.e. connected and active but when I click on them and the window opens there is no image and every 5 seconds or so the window flashes like it's trying to show an image but it is still blank. If I stop zoneminder then I can use cheese to view the local webcam and I am also able to use a windows version of firefox with the d-link plugin installed or my dlink account or the Android app to view the ip camera on localhost. So the camera's are working it is just zoneminder that doesn't know what to do with them.
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

OK, got it. I did a complete uninstall of zoneminder, deleted the mysql database for zm through phpmyadmin and reinstalled following the instructions to the letter and now my cameras work when I add them. Thank you very much for the input.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: cameras don't display image from camera, windo just flashes on and off

Post by rockedge »

sometimes it just takes throwing some ideas around.. Glad you got it going and not giving up :D
bjb1959
Posts: 27
Joined: Mon Oct 06, 2014 12:57 pm

Re: cameras don't display image from camera, windo just flashes on and off

Post by bjb1959 »

:) yep. My guess is the deleting the zm database was the key. my guess is the first time I installed I missed a step and uninstalling/reinstalling zoneminder wasn't enough. at any rate, any one reading this with similar issues starting all over clean may work for you as well.
Locked