Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Template for mencoder USB capture command

Reply
Thread Tools

Template for mencoder USB capture command

 
 
lodi@sogetthis.com
Guest
Posts: n/a
 
      07-02-2008
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
 
Reply With Quote
 
 
 
 
lodi@sogetthis.com
Guest
Posts: n/a
 
      07-04-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 8.25 How can I capture STDERR from an external command? PerlFAQ Server Perl Misc 0 03-12-2011 04:00 AM
AT Command capture Louis C++ 4 06-24-2007 07:17 AM
mencoder Eugene Anthony ASP .Net 5 02-12-2007 05:57 PM
Net::SSH::Perl -- can I capture the command prompt? Keith Perl Misc 5 11-26-2006 03:34 PM
PIX 6.3 - capture command Amaury Ronflard Cisco 3 08-14-2005 07:11 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57