Template for mencoder USB capture command

Discussion in 'NZ Computing' started by lodi@sogetthis.com, Jul 2, 2008.

  1. Guest

    Hi all....Just posting this command for future reference and future
    googlers.

    A simple command template for TV capturing from a USB capture card.
    Very easy to modify.

    Uses V4L2 (Video 4 Linux version2), Ubuntu 8.04 and, in this instance,
    an old Dazzle DV90 USB capture card, bought for $10 at a car boot sale
    on the weekend. Fortunately for me V4L2 has the DV90 on its supported
    hardware list.

    Have viewed the output avi file using both vlc and mplayer and it
    looks okay.

    sudo nice --10 mencoder tv:// -v -tv
    driver=v4l2:width=720:height=576:input=0:device=/dev/video0:adevice=/
    dev/dsp1:immediatemode=0:forceaudio -o outputfile.avi -ovc lavc -
    lavcopts vcodec=mpeg4:aspect=4/3 -aspect 4:3 -oac mp3lame -lameopts
    cbr:br=128 -endpos 00:00:20


    sudo nice --10
    give this process high priority

    mencoder tv://
    expect tv input

    -v
    verbose

    -tv driver=v4l2
    use Video 4 Linux version 2

    width/height dimensions
    not too sure if it's 720x576 or 768x576 for PAL
    If you get dropped frames make it 640x480

    input=0
    PAL=0, NTSC=1

    device=/dev/video0:adevice=/dev/dsp1
    video and audio input devices
    'cat /proc/asound/pcm' will determine audio device

    immediatemode=0
    buffer audio and video together (normally default)

    forceaudio
    only way I could get the audio to work

    -o outputfile.avi
    path to output file

    -ovc lavc
    output video codec is a libavcodec

    -lavcopts vcodec=mpeg4:aspect=4/3 -aspect 4:3
    lavc options mpeg4 (divx), encode apect ratio to file

    -oac mp3lame
    output audio codec is mp3lame

    -lameopts cbr:br=128
    lame options - mp3 output constant bit rate of 128kb/s

    -endpos 00:00:20
    record for twenty seconds then exit
    , Jul 2, 2008
    #1
    1. Advertising

  2. Guest

    Two extras...

    *
    -vf eq2=gamma:contrast:brightness:saturation

    Adjusting brightness, contrast, gamma and saturation
    Defaults are 1.0:1.0:0.0:1.0
    Ranges are gamma 0.1 to 10, contrast -2 to 2, brightness -1 to 1 and
    saturation 0 to 3

    *
    mpeg4:aspect=<some value>

    Encoding aspect ratio to file
    Possible values are 16/9, 4/3, 3/2 etc
    Only works with mpeg4 codec (I think)

    *
    original command modified with brightness and aspect ratio

    sudo nice --10 mencoder tv:// -v -tv driver=v4l2:input=0:device=/dev/
    video0:adevice=/dev/dsp1:immediatemode=0:forceaudio
    -o outputfile.avi -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9 -oac
    mp3lame -lameopts cbr:br=128 -vf eq2=1.0:1.0:0.3:1.0
    -endpos 00:00:20
    , Jul 4, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amaury Ronflard

    PIX 6.3 - capture command

    Amaury Ronflard, Aug 14, 2005, in forum: Cisco
    Replies:
    3
    Views:
    5,988
    Francois Labreque
    Aug 14, 2005
  2. Silverstrand
    Replies:
    0
    Views:
    951
    Silverstrand
    Apr 17, 2006
  3. Mike Rahl
    Replies:
    6
    Views:
    2,317
    Walter Roberson
    Dec 12, 2006
  4. hely0123
    Replies:
    0
    Views:
    2,090
    hely0123
    Oct 30, 2007
  5. Giuen
    Replies:
    0
    Views:
    724
    Giuen
    Sep 12, 2008
Loading...

Share This Page