Created
July 26, 2009 02:23
-
-
Save pyther/155406 to your computer and use it in GitHub Desktop.
Simple shell script to configure alsa the record from capture card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function set_alsa { | |
#Unmute Line | |
amixer sset Line 100 -q | |
amixer sset Line unmute -q | |
#Mute PCM record | |
amixer sset PCM Capture 0 -q | |
#Set capture for Analog Mix | |
amixer sset 'Analog Mix' CAPTURE 100 -q | |
#Set analog mix to 100 | |
amixer sset 'Analog Mix' 100 -q | |
echo "Alsa is set and ready for the hard work..." | |
} | |
if [ -z $1 ]; then | |
echo "Usage: rec_vhs.mpg filename.mpg" | |
exit | |
elif [[ $1 != *.mpg ]]; then | |
echo "Must be an mpg file!" | |
exit | |
fi | |
set_alsa | |
mencoder -tv norm=NTSC:driver=v4l2:width=704:height=480:input=1:amode=1 tv:// -oac lavc -ovc lavc -of mpeg \ | |
-mpegopts format=dvd -vf pp=lb/ha/va/dr,hqdn3d,harddup \ | |
-srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1500:vrc_maxrate=8000:vbitrate=7000:keyint=15:acodec=mp2:abitrate=192:aspect=4/3 \ | |
-quiet -o $1 | |
echo "Done recording" $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment