webcam truncated frames on eBox 3310MX

107 views
Skip to first unread message

Justis Peters

unread,
May 7, 2012, 5:20:36 PM5/7/12
to micro...@googlegroups.com
Does anyone have ideas on how to troubleshoot this? I have a webcam which works fine on my laptop, but gets garbled and truncated frames on the eBox 3310MX. The camera is a PS3 Eye camera. I initially noticed the problem when using OpenCV to grab frames, but I reproduced the issue in luvcview and in ffmpeg. Using ffmpeg was the most telling, since it bails out and reports that the frame was too small. For example, this is a recent run where it only got 17 frames and then failed:
justis:~$ ffmpeg -t 5 -f video4linux2 -s 640x480 -r 30 -i /dev/video0 -f mp4 webcam.mp4
FFmpeg version SVN-r0.5.6-4:0.5.6-3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.6-3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Dec 31 2011 15:16:11, gcc: 4.4.5
[video4linux2 @ 0x9e37a60][3]Capabilities: 5000001
Input #0, video4linux2, from '/dev/video0':
  Duration: N/A, start: 10126.280853, bitrate: 147456 kb/s
    Stream #0.0: Video: rawvideo, yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc
File 'webcam.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'webcam.mp4':
    Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
[video4linux2 @ 0x9e37a60]The v4l2 frame is 28032 bytes, but 614400 bytes are expected
frame=   17 fps=  7 q=15.3 Lsize=     180kB time=2.17 bitrate= 680.8kbits/s   
video:179kB audio:0kB global headers:0kB muxing overhead 0.499847%

It seems to work OK when I use an older Logitech webcam. The basic specs are the same, though. Here's the relevant portion that ffmpeg spits out when I use the Logitech camera:
Input #0, video4linux2, from '/dev/video0':
  Duration: N/A, start: 1336425343.356615, bitrate: 147456 kb/s
    Stream #0.0: Video: rawvideo, yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc

This is a debian 6.0.4 system and the kernel is: Linux 2.6.32-5-486 #1 Mon Mar 26 04:36:28 UTC 2012

Many thanks for any help you can provide.

Kind regards,
Justis Peters

Justis Peters

unread,
May 7, 2012, 5:52:12 PM5/7/12
to micro...@googlegroups.com
The two cameras aren't as similar as ffmpeg led me to believe. Using "v4l2-ctl --all", this is the PS3 Eye:
Driver Info:
    Driver name   : ov534
    Card type     : USB Camera-B4.09.24.1
    Bus info      : usb-0000:00:0a.1-1
    Driver version: 132864
    Capabilities  : 0x05000001
        Video Capture
        Read/Write
        Streaming
Format Video Capture:
    Width/Height  : 640/480
    Pixel Format  : 'YUYV'
    Field         : None
    Bytes per Line: 1280
    Size Image    : 614400
    Colorspace    : SRGB
Video input : 0 (ov534: ok)
Audio input : 0 (Microphone)
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 30.000 (30/1)
    Read buffers     : 2

This is the older Logitech:
Driver Info:
    Driver name   : uvcvideo
    Card type     : UVC Camera (046d:09a4)
    Bus info      : usb-0000:00:0b.1-2
    Driver version: 256
    Capabilities  : 0x04000001
        Video Capture
        Streaming
Format Video Capture:
    Width/Height  : 320/240
    Pixel Format  : 'MJPG'
    Field         : None
    Bytes per Line: 0
    Size Image    : 102400
    Colorspace    : SRGB
Crop Capability Video Capture:
    Bounds      : Left 0, Top 0, Width 320, Height 240
    Default     : Left 0, Top 0, Width 320, Height 240
    Pixel Aspect: 1/1
Video input : 0 (Camera 1: ok)
Streaming Parameters Video Capture:
    Capabilities     : timeperframe
    Frames per second: 15.000 (15/1)
    Read buffers     : 0

Reply all
Reply to author
Forward
0 new messages