Motion - Support Question 2010x 08x 12x 024609

BT878 video (IVC-200), VIDIOC_ENUMINPUT: Invalid, VIDIOCGCHAN): Invalid

Question

Hi, I've got a BT878 capture card with 4 sockets

Brooktree Corporation Bt878 Video Capture [109e:036e] (rev 11)

Its installed on a box running Debian squeeze with a 2.6.32 kernel and motion 3.2.12. I have a plugin camera that calls itself an "AV Tech High resolution colour camera". Xawtv seems to detect and display the video image just fine, but with motion, all I get is a black image.

motion  -c /etc/motion/motion.conf                                                                       
[0] Processing thread 0 - config file /etc/motion/motion.conf                     
[0] Motion 3.2.12 Started                                                         
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808                     
[0] Motion running in setup mode.                                                 
[0] Thread 1 is from /etc/motion/motion.conf                                      
[0] Thread 1 is device: /dev/video0 input 1                                       
[0] Webcam port 8082                                                              
[0] Waiting for threads to finish, pid: 8011                                      
[1] Thread 1 started                                                              
[0] motion-httpd/3.2.12 running, accepting connections                            
[0] motion-httpd: waiting for data on port TCP 8081                               
[1] cap.driver: "bttv"                                                            
[1] cap.card: "BT878 video (IVC-200)"                                             
[1] cap.bus_info: "PCI:0000:07:04.0"                                              
[1] cap.capabilities=0x05000015                                                   
[1] - VIDEO_CAPTURE                                                               
[1] - VIDEO_OVERLAY                                                               
[1] - VBI_CAPTURE                                                                 
[1] - READWRITE                                                                   
[1] - STREAMING                                                                   
[1] Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument                    
[1] ioctl (VIDIOCGCHAN): Invalid argument                                         
[1] Failed with YUV420P, trying YUV422 palette: Device or resource busy           
[1] Failed with YUV422, trying YUYV palette: Device or resource busy              
[1] Failed with YUYV, trying RGB24 palette: Device or resource busy               
[1] Failed with RGB24, trying GREYSCALE palette: Device or resource busy          
[1] Failed with all supported palettes - giving up: Device or resource busy       
[1] Could not fetch initial image from camera                                     
[1] Motion continues using width and height from config file(s)                   
[1] Resizing pre_capture buffer to 1 items                                        
[1] Started stream webcam server in port 8082                     


Environment

Motion version: 3.2.12
ffmpeg version: 0.5.2-1
Libraries: ffmpeg, mysql, postgresql
Server OS: Debian squeeze 2.6.32-5-xen-686

Actually, I have two separate PCs both with the same capture card, but different linux distributions, kernels and motion versions and cameras. For the second one, which works reasonably well with ubuntu 2.6.31-14-generic and motion-3.2.11:

 [1] Resizing pre_capture buffer to 1 items
 [2] cap.driver: "bttv"
 [2] cap.card: "BT878 video (IVC-200)"
 [2] cap.bus_info: "PCI:0000:08:04.0"
 [2] cap.capabilities=0x05000015
 [2] - VIDEO_CAPTURE
 [2] - VIDEO_OVERLAY
 [2] - VBI_CAPTURE
 [2] - READWRITE
 [2] - STREAMING
 [2] Unable to query input 1 VIDIOC_ENUMINPUT:
 [2] ioctl (VIDIOCGCHAN):
 [2] Using VIDEO_PALETTE_YUV420P palette
 [2] Resizing pre_capture buffer to 1 items
 [2] Started stream webcam server in port 8082

-- DougDuBoulay - 12 Aug 2010

Answer

Well, it turned out I just had incompatible width and height settings in my config :-/ I started with width=320, height=240 - which doesn't work, but the 352x288 defaults do work. Maybe there should be a graceful fall-back to defaults when the palettes fail, or an appropriate error message or something?

[1] cap.card: "BT878 video (IVC-200)"                                      
[1] cap.bus_info: "PCI:0000:07:04.0"                                       
[1] cap.capabilities=0x05000015                                            
[1] - VIDEO_CAPTURE                                                        
[1] - VIDEO_OVERLAY                                                        
[1] - VBI_CAPTURE                                                          
[1] - READWRITE                                                            
[1] - STREAMING                                                            
[1] Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument             
[1] ioctl (VIDIOCGCHAN): Invalid argument                                  
[1] Using VIDEO_PALETTE_YUV420P palette                                    
[1] Using V4L1                                                             
[1] Resizing pre_capture buffer to 1 items                                 
[1] Started stream webcam server in port 8082

SupportForm edit

TopicTitle BT878 video (IVC-200), VIDIOC_ENUMINPUT: Invalid, VIDIOCGCHAN): Invalid
SupportStatus AskedQuestions
AssignedQuestionTo
SubmittedBy DougDuBoulay
Topic revision: r3 - 17 Aug 2010, DougDuBoulay
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.