[MEncoder-users] Cannot go above 640x480 with v4l2 webcam capture

Kovacs Peter Tamas p.kovacs at holografika.com
Fri Nov 21 15:41:07 CET 2008


some additional details, maybe helps:

- the same behaviour is present when trying to visualize the webcam's 
image using mplayer (cannot go higher the 640x480, no matter what I 
specify in the command line)
- when loading the uvcvideo kernel module with trace=15, I have the 
following output when asking mencoder/mplayer for a 800x600 stream:

Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x56595559 (YUYV): 640x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Using default frame interval 66666.6 us (15.0 fps).
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x32315659 (YV12): 640x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Unsupported format 0x32315659.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x32315559 (YU12): 640x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Unsupported format 0x32315559.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x59565955 (UYVY): 640x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Unsupported format 0x59565955.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x56595559 (YUYV): 640x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Using default frame interval 66666.6 us (15.0 fps).
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x56595559 (YUYV): 800x480.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Using default frame interval 66666.6 us (15.0 fps).
Nov 21 20:28:44 pc00 kernel: uvcvideo: Trying format 0x56595559 (YUYV): 640x600.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Using default frame interval 66666.6 us (15.0 fps).
Nov 21 20:28:44 pc00 kernel: uvcvideo: Control 0x00980909 not found.
Nov 21 20:28:44 pc00 kernel: uvcvideo: Control 0x00980903 not found.
Nov 21 20:30:09 pc00 kernel: uvcvideo: Control 0x00980909 not found.

 From this, it seems to me that the uvcvideo module does not get the 
request for resolution 800x600.
Any help is greatly appreciated.

Thanks,
Peter

> Dear All,
>
> I'm trying to capture a video stream from a Logitech Quickcam Pro for
> Notebooks webcam.
> I'm using the latest uvcvideo kernel module (from SVN), latest libwebcam
> (from SVN), and mencoder (from SVN).
>
> If I try to capture a video stream with resolution 640x480 or below,
> everything is working fine, eg:
> mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
> -nosound -ovc lavc -o capture.avi
>
> However, when I try to go further, it always gives me a 640x480 stream, like:
> --------------------------------------
> pc05 ~# mencoder tv:// -tv
> driver=v4l2:width=800:height=600:device=/dev/video0 -nosound -ovc lavc -o
> capture.avi
> MEncoder SVN-r27899 (C) 2000-2008 MPlayer Team
> CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 6400+ (Family: 15, Model:
> 67, Stepping: 3)
> 3DNow supported but disabled
> 3DNowExt supported but disabled
> CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
> Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
>
> success: format: 9  data: 0x0 - 0x0
> TV file format detected.
> Selected driver: v4l2
>  name: Video 4 Linux 2 input
>  author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
>  comment: first try, more to come ;-)
> v4l2: your device driver does not support VIDIOC_G_STD ioctl,
> VIDIOC_G_PARM was used instead.
> Selected device: UVC Camera (046d:0991)
>  Capabilites:  video capture  streaming
>  supported norms:
>  inputs: 0 = Camera 1;
>  Current input: 0
>  Current format: YUYV
> 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: ioctl set mute failed: Invalid argument
> v4l2: ioctl query control failed: Invalid argument
> [V] filefmt:9  fourcc:0x32595559  size:640x480  fps:15.000  ftime:=0.0667
> Opening video filter: [expand osd=1]
> Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
> ==========================================================================
> Opening video decoder: [raw] RAW Uncompressed Video
> VDec: vo config request - 640 x 480 (preferred colorspace: Packed YUY2)
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> VDec: using Packed YUY2 as output csp (no 0)
> Movie-Aspect is undefined - no prescaling applied.
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 4
> SwScaler: reducing / aligning filtersize 1 -> 1
> SwScaler: reducing / aligning filtersize 9 -> 8
> [swscaler @ 0x1104800]BICUBIC scaler, from yuyv422 to yuv420p using MMX2
> [swscaler @ 0x1104800]using 4-tap MMX scaler for horizontal luminance scaling
> [swscaler @ 0x1104800]using 4-tap MMX scaler for horizontal chrominance
> scaling
> [swscaler @ 0x1104800]using 1-tap MMX "scaler" for vertical scaling (YV12
> like)
> [swscaler @ 0x1104800]640x480 -> 640x480
> videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4])
> Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
> ==========================================================================
> Forcing audio preload to 0, max pts correction to 0.
> New_Face failed. Maybe the font path is wrong.
> Please supply the text font file (~/.mplayer/subfont.ttf).
> subtitle font: load_sub_face failed.
> New_Face failed. Maybe the font path is wrong.
> Please supply the text font file (~/.mplayer/subfont.ttf).
> subtitle font: load_sub_face failed.
> Writing header...
> ODML: Aspect information not (yet?) available or unspecified, not writing
> vprp header.
> Writing header...
> ODML: Aspect information not (yet?) available or unspecified, not writing
> vprp header.
> Pos:   2.3s     35f ( 0%) 13.01fps Trem:   0min   0mb  A-V:0.000 [543:0]
> Flushing video frames.
> Writing index...
> Writing header...
> ODML: Aspect information not (yet?) available or unspecified, not writing
> vprp header.
>
> Video stream:  543.651 kbit/s  (67956 B/s)  size: 158565 bytes  2.333 secs
>  35 frames
> v4l2: ioctl set mute failed: Invalid argument
> v4l2: 37 frames successfully processed, -36 frames dropped.
> --------------------------------------------
>
> From this log, it doesn't look like it tried to go for 800x600.
>
> However, when I insert the uvcvideo kernel module, it can be seen that it
> supports this resolution (in YUV and MJPEG too):
> --------------------------------------------------------
> Nov 20 01:08:11 pc05 kernel: uvcvideo: UVC device initialized.
> Nov 20 01:08:11 pc05 kernel: uvcvideo: Probing generic UVC device 4
> Nov 20 01:08:11 pc05 kernel: uvcvideo: Found format MJPEG.
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 160x120 (30.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 176x144 (30.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 320x240 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 352x288 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 640x480 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 800x600 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 960x720 (10.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: Found format YUV 4:2:2 (YUYV).
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 160x120 (30.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 176x144 (30.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 320x240 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 352x288 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 640x480 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 800x600 (15.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 960x720 (10.0 fps)
> Nov 20 01:08:11 pc05 kernel: uvcvideo: - 1600x1200 (5.0 fps)
> ---------------------------------------------
>
> I've also tried using outfmt:mjpeg, and it works, but still cannot get a
> higher resolution video stream.
> Using guvcview, I can use the camera in 800x600 and even 960x720, both in
> YUV and MJPEG.
>
> I'm running a stripped down Fedora 8 on x86_64 with 2.6.24 kernel:
> pc05 ~# uname -a
> Linux pc05 2.6.24.5-fedora #7 SMP Fri Nov 7 13:42:49 CET 2008 x86_64
> x86_64 x86_64 GNU/Linux
>
> Do you have an idea what could be the reason for this behaviour?
>
> Thank you very much for your kind help in advance,
> Peter
>
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>   




More information about the MEncoder-users mailing list