Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all I want to record myself to see the expression on my face on average through the USB webcam . I use mencoder for recording from USB webcam . ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2

    Problem : Recording video & audio from webcam


    Hi all

    I want to record myself to see the expression on my face on average through the USB webcam .

    I use mencoder for recording from USB webcam .

    Code:
    mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -fps 16.2 -o test16.2.avi
    The problem is that the audio is not synchronized with the video.

    what can i do ? help!

  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,601
    You can use the -audio-delay option with mencoder to adjust the audio sync. This option also works with mplayer.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    2
    how can i use this option ??

  4. #4
    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,601
    You just need to add the option to your command line. Here is the manpage section for your information:
    Code:
           -audio-delay <any floating-point number>
                  Delays either audio or video by setting a delay field in the header (default: 0.0).  This does
                  not delay either stream while encoding, but the player will see the delay field and compensate
                  accordingly.  Positive values delay the audio, and negative values delay the video.  Note that
                  this is the exact opposite of the -delay option.  For example, if a video plays correctly with
                  -delay 0.2, you can fix the video with MEncoder by using -audio-delay -0.2.
    I hope this helps. You can view the manpage on your computer for all the options.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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