diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-04-29 15:04:32 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-04-29 15:04:32 -0500 |
commit | e9850eb330d4626c79e9f1ebb25deee970ebd8b4 (patch) | |
tree | a3101993801c828dd22966bdd0d5bef041baa32f /bashrc | |
parent | 9ffac4c96afff398edc2ba4895204925effd6edc (diff) | |
download | conf-e9850eb330d4626c79e9f1ebb25deee970ebd8b4.tar.gz conf-e9850eb330d4626c79e9f1ebb25deee970ebd8b4.zip |
better webcam aliases
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -92,9 +92,19 @@ alias wgetff='wget --user-agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8. alias ..='cd ..' alias dotperl="rsync -av lib/* ${HOME}/.perl/" alias clean_packages='sudo pacman -Rsn $(pacman -Qqdt)' -alias webcam='mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15 -vf screenshot' +function webcam { + local width=$1 + local height=$2 + if [[ -z $width ]]; then width=640; fi + if [[ -z $height ]]; then height=480; fi + mplayer tv:// -tv driver=v4l2:width=$width:height=$height:device=/dev/video0 -fps 15 -vf screenshot +} function webcam_record { - 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 -o $1 + local width=$1 + if [[ -z $width ]]; then width=640; else shift; fi + local height=$1 + if [[ -z $height ]]; then height=480; else shift; fi + mencoder tv:// -tv driver=v4l2:width=$width:height=$height:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o $1 } function luado { # thanks rici local e=$1 |