webcam ov511: all but ZM works

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

webcam ov511: all but ZM works

Post by ttsoares »

Sorry to bother... but after a day hitting this, i give up!

Had installed ZM with bttv cards. Piece of cake...

Today, new challenge: USB Creative Labs OV511 USB webcam.
----------------------------------------------------------

The bttv is working. :)

This is working:
vidcat -d /dev/video0 -p y -s 640x480 > /var/www/htdocs/test.jpg :)

This is working:
gqcam -v /dev/video0 -d /var/www/htdocs/test.jpg -t JPEG -i YUV :)

This is OK:
# zmu -d /dev/video0 -q -v :)
Video Capabilities
Name: OV511+ USB Camera
Type: 513
Can capture
Can capture subareas of the image
Video Channels: 1
Audio Channels: 0
Maximum Width: 640
Maximum Height: 480
Minimum Width: 64
Minimum Height: 48
Window Attributes
X Offset: 0
Y Offset: 0
Width: 640
Height: 480
Picture Attributes
Palette: 10 - YUV420
Colour Depth: 12
Brightness: 35328
Hue: 32768
Colour :30976
Contrast: 13824
Whiteness: 26880
Channel 0 Attributes
Name: Camera
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL

This do not result in any error message:
# zmc -d /dev/video0 :)

At debug lever 4 zmdc.log do nor show any error message. :)

BUT :cry: there is no image at the stream or at stilt images, with ffmpeg, cambozola, jpeg or any other combination os settings imaginable...

This is Slackware 11 and kernel 2.6.18.2.

Could a bad httpd.conf prevent image/stream to work at all ?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Yes, a bad httpd.conf can break many things. I assume your main message slog does not show any problems? Try using zmu to dump an image to disk, and then view that using an image viewer, or copy it somethwere where you can see it. We need to find out if images are being captured correctly first.
Phil
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

trying zmu

Post by ttsoares »

First a query:

zmu -v -d /dev/video0 -q
Video Capabilities
Name: OV511+ USB Camera
Type: 513
Can capture
Can capture subareas of the image
Video Channels: 1
Audio Channels: 0
Maximum Width: 640
Maximum Height: 480
Minimum Width: 64
Minimum Height: 48
Window Attributes
X Offset: 0
Y Offset: 0
Width: 640
Height: 480
Picture Attributes
Palette: 10 - YUV420
Colour Depth: 12
Brightness: 21504
Hue: 32768
Colour :30976
Contrast: 13824
Whiteness: 26880
Channel 0 Attributes
Name: Camera
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL

BUT, what is the exact sintax to capture a stilt image with zmu ?
Tryed a lot of combinations with "-i" and no file created...

This zmu test must be done with ZM in 'stoped' or 'running' status ?

Plus, YUV420 == YUV420P ??

Thanks for your answer...
The fact is a secondary aspect of Reality.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi Thomas,
Let me know if you need me to take a look again ;)

Cheers,
Corey
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

xmu syntax... please

Post by ttsoares »

Greeting Cordel !

Could you give an example about the syntax of the command to capture one frame with zmu ?
The fact is a secondary aspect of Reality.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

I think this should work:

Code: Select all

zmu <-d device_path> -v -i [-U<username> -P<password>]
See zmu --help

Regards,
Corey
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

zmu the saga...

Post by ttsoares »

# zmu -d /dev/v4l/video0 -v -i

and

# zmu -d /dev/video0 -v -i

Error, -d option cannot be used with this option


ls -la /dev/video0
lrwxrwxrwx 1 root root 10 Nov 12 23:27 /dev/video0 -> v4l/video0

The ZM_OPT_USE_AUTH is off, so there is no need to user/pass. Correct ?

I tryed this as root and as apache user. With ZM running and stoped.
The fact is a secondary aspect of Reality.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You might have to use the monitor number insted of the device.
zmu -m1 -v -i
Sorry don't have a machine here to check with.

