Page 1 of 1
zmdc problem with 2.6.12 and provideo card
Posted: Sun Oct 16, 2005 1:54 am
by rob
zm-1.21.3 debian testing 2.6.12 apache2 with known good cameras
zmdc.log
Server starting at 05/10/15 20:31:07
'zmc -d 0' started at 05/10/15 20:31:10
'zmc -d 0' starting at 05/10/15 20:31:10, pid = 25560
'zmc -d 0' crashed at 05/10/15 20:31:10, exit status 255
'zmc -d 0' started at 05/10/15 20:31:10
'zmc -d 0' starting at 05/10/15 20:31:11, pid = 25562
'zmc -d 0' crashed at 05/10/15 20:31:11, exit status 255
Can't select: No child processes at /usr/local/bin/zmdc.pl line 593.
i have run zm on a 2.4.27 debian stable with grandstream type 77 card
this is my first try with debian testing 2.6.12 and a provideo card
the card was found and set at boot
bttv2: Bt878 (rev 17) at 0000:02:0a.0, irq: 217, latency: 32, mmio: 0xde004000
bttv2: detected: Provideo PV150A-3 [card=98], PCI subsystem ID is aa02:1462
bttv2: using: ProVideo PV150 [card=98,autodetected]
the only errors found were in the zmdc.log and vl4-conf did not look right
v4l-conf: using X11 display :0.0
dga: version 2.0
mode: 1024x768, depth=24, bpp=32, bpl=4096, base=0xd8000000
/dev/video0 [v4l2]: configuration done'
the carmera does work with vlc
i increased shmmax
sjv1:/var/log/zm# cat /proc/sys/kernel/shmmax
134217728
what should i be looking for?'
thanks rob
Posted: Sun Oct 16, 2005 4:07 am
by matador
Hi Rob,
I have been caught out with similar problem, the error wasn't exactly the same, maybe because I am not running debian, I have compiled zm on centos 4.1 with kernel 2.6.12.
The problem I had was my own silly mistake, which was that I didn't change the permissions on the /dev/video, /dev/video0 etc... to 777.
just a thought..
Posted: Sun Oct 16, 2005 5:57 am
by conor
Rob,
Check your value for /proc/sys/kernel/shmall because maybe that needs to be increased as well.
Conor Downey
Posted: Sun Oct 16, 2005 4:08 pm
by rob
i have check the video devices permissions and doubled shmall
no go same zmd log error
Server starting at 05/10/16 11:03:58
'zmc -d 1' started at 05/10/16 11:04:01
'zmc -d 1' starting at 05/10/16 11:04:01, pid = 29441
'zmc -d 1' crashed at 05/10/16 11:04:02, exit status 255
'zmc -d 1' started at 05/10/16 11:04:02
'zmc -d 1' starting at 05/10/16 11:04:02, pid = 29444
'zmc -d 1' crashed at 05/10/16 11:04:02, exit status 255
Can't select: No child processes at /usr/local/bin/zmdc.pl line 593.
is there any other info i need to post ?
rob
Posted: Sun Oct 16, 2005 8:02 pm
by conor
Rob,
Can I confirm you are working with only one /dev/video device (/dev/video0).
Please indicate how many cameras you've got defined in zoneminder and the size of theimages plus the maximum frame rates. Did you start working with only one? Always a good idea.
Reduce the image size and maximum frame rate dramatically and still see if you are gettiing the error. You may have doubled the value of shmmax and shmall but it may not be enough! Please give the values.
I think there is info on Tips & Tricks of this forum for this kind of stuff.
Conor Downey
Posted: Sun Oct 16, 2005 8:38 pm
by rob
320 x240 on the image size currently 2 camera's in the monitor mode 15fps
the bttv and card driver have defined 4 video devices
found some thing in the syslog
Oct 16 15:26:56 sjv1 zmc_d0[30540]: INF [Debug Level = 0, Debug Log = <none>]
Oct 16 15:26:56 sjv1 zmc_d0[30540]: ERR [Failed to set picture attributes: Invalid argument]
Oct 16 15:26:56 sjv1 zmc_d0[30542]: INF [Debug Level = 0, Debug Log = <none>]
Oct 16 15:26:56 sjv1 zmc_d0[30542]: ERR [Failed to set picture attributes: Invalid argument]
Oct 16 15:26:59 sjv1 zmc_d1[30568]: INF [Debug Level = 0, Debug Log = <none>]
Oct 16 15:26:59 sjv1 zmc_d1[30568]: ERR [Failed to set picture attributes: Invalid argument]
Oct 16 15:26:59 sjv1 zmc_d1[30571]: INF [Debug Level = 0, Debug Log = <none>]
Oct 16 15:26:59 sjv1 zmc_d1[30571]: ERR [Failed to set picture attributes: Invalid argument]
somewhat more informative than what was in messages --- i think this has something to
do with the hi res numbers returned by v4l-conf (see previous)
Posted: Mon Oct 17, 2005 6:27 am
by conor
Rob,
Sorry should have got you to check the logs before.
The output of v4l-conf is reporting sizes for the screen output device and not the inputs. Use the v4l-info command to get info on the inputs. You should an information line starting with:
Code: Select all
### video4linux device info [/dev/video0] ###
The attributes displayed after that are the ones we are interested in for zm. In fact it is a good idea to post all the info produced after this line for each used video devices.
The error message being reported "Failed to set picture attributes" is probably from the local camera initialise function. It is saying that it can't deal with one or more of the values passed to device control using the VIDIOCSPICT ioctl. The S in that command stands for set. You can see the type of parameters that are set from looking at the values given for VIDIOCGPICT which is the get of the current values.
Check that you have valid values defined for the monitor being set up and if you still think they are OK you could turn off the "strict video config" option. Alternately try changing the values of screen size to more normal ones for PAL such as 352x288 and experiment with the format options.
I need to clarify your information:
the bttv and card driver have defined 4 video devices
So are you saying that you have /dev/video0,1,2 and 3 or do you mean 4 four channels on /dev/video0. Could we have the card number you used or the autodetect from dmesg.
Conor Downey
Posted: Mon Oct 17, 2005 11:54 am
by cordel
Hi Rob,
That error is resulting from zm being set to either the wrong size of color pallet that the card does not support.
rob wrote:
Oct 16 15:26:59 sjv1 zmc_d1[30571]: ERR [Failed to set picture attributes: Invalid argument]
Find what the card is capable of and you should be okay. Try the v4l-info /dev/video0 and see what you got.
Regards,
Cordel
Posted: Mon Oct 17, 2005 5:52 pm
by rob
here is the v4l-info dump
how would i change the settings for zm -- frame lines looks a little suspect
there seems to be a lot if differences in the format between a working
2.4.27 zm with a type 77 and this setup with a 2.6.12 & PV150 type 98
where would i find the card spec's -- google did not turn up anything useful
thanks rob
### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "bttv"
card : "BT878 video (ProVideo PV150)"
bus_info : "PCI:0000:02:08.0"
version : 0.9.15
capabilities : 0x5000015 [VIDEO_CAPTURE,VIDEO_OVERLAY,VBI_CAPTURE,READWRITE,STREAMING]
standards
VIDIOC_ENUMSTD(0)
index : 0
id : 0xff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K]
name : "PAL"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(1)
index : 1
id : 0x1000 [NTSC_M]
name : "NTSC"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(2)
index : 2
id : 0x7f0000 [SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
name : "SECAM"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(3)
index : 3
id : 0x400 [PAL_Nc]
name : "PAL-Nc"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(4)
index : 4
id : 0x100 [PAL_M]
name : "PAL-M"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(5)
index : 5
id : 0x200 [PAL_N]
name : "PAL-N"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(6)
index : 6
id : 0x2000 [NTSC_M_JP]
name : "NTSC-JP"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(7)
index : 7
id : 0x800 [PAL_60]
name : "PAL-60"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Composite0"
type : CAMERA
audioset : 1
tuner : 0
std : 0x7f3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
status : 0x0 []
VIDIOC_ENUMINPUT(1)
index : 1
name : "Composite1"
type : CAMERA
audioset : 1
tuner : 0
std : 0x7f3fff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L]
status : 0x0 []
video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 0
description : "8 bpp, gray"
pixelformat : 0x59455247 [GREY]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 0
description : "8 bpp, dithered color"
pixelformat : 0x34324948 [HI24]
VIDIOC_ENUM_FMT(2,VIDEO_CAPTURE)
index : 2
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, le"
pixelformat : 0x4f424752 [RGBO]
VIDIOC_ENUM_FMT(3,VIDEO_CAPTURE)
index : 3
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, be"
pixelformat : 0x51424752 [RGBQ]
VIDIOC_ENUM_FMT(4,VIDEO_CAPTURE)
index : 4
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, le"
pixelformat : 0x50424752 [RGBP]
VIDIOC_ENUM_FMT(5,VIDEO_CAPTURE)
index : 5
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, be"
pixelformat : 0x52424752 [RGBR]
VIDIOC_ENUM_FMT(6,VIDEO_CAPTURE)
index : 6
type : VIDEO_CAPTURE
flags : 0
description : "24 bpp RGB, le"
pixelformat : 0x33524742 [BGR3]
VIDIOC_ENUM_FMT(7,VIDEO_CAPTURE)
index : 7
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, le"
pixelformat : 0x34524742 [BGR4]
VIDIOC_ENUM_FMT(8,VIDEO_CAPTURE)
index : 8
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, be"
pixelformat : 0x34424752 [RGB4]
VIDIOC_ENUM_FMT(9,VIDEO_CAPTURE)
index : 9
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(10,VIDEO_CAPTURE)
index : 10
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(11,VIDEO_CAPTURE)
index : 11
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, packed, UYVY"
pixelformat : 0x59565955 [UYVY]
VIDIOC_ENUM_FMT(12,VIDEO_CAPTURE)
index : 12
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2, planar, Y-Cb-Cr"
pixelformat : 0x50323234 [422P]
VIDIOC_ENUM_FMT(13,VIDEO_CAPTURE)
index : 13
type : VIDEO_CAPTURE
flags : 0
description : "4:2:0, planar, Y-Cb-Cr"
pixelformat : 0x32315559 [YU12]
VIDIOC_ENUM_FMT(14,VIDEO_CAPTURE)
index : 14
type : VIDEO_CAPTURE
flags : 0
description : "4:2:0, planar, Y-Cr-Cb"
pixelformat : 0x32315659 [YV12]
VIDIOC_ENUM_FMT(15,VIDEO_CAPTURE)
index : 15
type : VIDEO_CAPTURE
flags : 0
description : "4:1:1, planar, Y-Cb-Cr"
pixelformat : 0x50313134 [411P]
VIDIOC_ENUM_FMT(16,VIDEO_CAPTURE)
index : 16
type : VIDEO_CAPTURE
flags : 0
description : "4:1:0, planar, Y-Cb-Cr"
pixelformat : 0x39565559 [YUV9]
VIDIOC_ENUM_FMT(17,VIDEO_CAPTURE)
index : 17
type : VIDEO_CAPTURE
flags : 0
description : "4:1:0, planar, Y-Cr-Cb"
pixelformat : 0x39555659 [YVU9]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 320
fmt.pix.height : 240
fmt.pix.pixelformat : 0x50323234 [422P]
fmt.pix.field : INTERLACED
fmt.pix.bytesperline : 640
fmt.pix.sizeimage : 153600
fmt.pix.colorspace : unknown
fmt.pix.priv : 0
video overlay
VIDIOC_ENUM_FMT(0,VIDEO_OVERLAY)
index : 0
type : VIDEO_OVERLAY
flags : 0
description : "8 bpp, gray"
pixelformat : 0x59455247 [GREY]
VIDIOC_ENUM_FMT(1,VIDEO_OVERLAY)
index : 1
type : VIDEO_OVERLAY
flags : 0
description : "8 bpp, dithered color"
pixelformat : 0x34324948 [HI24]
VIDIOC_ENUM_FMT(2,VIDEO_OVERLAY)
index : 2
type : VIDEO_OVERLAY
flags : 0
description : "15 bpp RGB, le"
pixelformat : 0x4f424752 [RGBO]
VIDIOC_ENUM_FMT(3,VIDEO_OVERLAY)
index : 3
type : VIDEO_OVERLAY
flags : 0
description : "15 bpp RGB, be"
pixelformat : 0x51424752 [RGBQ]
VIDIOC_ENUM_FMT(4,VIDEO_OVERLAY)
index : 4
type : VIDEO_OVERLAY
flags : 0
description : "16 bpp RGB, le"
pixelformat : 0x50424752 [RGBP]
VIDIOC_ENUM_FMT(5,VIDEO_OVERLAY)
index : 5
type : VIDEO_OVERLAY
flags : 0
description : "16 bpp RGB, be"
pixelformat : 0x52424752 [RGBR]
VIDIOC_ENUM_FMT(6,VIDEO_OVERLAY)
index : 6
type : VIDEO_OVERLAY
flags : 0
description : "24 bpp RGB, le"
pixelformat : 0x33524742 [BGR3]
VIDIOC_ENUM_FMT(7,VIDEO_OVERLAY)
index : 7
type : VIDEO_OVERLAY
flags : 0
description : "32 bpp RGB, le"
pixelformat : 0x34524742 [BGR4]
VIDIOC_ENUM_FMT(8,VIDEO_OVERLAY)
index : 8
type : VIDEO_OVERLAY
flags : 0
description : "32 bpp RGB, be"
pixelformat : 0x34424752 [RGB4]
VIDIOC_ENUM_FMT(9,VIDEO_OVERLAY)
index : 9
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(10,VIDEO_OVERLAY)
index : 10
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(11,VIDEO_OVERLAY)
index : 11
type : VIDEO_OVERLAY
flags : 0
description : "4:2:2, packed, UYVY"
pixelformat : 0x59565955 [UYVY]
VIDIOC_G_FMT(VIDEO_OVERLAY)
type : VIDEO_OVERLAY
fmt.win.w.left : 0
fmt.win.w.top : 0
fmt.win.w.width : 320
fmt.win.w.height : 240
fmt.win.field : ANY
fmt.win.chromakey : 0
fmt.win.clips : (nil)
fmt.win.clipcount : 0
fmt.win.bitmap : (nil)
VIDIOC_G_FBUF
capability : 0x4 [LIST_CLIPPING]
flags : 0x0 []
base : 0xd8000000
fmt.width : 1024
fmt.height : 768
fmt.pixelformat : 0x50323234 [422P]
fmt.field : ANY
fmt.bytesperline : 4096
fmt.sizeimage : 0
fmt.colorspace : unknown
fmt.priv : 0
vbi capture
VIDIOC_ENUM_FMT(0,VBI_CAPTURE)
index : 0
type : VBI_CAPTURE
flags : 0
description : "vbi data"
pixelformat : 0x59455247 [GREY]
VIDIOC_G_FMT(VBI_CAPTURE)
type : VBI_CAPTURE
fmt.vbi.sampling_rate : 28636363
fmt.vbi.offset : 244
fmt.vbi.samples_per_line: 2048
fmt.vbi.sample_format : 0x59455247 [GREY]
fmt.vbi.start[0] : 7
fmt.vbi.start[1] : 319
fmt.vbi.count[0] : 16
fmt.vbi.count[1] : 16
fmt.vbi.flags : 0
controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 65535
step : 256
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 65535
step : 128
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 65535
step : 128
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+3)
id : 9963779
type : INTEGER
name : "Hue"
minimum : 0
maximum : 65535
step : 256
default_value : 32768
flags : 0
VIDIOC_QUERYCTRL(BASE+9)
id : 9963785
type : BOOLEAN
name : "Mute"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+0)
id : 134217728
type : BOOLEAN
name : "chroma agc"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+1)
id : 134217729
type : BOOLEAN
name : "combfilter"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+2)
id : 134217730
type : BOOLEAN
name : "automute"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+3)
id : 134217731
type : BOOLEAN
name : "luma decimation filter"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+4)
id : 134217732
type : BOOLEAN
name : "agc crush"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+5)
id : 134217733
type : BOOLEAN
name : "vcr hack"
minimum : 0
maximum : 1
step : 0
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+6)
id : 134217734
type : INTEGER
name : "whitecrush upper"
minimum : 0
maximum : 255
step : 1
default_value : 207
flags : 0
VIDIOC_QUERYCTRL(PRIVATE_BASE+7)
id : 134217735
type : INTEGER
name : "whitecrush lower"
minimum : 0
maximum : 255
step : 1
default_value : 127
flags : 0
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "BT878 video (ProVideo PV150)"
type : 0xab [CAPTURE,TUNER,OVERLAY,CLIPPING,SCALES]
channels : 2
audios : 0
maxwidth : 640
maxheight : 576
minwidth : 48
minheight : 32
channels
VIDIOCGCHAN(0)
channel : 0
name : "Composite0"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 3
VIDIOCGCHAN(1)
channel : 1
name : "Composite1"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 3
tuner
audio
VIDIOCGAUDIO
audio : 0
volume : 0
bass : 0
treble : 0
picture
VIDIOCGPICT
brightness : 32768
hue : 32768
colour : 32768
contrast : 32768
whiteness : 0
depth : 16
palette : YUV422P
buffer
VIDIOCGFBUF
base : 0xd8000000
height : 768
width : 1024
depth : 16
bytesperline : 4096
window
VIDIOCGWIN
x : 0
y : 0
width : 320
height : 240
chromakey : 0
flags : 0
Posted: Mon Oct 17, 2005 10:52 pm
by conor
Rob,
how would i change the settings for zm -- frame lines looks a little suspect
Ehh? What do you mean by frame lines? Do you mean width and height values?
The 1024x768 is actually all right. It is the 360x240 value that is the important one. It is better as I suggested in an earlier post to try 353x288 initially and follow Cordels suggestion about the pallette. All values are settable from zm under the appropriate rights. Click on the camera "source" item and then on the "source" within the pop up menu that appears. You should be able to set screen size and pallette there.
there seems to be a lot if differences in the format between a working
2.4.27 zm with a type 77 and this setup with a 2.6.12 & PV150 type 98
Well, kernels from 2.6.1 onwards used Video4Linux version 2 (V4L2) which has the greatly expanded parameter set that you see in the first section of that v4l-info output. However zm uses the original V4L interface so that it can work on 2.4 kernels. The V4L2 interface implements a compatibility layer so that it can accept the older V4L commands. The values for these older settings are the ones listed near the end after the heading I outlined in an earlier post.
The only place worth looking for card number information is in the bttv-cards.c file of the source of the kernel you are using. There you will find that card type 98 is listed as having only two video inputs and no audio inputs. Is this correct? Because card type 77 now is a 4 input card. The PV150 is automatically identified by the kernel I have (2.6.13) which was probably not the case in 2.4 kernels which may not have had it added. The PV150 is not listed on Provideos website (provideo.com.tw) so is probably now obsolete.
The device capabilities are really those of the video input chip used so see the Conexant web site and download PDF file with the details on the Fusion 878A that your board probably uses. Get a good picture of the card if you can so that it can be used by other users to help identify the board type (from the store of pictures at the linuxtv.org website now I think).
Conor Downey
Posted: Mon Oct 17, 2005 11:11 pm
by conor
Grrrr, I meant 352x288 in that last post.
It is a size called CIF which approximates to the quality of resolution from a VHS VCR.
Conor