Foto- und Webkamera

Post Reply
Message
Author
ups

Foto- und Webkamera

#1 Post by ups »

Hallo Leute,

ich suchte eine "Webcam" für große Entfernungen ;) und fand diese hier:

http://www.pearl.de/a-PE7616-1122.shtml?query=sumikon

So diese VGA-Fotoapparat & ~Webcam hat so auf 20m ein Bildausschnitt in der Größe eines Verkehrsschildes...

Man kann damit ca. 70 Bilder machen oder diese als Webcam betreiben.

1. Webcam - Linux Pardus

Code: Select all

Jun 15 15:14:39 joern-pardus kernel: [  379.223498] usb 2-2: Product: USB Digital Still Camera
Jun 15 15:14:39 joern-pardus kernel: [  379.223498] usb 2-2: configuration #1 chosen from 1 choice

wird die Kamera als USB-Storage gemountet.

Beim Ubuntu-Derivat Linux-Mint 8 geht keines von Beiden:
[code]Jun 15 16:12:24 pluto kernel: [28828.465126] usb 6-1: new full speed USB device using uhci_hcd and address 14
Jun 15 16:12:24 pluto kernel: [28828.630492] usb 6-1: configuration #1 chosen from 1 choice
Jun 15 16:12:24 pluto kernel: [28828.633413] gspca: probing 2770:905c
Jun 15 16:12:24 pluto kernel: [28828.633420] sq905c: SQ9050 camera detected (vid/pid 0x2770:0x905C)
Jun 15 16:12:24 pluto kernel: [28828.637323] sq905c: SQ9050 ID string: 04 - 10 01 12 01 09 00
Jun 15 16:12:24 pluto kernel: [28828.638397] gspca: video1 created
Jun 15 16:12:25 pluto kernel: [28828.960693] gspca: video1 disconnect
Jun 15 16:12:25 pluto kernel: [28828.960770] gspca: video1 released[/code]
Jun 15 15:14:39 joern-pardus kernel: [  379.226716] gspca: probing 2770:905c
Jun 15 15:14:39 joern-pardus kernel: [  379.226716] sq905c: SQ9050 camera detected (vid/pid 0x2770:0x905C)
Jun 15 15:14:39 joern-pardus kernel: [  379.233126] sq905c: SQ9050 ID string: 04 - 10 01 12 01 09 00
Jun 15 15:14:39 joern-pardus kernel: [  379.236351] gspca: video0 created
Bei SLES 11, welche nicht über das Modul gspca_sq905c verfügt:

Code: Select all

Jun 15 16:09:41 linux-nx32 kernel: usb 2-1: new full speed USB device using ohci_hcd and address 5
Jun 15 16:09:41 linux-nx32 kernel: usb 2-1: configuration #1 chosen from 1 choice
Jun 15 16:09:41 linux-nx32 kernel: usb 2-1: New USB device found, idVendor=2770, idProduct=905c
Jun 15 16:09:41 linux-nx32 kernel: usb 2-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Jun 15 16:09:41 linux-nx32 kernel: usb 2-1: Product: USB Digital Still Camera
wird die Kamera wie ein USB-Storage gemounted und ich kann mir die Fotos ansehen...

Bei dem Ubuntu-Derivat Linux-Mint8 geht gar nichts bzw. die beiden Funktionen kommen sich in die Quere?

Code: Select all

Jun 15 16:18:14 pluto kernel: [29178.364100] usb 6-1: USB disconnect, address 14
Jun 15 16:18:22 pluto kernel: [29185.954271] usb 6-1: new full speed USB device using uhci_hcd and address 15
Jun 15 16:18:22 pluto kernel: [29186.128772] usb 6-1: configuration #1 chosen from 1 choice
Jun 15 16:18:22 pluto kernel: [29186.130254] gspca: probing 2770:905c
Jun 15 16:18:22 pluto kernel: [29186.130261] sq905c: SQ9050 camera detected (vid/pid 0x2770:0x905C)
Jun 15 16:18:22 pluto kernel: [29186.133204] sq905c: SQ9050 ID string: 04 - 10 01 12 01 09 00
Jun 15 16:18:22 pluto kernel: [29186.134231] gspca: video1 created
Jun 15 16:18:22 pluto kernel: [29186.540703] gspca: video1 disconnect
Jun 15 16:18:22 pluto kernel: [29186.540779] gspca: video1 released
Hat einjemand eine gute Idde, wie ich Verfahre, das ich beide Funktionen unter ein Linux betreiben kann ?

