Find the answer to your Linux question:
Results 1 to 9 of 9
i am using this command: mplayer tv:// -tv driver=x11:width=640:height=480:device=/dev/video0 my webcam: Bus 005 Device 002: ID 04f2:b008 Chicony Electronics Co., Ltd i looked using google and i found that the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329

    [SOLVED] trying to view my webcam using mplayer


    i am using this command:
    mplayer tv:// -tv driver=x11:width=640:height=480:device=/dev/video0

    my webcam:
    Bus 005 Device 002: ID 04f2:b008 Chicony Electronics Co., Ltd
    i looked using google and i found that the driver is gspca so in the previous command i tried gspca and i got

    abed@kmitnick-laptop:/usr/src/modules/gspca$ mplayer tv:// -tv driver=gspca:width=640:height=480:device=/dev/video0
    MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM) Duo CPU T2450 @ 2.00GHz (Family: 6, Model: 14, Stepping: 12)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    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.
    No such driver: gspca


    Exiting... (End of file)
    abed@kmitnick-laptop:/usr/src/modules/gspca$
    so i tried luvcview and i saw this O/P

    abed@kmitnick-laptop:/usr/src/modules/gspca$ luvcview
    luvcview 0.2.4

    SDL information:
    Video driver: x11
    A window manager is available
    Device information:
    Device path: /dev/video0
    Stream settings:
    Frame format: YUYV (MJPG is not supported by device)
    Frame size: 640x480
    Frame rate: 30 fps
    max 100, min 0, step 1, default 0 ,current 1
    Control name:Saturation set to value:1
    max 100, min 0, step 1, default 0 ,current 2
    Control name:Saturation set to value:2

    Quit signal received.
    Cleanup done. Exiting ...
    abed@kmitnick-laptop:/usr/src/modules/gspca$
    so i tried driver=x11

    but neither did x11 nor gspca worked for me anyone???
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,408
    I got my webcam working on my CentOS workstation using ffmpeg, ffserver, and VLC. It took some twisted configuration of VLC to get it to work in "real time". That was last year, and I haven't used it since as it was mostly an experiment to prove it could be done, though I plan on trying to use it with Skype on my Ubuntu 9.04 laptop some time real soon now...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    ok glad to hear that it did work for you, and the question is, assunimg we are using ffmpeg , what is the command to get it done, and which driver to use?
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  4. #4
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    v4l, video for linux should work fine.
    while i havnt used ffmpeg for webcams, but mencoder can be used.
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,408
    Quote Originally Posted by kmitnick View Post
    ok glad to hear that it did work for you, and the question is, assunimg we are using ffmpeg , what is the command to get it done, and which driver to use?
    As I said, it was an experiment over a year ago - I don't remember the exact sequence of actions I did to pipe the stream to VLC - I'd have to re-discover that and right now I don't have the time.

    As for the driver, see this site for webcam drivers and information: http://mxhaard.free.fr/spca5xx.html
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    This is what I use for my webcam with mplayer.
    Code:
    mplayer tv:// -tv driver=v4l2:width=352:height=288

  7. #7
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    i tried your code reed9
    and i have this
    abed@kmitnick-laptop:~/Desktop$ mplayer tv:// -tv driver=v4l2:width=352:height=288
    MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM) Duo CPU T2450 @ 2.00GHz (Family: 6, Model: 14, Stepping: 12)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    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 <olschewski@zpr.uni-koeln.de>
    comment: first try, more to come
    v4l2: ioctl get standard failed: Invalid argument
    Selected device: Chicony USB 2.0 Camera
    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
    FPS not specified in the header or invalid, use the -fps option.
    No stream found.

    v4l2: ioctl set mute failed: Invalid argument
    v4l2: 0 frames successfully processed, 0 frames dropped.

    Exiting... (End of file)
    abed@kmitnick-laptop:~/Desktop$
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  8. #8
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    v4l2 is unable to use your webcam.
    try utility like gtKam or webcam
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  9. #9
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    problem solved all wha i had to do is to define the frame per second rate
    so the command will look like this:
    mplayer -fps 30 -tv driver=v4l2:width=640:height=480:device=/dev/video0 tv://
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

Posting Permissions

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