Find the answer to your Linux question:
Results 1 to 3 of 3
I am running Slackware 13.0 using a Microdia camera model 60fc from Encore Electronics. After nearly a year I just got it working under Linux. Until then I had to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    WEBCAM (nearly) understood


    I am running Slackware 13.0 using a Microdia camera model 60fc from Encore Electronics.
    After nearly a year I just got it working under Linux. Until then I had to photo everything under XP(ro).
    The command I used is:
    mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=30:device=/dev/video0 -vo xv
    which produces the following (could not get it framed to conserve space):

    Playing tv://.
    TV file format detected.
    Selected driver: v4l2
    name: Video 4 Linux 2 input
    author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
    comment: first try, more to come
    Selected device: USB camera
    Capabilites: video capture read/write streaming
    supported norms:
    inputs: 0 = sonixj;
    Current input: 0
    Current format: unknown (0x4745504a)
    tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
    v4l2: ioctl enum norm failed: Invalid argument <-----------(1)
    Error: Cannot set norm!
    Selected input hasn't got a tuner! <----------------------------(2)
    v4l2: Cannot get fps <---------------------------------------------(3)
    v4l2: ioctl set mute failed: Invalid argument <--------------(4)
    v4l2: ioctl query control failed: Invalid argument <--------(5)
    ================================================== ========================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Unsupported PixelFormat -1 <--------------------------------(6)
    Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
    ================================================== ========================
    Audio: no sound
    Starting playback...
    VDec: vo config request - 640 x 480 (preferred colorspace: Planar 422P)
    Could not find matching colorspace - retrying with -vf scale...
    Opening video filter: [scale]
    VDec: using Planar 422P as output csp (no 1)
    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 @ 0x8a15c40]BICUBIC scaler, from yuv422p to yuv420p using MMX2
    [swscaler @ 0x8a15c40]using 4-tap MMX scaler for horizontal luminance scaling
    [swscaler @ 0x8a15c40]using 4-tap MMX scaler for horizontal chrominance scaling
    [swscaler @ 0x8a15c40]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
    [swscaler @ 0x8a15c40]640x480 -> 640x480
    VO: [xv] 640x480 => 640x480 Planar YV12
    v4l2: ioctl set mute failed: Invalid argument <--------------------------------(7)
    v4l2: 174 frames successfully processed, 291 frames dropped.

    1) where is my invalid arg? How to set "norm"?
    2) What is the tunerless input??
    3) fps was set to 30, what gives here?
    4,5,7) Are these related to the v4l2 driver and if so how do I set audio to not muted and invalid arg?
    6) How/Where do I set the pixel format?
    Last edited by clickit; 07-22-2010 at 07:32 AM.

  2. #2
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    WEBCAM (nearly) understood

    Sorry if this complicates it further but ...
    The initial set of questions refer to mplayer used as a web cam.
    If I try to use the following to use mplayer to watch tv, I get:
    v4l2: unable to open '/dev/video0': No space left on device
    v4l2: ioctl set mute failed: Bad file descriptor.
    This results from:
    mplayer tv:// -tv driver=v4l2:device=/dev/video0:width=640:height=480:norm=NTSC:chanlist=us-cable:audiorate=32000:amode=0:quality=75:channel=3 :forceaudio
    which I am testing to see if it works. I am told it does.
    I tracked this with google which indicated that if another device is plugged into the hub there is insufficient space for the webcam.
    I removed all but the webcam rebooted and got the same error message.
    I am a bit concerned that when I boot, some of the time I get HV7131R image sensor detected.
    Some of the time I get Image sensor detected init succeeded v4l2 registered at video0.
    I have had success in the former case but in the later, I commonly get no space available.
    -----Several hrs later
    The no space left on device goes away when command changed to /dev/video1 (not 0).
    Still unsolved is why NO AUDIO after mysteriously becoming able to find the full compliment of alsamixer controls. When I look at rc.alsa in /etc/rc.d it wants to reset alsa mixer via restore or setting defaults if a non-existent file is not readable. Don't know why it was not setting the controls???? mumble-mode.
    Have no video but am getting a frame and noise but command reports out "no audio". Tried the original command that worked yesterday had same result. Here is current command:
    mplayer tv:// -tv driver=v4l2:width=320:height=240:fps=30:device=/dev/video1:volume=50:immediatemode=1:alsa:volume=50 -vo xv -ao alsa -brightnes 0 -hue 0 -contrast 0 -saturation 0 -vf screenshot
    Last edited by clickit; 07-28-2010 at 11:53 AM.

  3. #3
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    WEBCAM (nearly) understood

    The webcam was working using mplayer yesterday, today tried original and new commands to get it to work and all I get is a frame and noise pattern in both cases. BTW do it from a script for consistency.
    Admittedly, I cant get audio even tho its in the commands. I cant get alsamixer (may be related to V8235 card2 but camera is usb card0) to list all controls.
    I have WASTED over 20 hrs slogging thru 8000+ lines of alsamixer/mplayer's man page and others trying to get mplayer/audio/video to work consistently on each booting and mapping trials. I am nearly convince that mplayer/alsa/soundcard is crapola so any help will received gratefully.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •