mencoder/handbrake/mplayer misc

make h264 encoded avi to QT compatible mp4
$ HandbrakeCLI -i INFILE.avi -o OUTFILE.mp4 -e x264 -b BITRATE --crop 0:0:0:0

take a snapshot from a mp4 halfway through the video
$ mplayer INFILE.mp4 -slave -nosound -vf screenshot < commands.txt
less commands.txt:
seek 50 1
screenshot
pause
quit

Posted in Nerd | Leave a comment

pdf man pages in snow leopard

pman () {
    man -t "${1}" | open -f -a /Applications/Preview.app
}
Posted in Nerd | Leave a comment

command line find & remove

find . -iname 'SEARCHTERM' -exec rm -rf {} \;
Posted in Nerd | Leave a comment

imagemagick: split image down the center

convert infile.jpg -crop 50%x100% outfile_%d.jpg
Posted in Nerd | Leave a comment

irssi (irc client) on snow leopard

irssi

Create Working Directory

mkdir ~/src

pkg-config

cd ~/src
curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
tar xzf pkg-config-0.23.tar.gz
cd pkg-config-0.23.tar.gz
./configure
make
sudo make install

gettext

cd ~/src
curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz
tar xzf gettext-0.17.tar.gz
cd gettext-0.17.tar.gz
./configure
make
sudo make install

glib

cd ~/src
curl -O ftp://ftp.gtk.org/pub/glib/2.23/glib-2.23.5.tar.gz
tar xzf glib-2.23.5.tar.gz
cd glib-2.23.5.tar.gz
emacs glib/gconvert.c
#Edit line 54 to read as:

#if !(defined(__APPLE__) && defined(__LP64__))

save and exit
./configure
make
sudo make install

irssi

cd ~/src
curl -O http://www.irssi.org/files/irssi-0.8.14.tar.gz
tar xzf irssi-0.8.14.tar.gz
cd irssi-0.8.14.tar.gz
./configure -with-perl=yes

# the following two commands strip out unneeded archs
# so in this case we would be left w x86_64. tailor as needed.
find . -type f -exec sed -i "" -e "s/-arch i386//g" {} \;
find . -type f -exec sed -i "" -e "s/-arch ppc//g" {} \;

make
sudo make install
Posted in Nerd | Leave a comment