LG
ups

User avatar
Janka
Posts: 3585
Joined: 11. Feb 2006 19:10

#2 Post by Janka »

Offensichtlich kann die Kamera nicht beides gleichzeitig. Wenn sie im Videomodus ist, bietet sie die Massenspeicheroption nicht an. Sonst würden nämlich beide Treiber geladen.

Welche Funktion willst du denn hauptsächlich nutzen?
Funktioniert das Videodevice /dev/video0 bei Ubuntu denn?

Janka
Ich vertonne Spam immer in /dev/dsp statt /dev/null.
Ich mag die Schreie.

ups

webcam

#3 Post by ups »

Ich will diese vorrangig als Webcam nutzen und motion etc laufen lassen.
Beides zu nutzen wäre ein optionales Optimum ;)

Dann müsste man wahrscheinlich mit einer Blacklist arbeiten und neu booten?
Das muss dann nicht sein, da ist SLES unter VBox eine gute alternative....

Meine LinuxMint-Version 8 ist im Prinzip ein Ubuntu 9.04,
Das baut ein Video-Device und schmeisst es sofort wieder weg. Warum auch immer?

Code: Select all

Jun 15 16:18:22 pluto kernel: [29186.134231] gspca: video1 created
Jun 15 16:18:22 pluto kernel: [29186.540703] gspca: video1 disconnect
Jun 15 16:18:22 pluto kernel: [29186.540779] gspca: video1 released
Wahrscheinlich ist es empfehlenswert, die neuste Distrie zu nehmen.

Gruß
ups

ups

neue Problem - es geht nur Kopete

#4 Post by ups »

Hallo,

es tut sich da auch ein neues Problem auf.
Unter Mandriva 2010.0 wird das Device /dev/video auch angelegt und bleibt auch bestehen. ;)

Das einzige Programm aber, was mit diesen Device umgehen kann ist Kopete!
Alle anderen Webcam-Programme, incl. Motion, verweigert die Zusammenarbeit!!

Code: Select all

[0] Processing thread 0 - config file /etc/motion.conf     
[0] Motion 3.2.10.1 Started                                
[0] ffmpeg LIBAVCODEC_BUILD 3412992 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion.conf                        
[1] Thread 1 started                                         
[1] cap.driver: "sq905c"
[1] cap.card: "USB Digital Still Camera"
[1] cap.bus_info: "usb-0000:00:06.0-2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: 905C (905C)
[1] Unable to find a compatible palette format.
[0] motion-httpd/3.2.10.1 running, accepting connections
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] Resizing pre_capture buffer to 1 items
[0] motion-httpd: waiting for data on port TCP 8080
[1] Started stream webcam server in port 8081
Speicherzugriffsfehler
Camstream mein bei Aktivierung der Schnittstelle:

Code: Select all

The device experienced on error -22 (Das Argument ist ungültig)
Und WxCam meint:

Code: Select all

An error has occured during frame capture. 
Please check the frame format options in the preferences menue.
Da habe ich alle Optionen ausprobiert, ausser bunten Gries aber kein Bild geholt.


