Creative webcam works in gstreamer, not ZM :(

Forum for questions and support relating to the 1.24.x releases only.
Locked
wkulecz
Posts: 36
Joined: Thu Mar 15, 2007 12:34 pm

Creative webcam works in gstreamer, not ZM :(

Post by wkulecz »

I've an old Creative PD1030 USB webcam that installs as /dev/video1 when I plug it into Ubuntu 10.04 with zm1.24.2 from the repo.

It works fine with gst-launch -v v4l2src device=/dev/video1 ! autovideosink.

The verbiage from gst-launch says its 640x480 YV12 framerate=100/1.

I don't see YV12 as a selection in zoneminder and I can't get it to work. If I set 640x480 image size the /dev/video1(0) link stays red. If I set 320x240 the link goes yellow but the monitor window show green with moving flashing black lines and "static". I've tried all the Source Tab Capture Palette settings.

Is something setup incorrectly in zm that prevents setting a 640x480 frame size on any of my other cameras too?
Actually 320x240 is fine for my purposes so I haven't asked about it until now.

I don't think 640x480 vs. 320x240 capture size is the issue as I can set gstreamer to use a 320x240 capture with a more complicated gst-launch command and the webcam works fine.

Ideas, other than that Video for Linux is fundamentally a piece of crap.
Your commitment to Freedom is measured by your tolerance of others doing things you disapprove.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Creative webcam works in gstreamer, not ZM :(

Post by bb99 »

You asked the right question: Yes, shared memory (default size) will not be enough to process 640*480 but will work with 320*240 24 bit color no problem. To eliminate that, change the shmmax value in /etc/sysctl.conf to a value of 268435456 is normally what I suggest but actually increasing it in increments should give you a minimal value that will work. I also set the shmall to this setting but I don't think it's necessary. There is a post with a script to help determine this value but you'll have to look for it (search is complaining that shared memory is too common a search and won't display results).
wkulecz
Posts: 36
Joined: Thu Mar 15, 2007 12:34 pm

Re: Creative webcam works in gstreamer, not ZM :(

Post by wkulecz »

a value of 268435456 is normally what I suggest
Changed it rebooted, no difference.

I can live with 320x240 images, what bothers me is that the webcam works using gstreamer (v4l2) but not zoneminder :(
Your commitment to Freedom is measured by your tolerance of others doing things you disapprove.
jbmia
Posts: 50
Joined: Sat Jul 30, 2011 1:56 pm

Re: Creative webcam works in gstreamer, not ZM :(

Post by jbmia »

Install sys::mmap...

Is the cam local or remote.. if local definitely try Masterknife's performance patch.. he opened up the color pallette to include mjpeg and it made it alot easier for me to get my web cams working..

Check my post here for my experiences setting up web cams: http://www.zoneminder.com/forums/viewto ... 21&t=18039

Oh yeah.. one more thing.. when you start mjpg-streamer, are you passing 640x480 params to the start command? If so, is it actually starting in 640x480.. in my case, I was passing 640x480 on start command, but when starting, I got a message in mjpg-streamer output indicating it couldn't use 640x480 and was falling back to 320x240.. Just a thought..

jbmia
wkulecz
Posts: 36
Joined: Thu Mar 15, 2007 12:34 pm

Re: Creative webcam works in gstreamer, not ZM :(

Post by wkulecz »

What is sys::mmap?

Its a USB webcam, if remote I believe it would be called a netcam, that installs as a V4l2 device. Using gstreamer it works by default at 640x480 or I can get 320x340 with a "capsfilter" in the gst-launch command.
Your commitment to Freedom is measured by your tolerance of others doing things you disapprove.
Locked