krzych schrieb:
WOW! Guys, you're magicians, it works on my laptop TOO!!!!!!!!!!!!!THANKS, THANKS, THANKS! :D Now, i have a little question about LD_PRELOAD - how to make it not to write it always when rinning something? I mean, i have motion program which runs quite nicely, but im not sure what to do to start it from rc.local after reboot... is this enough to set this var and run it after, or is there any better method to have it always loaded since my motion is always running? K. PS. There are some flickers while running camera but maybe its the cable or something because its rare and only when holding in hand... Im not sure. On Nov 29, 4:48 pm, krzych <[EMAIL PROTECTED]> wrote:Yep, it helped. BUT in readme is: -------------------------------------------------------------------------------- 4. Testing To load the driver, follow these steps (as root) : # modprobe videodev # modprobe compat-ioctl32 // Only required for 64-bit Linux OS # make insmod To test the driver with a V4L2 compliant application, try mplayer : $ mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=25:device=/dev/video0 -vo x11 $ mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=25:device=/dev/video0 -vo xv So reader thinks thats all for mplayer And then only as a NOTE is that the other apps may need preload (and i thought that mplayer is used just as an example, but works without this): Note: Some applications require libv4l for image format decoding. (see "1.3 Decoder") Consult libv4l documentation for full usage details. Here is an example for a common usage : $ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv \ driver=v4l2:width=640:height=480:fps=25:device=/dev/video0 -vo xv So, please, change the readme to inform all folks that mplayer needs this too. Or change the first test example to app that needs no preload. Anyway, thanks, desktop works. I'll try it on laptop in few minutes. K. On Nov 29, 9:14 am, GWater <[EMAIL PROTECTED]> wrote:krzych schrieb:No, i didn't forgot, look: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : libv4l [1/1] Installed: libv4l.i386 0:0.5.6-1.fc9 Complete! On Nov 28, 10:45 pm, Vasily Khoruzhick <[EMAIL PROTECTED]> wrote:On 28 November 2008 23:40:38 krzych wrote:No luck. It even won't display anything. mplayer stops by itself after lines below: [EMAIL PROTECTED] microdia]$ mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=25:device=/dev/video0 -vo x11 MPlayer dev-SVN-r27514-4.3.0 (C) 2000-2008 MPlayer Team CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 10) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0 Compiled with runtime CPU detection. mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing tv://. TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <[EMAIL PROTECTED]> comment: first try, more to come ;-) Selected device: Microdia USB 2.0 Webcam Driver Capabilites: video capture read/write streaming supported norms: inputs: 0 = Webcam;v4l2: ioctl get input failed: Invalid argument Current input: 1 Current format: unknown (0x31384142) v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument tv.c: norm_from_string(pal): Bogus norm parameter, setting default. v4l2: ioctl enum norm failed: Invalid argument Error: Cannot set norm! Selected input hasn't got a tuner! v4l2: Cannot get fps v4l2: ioctl set mute failed: Invalid argument v4l2: ioctl query control failed: Invalid argument v4l2: ioctl query control failed: Invalid argument ========================================================================== Cannot find codec matching selected -vo and video format 0x31384142. Read DOCS/HTML/en/codecs.html! ========================================================================== v4l2: ioctl set mute failed: Invalid argument v4l2: 0 frames successfully processed, 0 frames dropped. Exiting... (End of file) [EMAIL PROTECTED] microdia]$ In /var/log/messages: Nov 28 22:36:25 sat kernel: microdia: Microdia USB 2.0 webcam driver loaded Nov 28 22:36:25 sat kernel: microdia: Microdia USB 2.0 Webcam - 0C45:624F plugged-in. Nov 28 22:36:25 sat kernel: microdia: Detected SN9C20X Bridge Nov 28 22:36:25 sat kernel: microdia: Detected OV9650 Sensor Nov 28 22:36:26 sat kernel: microdia: Microdia USB 2.0 Webcam is now controlling video device /dev/video0 Nov 28 22:36:26 sat kernel: usbcore: registered new interface driver usb_microdia_driver Nov 28 22:36:26 sat kernel: microdia: v2008.10 : Microdia USB 2.0 Webcam Driver Nov 28 22:36:31 sat kernel: microdia: Freeing 0 v4l2 buffers Nov 28 22:36:31 sat kernel: microdia: Buffers Allocated 2 Nov 28 22:36:31 sat kernel: microdia: Freeing 2 v4l2 buffers So for now it's worse than before. I'll try now on desktop to check if it works at all. K.It seems you forgot about libv4l. Please, read README file :) signature.asc < 1KViewDownloadThat's not enough. Please take a look at the usage example in the README. It begins with "LD_PRELOAD=/usr/lib/... mplayer..." Otherwise mplayer won't use or care about libv4l. GWater signature.asc < 1KViewDownload--~--~---------~--~----~------------~-------~--~----~ Lets make microdia webcams plug'n play, (currently plug'n pray) To post to this group, send email to [email protected] Visit us online https://groups.google.com/group/microdia -~----------~----~----~----~------~----~------~--~---
You can put "export LD_PRELOAD=/usr/lib/..." into you ~/.bashrc GWater
signature.asc
Description: OpenPGP digital signature
