Page 1 of 1

No Video Being Displayed

Posted: Fri Oct 14, 2011 9:09 pm
by FullMoonMadness
Hello,

I cannot see any video when I click on the camera name, and I see /dev/video0 in red text.

I am running
Ubuntu 9.10 (fresh install)
Zoneminder 1.24.1
Logitech Quickcam E 3500 (USB connection)
I used the instructions at the link below, but stopped after setting t memory in sysctl.conf because it looked like the rest pertained to a capture card.
http://www.zoneminder.com/wiki/index.ph ... 10_Desktop

I've seen these errors in various logs:

Code: Select all

Failed to set picture attributes: Invalid argument

Code: Select all

Got signal 6 (Aborted), exiting and forcing backtrace

I know my camera works (tested with xawtv). I've tried it on the ZMLarch livecd and it works (however, when I install ZMLarch, I have other issues). The settings that work iwith the ZMLarch livecd that I cannot duplicate in Ubuntu are:

Code: Select all

Capture Method: Video for Linux version 2
Device Format: NTSC
In Ubuntu, NTSC is not an option under Video for Linux 2, but is an option on version 1. There are other NTSC options in version 2: NTSC M, NTSC M JP, NTSC 443, NTSC M KR. I've tried all of them, but without luck.


Any help or advice would be greatly appreciated. Thanks!

Re: No Video Being Displayed

Posted: Fri Oct 14, 2011 10:45 pm
by bb99
Resolution and palette are critical for all cameras (their output vs ZM's expected input, they must match exactly); the only reference I can point you to is: http://www.zoneminder.com/wiki/index.ph ... ility_List for settings. If you can get the stream into Firefox then select view::page source or IE just right click and select properties. Either should give you clues as to what the settings should be. Palette is guess work but YUYV (?) seems to be a posted favorite. Link to the 9000: http://www.zoneminder.com/wiki/index.ph ... m_Pro_9000

Re: No Video Being Displayed

Posted: Sat Oct 15, 2011 3:04 pm
by FullMoonMadness
Thanks BB99, I'll give it a try tomorrow night when I get home.

Re: No Video Being Displayed

Posted: Tue Oct 18, 2011 12:29 am
by FullMoonMadness
bb99 wrote:Resolution and palette are critical for all cameras (their output vs ZM's expected input, they must match exactly); the only reference I can point you to is: http://www.zoneminder.com/wiki/index.ph ... ility_List for settings. If you can get the stream into Firefox then select view::page source or IE just right click and select properties. Either should give you clues as to what the settings should be. Palette is guess work but YUYV (?) seems to be a posted favorite. Link to the 9000: http://www.zoneminder.com/wiki/index.ph ... m_Pro_9000

I tried PAL B with YUYV and didn't have any luck. I used the attached file (page 17) as a guide and tested with 320x240. I even tried all the other PAL's listed under linux version 2 and version 1, but to no avail.

I tried a number of commands in terminal for zmu, like the one below:

Code: Select all

sudo zmu -d /dev/video0 -g -v
but they all returned this error:

Code: Select all

Error, failed to get channel 0 attributes: Invalid argument

How can I get the stream into Firefox? Any other ideas? Thanks!

Re: No Video Being Displayed

Posted: Sat Oct 22, 2011 10:20 pm
by FullMoonMadness
Okay, I now have video. I deleted this line from the sysctl.conf:

Code: Select all

kernel.shmall = 134217728 kernel.shmmax = 134217728
And I added the line below to zmdc.pl per a link I found online. I added it just above "my @daemons =…." around line 64.

Code: Select all

$ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/v4l2convert.so’;
I set my camera to
Video for Linux version 2
PAL B
YUYV
176x144

For some reason I can't increase the resolution. I suspect it might have something to do with the kernal.shmall and shmmax. The above command was provided by the install instructions, but likely calculated for the author's PC, and not mine.

Re: No Video Being Displayed

Posted: Sat Oct 22, 2011 10:27 pm
by bb99
Why delete the shmall/shmmax entries? This is almost certainly the problem with resolution.

Re: No Video Being Displayed

Posted: Tue Oct 25, 2011 2:45 am
by FullMoonMadness
bb99 wrote:Why delete the shmall/shmmax entries? This is almost certainly the problem with resolution.
My installation didn't seem to work with the command in there. Like I said above, it was probably calculated for someone else's machine configuration. Can you tell me how to calculate the correct shmall/shmmax? Thanks!

Re: No Video Being Displayed

Posted: Tue Oct 25, 2011 4:22 am
by bb99
134217728 is the standard value for both. This is generally good for a resolution of 320*240. To go to 640*480 you really need to double shmmax. Calculation is based on this wiki post and experience: http://www.zoneminder.com/wiki/index.ph ... solutions.

Re: No Video Being Displayed

Posted: Thu Oct 27, 2011 5:07 am
by FullMoonMadness
bb99 wrote:134217728 is the standard value for both. This is generally good for a resolution of 320*240. To go to 640*480 you really need to double shmmax. Calculation is based on this wiki post and experience: http://www.zoneminder.com/wiki/index.ph ... solutions.
I tried changing the shmmax to 324403200 per that link, then my resolution to 320x240 and the camera didn't work. Here's my process:

I ran this:

Code: Select all

# cat /proc/sys/kernel/shmall
2097152
and this

Code: Select all

# cat /proc/sys/kernel/shmmax
33554432
and came up with those values.

I calculated the shmmax:
320 x 240 = 76800
x24 bits of color = 1843200
x80 frames ring buffer (but my image buffer size is set to 40) = 147456000
x2 cameras = 294912000
plus 10% overhead = 324403200

My /etc/sysctl.conf had this entry added at the bottom:

Code: Select all

kernel.shmmax = 324403200
Am I missing something? Thanks!

Re: No Video Being Displayed

Posted: Thu Oct 27, 2011 11:36 pm
by bb99
Your math is fine. Experience tells me that a value of 268435456 for shmmax should work for you just fine xo your value should work also.

Re: No Video Being Displayed

Posted: Tue Nov 08, 2011 3:47 am
by FullMoonMadness
I can't seem to get my second camera (/dev/video1) to work at the same time as the first (/dev/video0). It works separately, so I know it works.

video0 has a channel of 0, does video1 need to have a different channel? I've tried using the same channel and a different channel, but it hasn't made a difference.

Sometimes, when ZM boots, video1 is the functioning camera (listed in green), while vedo0 doesn't work.

I've tried putting both cameras at a 160x120 resolution, but haven't had any luck. I've tried using different drivers (video for linux version 1 for video1)

Whichever camera is not working, I get the below error in /tmp/zmdc.log (with the corresponding "/dev/video*")

Code: Select all

11/07/11 21:40:207163 zmdc[1383].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
Any ideas? Do you still think it's memory? Are there any other options I can try to resolve the memory issue? Thanks!