Regards,
Corey

[edit]
I setup a test machine here real quick just to test the above syntax and it works for me using the monitorID. 8)
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

Fresh install and still no stream...

Post by ttsoares »

After some weeks dealing with other issues, i am back to this ZM problem.

Did a install from scratch of ZM today.

Still no stream or image.

Still xawtv works and this
/usr/local/bin/gqcam -v /dev/video0 -d /var/www/htdocs/test.jpg -t JPEG -i YUV

The only tips i have now are:

1) From /var/log/messagens
zmwatch[18919]: INF [Restarting capture daemon for Cam, shared memory not valid]

2) From zmdc.log
12/03/06 01:25:45.090747 zmdc[20100].INF ['zmc -d /dev/video0' started at 06/12/03 01:25:45]
12/03/06 01:25:45.099851 zmdc[20044].INF ['zmc -d /dev/video0' starting at 06/12/03 01:25:45, pid = 2 0100]
12/03/06 01:25:47.178567 zmdc[20044].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
Use of uninitialized value in numeric ne (!=) at /usr/lib/perl5/site_perl/5.8.8/ZoneMinder/SharedMem. pm line 251.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/ZoneMinder/SharedMem.pm line 259.

I had tried this
echo 134217728 >/proc/sys/kernel/shmall && echo 134217728 >/proc/sys/kernel/shmmax
but did not help.

# cat /proc/sys/kernel/shmall
134217728
# cat /proc/sys/kernel/shmmax
134217728

But i did not reboot after had changed this parameters with cat.

And, this "zmu -m1 -v -i" produces nothing. Not error, no image, no output at all !

The last piece of info that seems related to all this is that when one runs xawtv there is this:

$ xawtv -device /dev/video0
This is xawtv-3.95, running on Linux/i686 (2.6.18.2)
seteuid(root): Operation not permitted
v4l-conf had some trouble, trying to continue anyway
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct
Warning: translation table syntax error: Unknown keysym name: key
Warning: ... found while parsing '<Key>key: Command(setstation,"webcam")'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown keysym name: key
Warning: ... found while parsing '<Key>key: Command(setstation,"webcam")'
Warning: String to TranslationTable conversion encountered errors
Warning: translation table syntax error: Unknown keysym name: key
Warning: ... found while parsing '<Key>key: Command(setstation,"webcam")'
Warning: String to TranslationTable conversion encountered errors
ioctl: VIDIOCMCAPTURE(frame=0;height=48;width=64;format=7): Invalid argument

But it shows the image at the end...

Kernel 2.6.18.2.
The fact is a secondary aspect of Reality.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you try and up the debug settings for zmc and then run it, either from the gui or just on the command line. Details for running with debug should be in the readme.
Phil
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

A simple run

Post by ttsoares »

After had enabled debug level 6 i started ZM, click on the name of the id 1 (the only one) and after saw the new window with no screen i closed it and stop ZM. These are the logs:

http://tvsol.pr.gov.br/~ttsoares/simple_run.tar.bz2

# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 0 root 600 33554432 9 dest
0x00000000 11927553 root 600 33554432 9 dest
0x00000000 65538 root 600 46084 9 dest
0x7a6d2001 11894787 root 700 9216964 0

Why just root own all memory ?
Why all seems to be writable only by root ?!
Why apache runns did to get a piece of memory to itself ?!!!

Is this most likely a Slackware, kernel, apache or ZM issue ??
The fact is a secondary aspect of Reality.
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

Solved: sorry to bother :-(

Post by ttsoares »

I was a shared memory issue.
The root user got to much memory to himself and the uptime of the system was 33 days...

But i did not run ZM as root, at least as far as i can remember, because this was my first mistake when started with ZM.

Thank you Cordel to the MSN help !!! :o
The fact is a secondary aspect of Reality.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

NP.
Glad I could help.
Cheers,
Corey
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

glad your sorted and corey, over and above as usual, well done mate
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Locked