Wenn Kopete nicht laufen würde, hätte ich das Teil für nicht kompatibel hehalten...
... Kopete nützt mir aber nix ;(


Gruß
ups

User avatar
Janka
Posts: 3585
Joined: 11. Feb 2006 19:10

#5 Post by Janka »

Könnte damit zusammenhängen, dass da die V4L1-Schnittstelle benutzt wird. Das alte V4L ist schon seit Jahren ein Auslaufmodell, die neuen Anwendungen unterstützen das vermutlich nicht mehr bzw. es ist schlecht getestet.

Aber eigentlich kann gspca V4L2. Siehe http://www.pro-linux.de/news/1/12960/gs ... -2627.html
Wird in Mandriva 2010 denn überhaupt gspca benutzt?

Janka
Ich vertonne Spam immer in /dev/dsp statt /dev/null.
Ich mag die Schreie.

ups

Webcam-Progs vs. Kopete

#6 Post by ups »

Es werden die gspca-Module geladen:

Code: Select all

gspca_sq905c            4516  0
gspca_main             23108  1 gspca_sq905c
videodev               36928  1 gspca_main
Bei WxCAm kann ich zwischen V4L1 und V4L2 umschalten.
Es kommt zwar immer die selbe Fehlermeldung bzgl frame format, aber bei L2 bleibt das Bild deaktiv und bei L1 bekomme ich etwas Gries.

Was kann Kopete, was die anderen Programme nicht können?

ups

Nachtrag

#7 Post by ups »

Code: Select all

Speicherzugriffsfehler
Bei Mandriva und Motion liegt wohl bei Mandriva bzw. dem Mandriva-Paket Motion selbst, mit meiner internen Cam geht es auf den selben Fehler...

ups

kennt sich jemand mit Video aus

#8 Post by ups »

Moin Leute,

das Problem ist nun etwas "verfahren".

Auf Linux Pardus macht diese exotische Cam ein /dev/video0 und mit Kopete bekomme ich auch ein Bild.
Aber nur mit Kopete :( : Und das nutzt mir wenig... ich möchte die Cam in motion zur Anwendung bringen.

Mit dem Programm motion gibt's nur graue oder bunt-gestreifte Bilder und diese Ausgabe:

Code: Select all

[1] Closing video device /dev/video0
[1] Retrying until successful connection with camera
[1] cap.driver: "sq905c"
[1] cap.card: "USB Digital Still Camera"
[1] cap.bus_info: "usb-0000:00:06.0-2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 0 (S910) doesn't work.
[1] Supported palettes:
[1] 0: 905C (905C)
[1] Unable to find a compatible palette format.
[1] Using VIDEO_PALETTE_YUV420P palette
[1] Using V4L1
[1] File of type 1 saved to: /home/joern/Bilder/01-20100621095750-00.jpg
[1] sync error in proc 14788: Invalid argument
[1] File of type 1 saved to: /home/joern/Bilder/01-20100621095750-01.jpg
[1] mcapture error in proc 14788: Invalid argument
[1] Video device fatal error - Closing video device
Ich hatte hier erfolglos alle Paletten probiert.

Und MPlayer reagiert auf die Kamera mit v4l2 so:

Code: Select all

joern@joern-pardus bin $ mplayer -fps 30 -cache 128 -tv driver=v4l2:width=640:height=480:device=/dev/video0 tv://
  CPLAYER: MPlayer dev-SVN-r31299 (C) 2000-2009 MPlayer Team154 audio & 334 video codecs
mplayer: could not connect to socket                                                                                       
mplayer: No such file or directory
     LIRC: Failed to open LIRC support. You will not be able to use your remote control.
   GLOBAL: [MENU] Can't open menu config file: /home/joern/.mplayer/menu.conf                                              
  CPLAYER:                                                                                                                 
Playing tv://.                                                                                                             
Cache fill:  0.00% (0 bytes)                                                                                               
  DEMUXER: TV file format detected.                                                                                        
       TV: Selected driver: v4l2                                                                                           
 name: Video 4 Linux 2 input                                                                                               
 author&#58; Martin Olschewski <olschewski@zpr.uni-koeln.de>                                                                   
 comment&#58; first try, more to come ;-&#41;                                                                                      
       TV&#58; v4l2&#58; your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.                   
       TV&#58; Selected device&#58; USB Digital Still Camera                                                                       
       TV&#58;  Capabilites&#58;  video capture  read/write  streaming                                                             
       TV&#58;  supported norms&#58;                                                                                               
 inputs&#58; 0 = sq905c;                                                                                                       
 Current input&#58; 0                                                                                                          
       TV&#58;  Current format&#58; unknown &#40;0x43353039&#41;                                                                           
       TV&#58; tv.c&#58; norm_from_string&#40;pal&#41;&#58; Bogus norm parameter, setting default.                                             
       TV&#58; v4l2&#58; ioctl enum norm failed&#58; Invalid argument                                                                  
       TV&#58; Error&#58; Cannot set norm!                                                                                         
       TV&#58; Selected input hasn't got a tuner!                                                                              
       TV&#58; v4l2&#58; Cannot get fps                                                                                            
       TV&#58; v4l2&#58; ioctl set mute failed&#58; Invalid argument                                                                   
       TV&#58; v4l2&#58; ioctl query control failed&#58; Invalid argument                                                              
       TV&#58; v4l2&#58; ioctl query control failed&#58; Invalid argument                                                              
       TV&#58; v4l2&#58; ioctl query control failed&#58; Invalid argument                                                              
       TV&#58; v4l2&#58; ioctl query control failed&#58; Invalid argument                                                              
 VIDEOOUT&#58; &#91;VO_XV&#93; It seems there is no Xvideo support for your video card available.                                      
&#91;VO_XV&#93; Run 'xvinfo' to verify its Xv support and read                                                                     
&#91;VO_XV&#93; DOCS/HTML/en/video.html#xv!                                                                                        
&#91;VO_XV&#93; See 'mplayer -vo help' for other &#40;non-xv&#41; video out drivers.                                                       
&#91;VO_XV&#93; Try -vo x11.                                                                                                       
      ASS&#58; &#91;ass&#93; auto-open                                                                                                 
&#91;ass&#93; Init                                                                                                                 
&#91;ass&#93; Updating font cache
  CPLAYER&#58; ==========================================================================
 DECVIDEO&#58; Cannot find codec matching selected -vo and video format 0x43353039.                                            
  CPLAYER&#58; ==========================================================================                                      
  CPLAYER&#58;                                                                                                                 
       TV&#58; v4l2&#58; ioctl set mute failed&#58; Invalid argument                                                                   
       TV&#58; v4l2&#58; 0 frames successfully processed, 0 frames dropped.                                                        
  CPLAYER&#58;                                                                                                                 
Exiting... &#40;End of file&#41; 
bzw. mit v4l:

Code: Select all

joern@joern-pardus bin $ mplayer -fps 30 -cache 128 -tv driver=v4l&#58;width=640&#58;height=480&#58;device=/dev/video0 tv&#58;//                              
  CPLAYER&#58; MPlayer dev-SVN-r31299 &#40;C&#41; 2000-2009 MPlayer Team154 audio & 334 video codecs
mplayer&#58; could not connect to socket                                                                                                          
mplayer&#58; No such file or directory
     LIRC&#58; Failed to open LIRC support. You will not be able to use your remote control.
   GLOBAL&#58; &#91;MENU&#93; Can't open menu config file&#58; /home/joern/.mplayer/menu.conf                                                                 
  CPLAYER&#58;                                                                                                                                    
Playing tv&#58;//.                                                                                                                                
Cache fill&#58;  0.00% &#40;0 bytes&#41;                                                                                                                  
  DEMUXER&#58; TV file format detected.                                                                                                           
       TV&#58; Selected driver&#58; v4l                                                                                                               
 name&#58; Video 4 Linux input                                                                                                                    
 author&#58; Alex Beregszaszi                                                                                                                     
 comment&#58; under development                                                                                                                   
       TV&#58; =================================================================                                                                  
       TV&#58;  WARNING&#58; YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!                                                                           
       TV&#58;  As the V4L1 compatibility layer is broken, this may not work.                                                                     
       TV&#58;  If you encounter any problems, use driver=v4l2 instead.                                                                           
       TV&#58;  Bugreports on driver=v4l with v4l2 drivers will be ignored.                                                                       
       TV&#58; =================================================================                                                                  
       TV&#58; Selected device&#58; USB Digital Still Camera                                                                                          
       TV&#58;  Capabilites&#58; capture                                                                                                              
       TV&#58;  Device type&#58; 1                                                                                                                    
       TV&#58;  Supported sizes&#58; 48x32 => 640x480                                                                                                 
       TV&#58;  Inputs&#58; 1                                                                                                                         
       TV&#58;   0&#58; sq905c&#58;  &#40;tuner&#58;0, norm&#58;pal&#41;                                                                                                  
       TV&#58; ioctl set chan failed&#58; Invalid argument                                                                                            
       TV&#58; ioctl set chan failed&#58; Invalid argument                                                                                            
       TV&#58; Error&#58; Cannot set norm!                                                                                                            
       TV&#58; Selected input hasn't got a tuner!                                                                                                 
 VIDEOOUT&#58; &#91;VO_XV&#93; It seems there is no Xvideo support for your video card available.                                                         
&#91;VO_XV&#93; Run 'xvinfo' to verify its Xv support and read                                                                                        
&#91;VO_XV&#93; DOCS/HTML/en/video.html#xv!                                                                                                           
&#91;VO_XV&#93; See 'mplayer -vo help' for other &#40;non-xv&#41; video out drivers.                                                                          
&#91;VO_XV&#93; Try -vo x11.                                                                                                                          
      ASS&#58; &#91;ass&#93; auto-open                                                                                                                    
&#91;ass&#93; Init                                                                                                                                    
&#91;ass&#93; Updating font cache
  CPLAYER&#58; ==========================================================================
 DECVIDEO&#58; Opening video decoder&#58; &#91;raw&#93; RAW Uncompressed Video                                                                                
  CPLAYER&#58; Movie-Aspect is undefined - no prescaling applied.                                                                                 
  CPLAYER&#58; VO&#58; &#91;x11&#93; 640x480 => 640x480 Planar YV12  &#91;zoom&#93;                                                                                   
&#91;swscaler @ 0xa79f7a0&#93;using unscaled yuv420p -> bgra special converter                                                                        
 DECVIDEO&#58; Selected video codec&#58; &#91;rawyv12&#93; vfm&#58; raw &#40;RAW YV12&#41;
  CPLAYER&#58; ==========================================================================                                                         
  CPLAYER&#58; Audio&#58; no sound                                                                                                                    
  CPLAYER&#58; FPS forced to be 30.000  &#40;ftime&#58; 0.033&#41;.                                                                                           
  CPLAYER&#58; Starting playback...                                                                                                               
       TV&#58;                                                                                                                                    
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;                                                                                                                                    
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;  V&#58;-9223372036854.8   1/  1 ??% ??% ??,?% 0 0 0%                                                                                   
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;  V&#58;-9223372036854.8   8/  8 ??% ??% ??,?% 0 0 0%                                                                                   
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;                                                                                                                                    
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;  V&#58;-9223372036854.8  11/ 11 ??% ??% ??,?% 0 0 0%                                                                                   
ioctl mcapture failed&#58; Invalid argument                                                                                                       
       TV&#58;  V&#58;-9223372036854.8  16/ 16 ??% ??% ??,?% 0 0 0%                                                                                   
ioctl mcapture failed&#58; Invalid argument   
Also, es geht nur Kopete :uff:
Bei dem Versuch da etwas zu tracen fand ich nichts was mir etwas sagte, außer vielleicht:

Code: Select all

ioctl&#40;15, VIDIOC_DQBUF, 0xbfda1e14&#41;     = 0
ioctl&#40;15, VIDIOC_QBUF, 0xbfda1e14&#41;      = 0
Was kann Kopete was die anderen nicht können ???

Gruß
ups

ups

Nachtrag: cheese

#9 Post by ups »

Also cheese kann auch mit der Webcamfunktion umgehen:

Code: Select all

Probing supported video formats...
Device&#58; USB Digital Still Camera &#40;/dev/video0&#41;
FractionRange&#58; 0/1 - 100/1
video/x-raw-rgb 640 x 480 num_framerates 101
......
v4l2src name=video_source device=/dev/video0 ! capsfilter name=capsfilter caps=video/x-raw-rgb,width=640,height=480,framerate=30/1;video/x-raw-yuv,width=640,height=480,framerate=30/1 ! identity
Und die "Stillbild-Foto-Funktion arbeitet mit digikam zusammen.

ups

ENDE

#10 Post by ups »

http://forum.ubuntuusers.de/topic/webca ... it-cheese/ :

Aufruf von motion mit der Methode
  • LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion
läßt motion funktionieren :)

Post Reply