yet another Failed to setup memory: Invalid argument
Posted: Fri Aug 08, 2008 9:01 pm
When I run zmc -d /dev/video it returns immediately with error code 255 and I get this in the logs:
08/08/08 20:43:13.080096 zmc_dvideo[3088].ERR-zm_local_camera.cpp/162 [Failed to setup memory: Invalid argument]
I have a sony dcr-pc9 mini-DV camera plugged into a hauppauge 150 capture card on a plain LFS linux system with kernel 2.6.24.7 and ZoneMinder 1.23.3.
I have used v4l2-ctl -i 2 to set the camera to input 2, which is composite. I have tested everything end to end by creating an avi and putting it on the webserver. cat /dev/video0 > /srv/www/htdocs/duh.avi. I can view this avi on another machine just fine.
I have also set the shared memory sizes to something that I hope is plenty big:
cat /proc/sys/kernel/shmmax
268435456
cat /proc/sys/kernel/shmall
268435456
Here is the output of ipcs:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 32768 apache 600 1
0x00000000 65537 apache 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
I believe this is the code from src/zm_local_camera.cpp that is failing:
if ( ioctl(m_videohandle, VIDIOCGMBUF, &m_vmb) < 0 )
{
Error(( "Failed to setup memory: %s", strerror(errno) ));
exit(-1);
}
Here is the output of zmu -d /dev/video0 -q -v
Video Capabilities
Name: Hauppauge WinTV PVR-150
Type: 7
Can capture
Can tune
Does teletext
Video Channels: 5
Audio Channels: 0
Maximum Width: 720
Maximum Height: 480
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 0 - Unknown
Colour Depth: 0
Brightness: 32896
Hue: 32896
Colour :33026
Contrast: 33026
Whiteness: 0
Channel 0 Attributes
Name: Tuner 1
Channel: 0
Flags: 1
Channel has a tuner
Type: 1 - TV
Format: 1 - NTSC
Channel 1 Attributes
Name: S-Video 1
Channel: 1
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 2 Attributes
Name: Composite 1
Channel: 2
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 3 Attributes
Name: S-Video 2
Channel: 3
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 4 Attributes
Name: Composite 2
Channel: 4
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Any ideas?
Thanks in advance.
-K
08/08/08 20:43:13.080096 zmc_dvideo[3088].ERR-zm_local_camera.cpp/162 [Failed to setup memory: Invalid argument]
I have a sony dcr-pc9 mini-DV camera plugged into a hauppauge 150 capture card on a plain LFS linux system with kernel 2.6.24.7 and ZoneMinder 1.23.3.
I have used v4l2-ctl -i 2 to set the camera to input 2, which is composite. I have tested everything end to end by creating an avi and putting it on the webserver. cat /dev/video0 > /srv/www/htdocs/duh.avi. I can view this avi on another machine just fine.
I have also set the shared memory sizes to something that I hope is plenty big:
cat /proc/sys/kernel/shmmax
268435456
cat /proc/sys/kernel/shmall
268435456
Here is the output of ipcs:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 32768 apache 600 1
0x00000000 65537 apache 600 1
------ Message Queues --------
key msqid owner perms used-bytes messages
I believe this is the code from src/zm_local_camera.cpp that is failing:
if ( ioctl(m_videohandle, VIDIOCGMBUF, &m_vmb) < 0 )
{
Error(( "Failed to setup memory: %s", strerror(errno) ));
exit(-1);
}
Here is the output of zmu -d /dev/video0 -q -v
Video Capabilities
Name: Hauppauge WinTV PVR-150
Type: 7
Can capture
Can tune
Does teletext
Video Channels: 5
Audio Channels: 0
Maximum Width: 720
Maximum Height: 480
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 0 - Unknown
Colour Depth: 0
Brightness: 32896
Hue: 32896
Colour :33026
Contrast: 33026
Whiteness: 0
Channel 0 Attributes
Name: Tuner 1
Channel: 0
Flags: 1
Channel has a tuner
Type: 1 - TV
Format: 1 - NTSC
Channel 1 Attributes
Name: S-Video 1
Channel: 1
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 2 Attributes
Name: Composite 1
Channel: 2
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 3 Attributes
Name: S-Video 2
Channel: 3
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Channel 4 Attributes
Name: Composite 2
Channel: 4
Flags: 0
Type: 2 - Camera
Format: 1 - NTSC
Any ideas?
Thanks in advance.
-K