Added ffmpeg.sh, added better support for Macs

This commit is contained in:
Austen Adler 2014-10-19 14:06:31 -04:00
parent 99e77604b9
commit c0737b3dd7
3 changed files with 53 additions and 6 deletions

44
scripts/ffmpeg.sh Executable file
View File

@ -0,0 +1,44 @@
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev yasm libx264-dev unzip libmp3lame-dev libopus-dev
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
unzip fdk-aac.zip
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
sudo make install
make distclean
cd ~/ffmpeg_sources
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
tar xjvf libvpx-v1.3.0.tar.bz2
cd libvpx-v1.3.0
PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
PATH="$PATH:$HOME/bin" make
sudo make install
make clean
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-x11grab
PATH="$PATH:$HOME/bin" make
sudo make install
make distclean
hash -r

View File

@ -50,9 +50,9 @@ while getopts ":hbsdclw" VALUE "$@"; do
if [ "$VALUE" = "c" ] ; then if [ "$VALUE" = "c" ] ; then
echo "Syncing config files" echo "Syncing config files"
if which trash >/dev/null; then if which trash >/dev/null; then
trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.oh-my-zsh/themes/af-magic.zsh-theme ~/.screenrc ~/.Xresources ~/.tmux.conf trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf
else else
rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.oh-my-zsh/themes/af-magic.zsh-theme ~/.screenrc ~/.Xresources ~/.tmux.conf rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf
fi fi
ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf
ln -s $ABSPATH/python/pylintrc ~/.pylintrc ln -s $ABSPATH/python/pylintrc ~/.pylintrc
@ -75,9 +75,10 @@ while getopts ":hbsdclw" VALUE "$@"; do
fi fi
ln -s $ABSPATH/shells/zshrc ~/.zshrc ln -s $ABSPATH/shells/zshrc ~/.zshrc
ln -s $ABSPATH/shells/screenrc ~/.screenrc ln -s $ABSPATH/shells/screenrc ~/.screenrc
if [ "$(uname)" != "Darwin" ]; then
ln -s $ABSPATH/shells/Xresources ~/.Xresources ln -s $ABSPATH/shells/Xresources ~/.Xresources
xrdb -merge ~/.Xresources xrdb -merge ~/.Xresources
ln -s $ABSPATH/shells/af-magic.zsh-theme ~/.oh-my-zsh/themes/af-magic.zsh-theme fi
mkdir -p ~/.i3 mkdir -p ~/.i3
ln -s $ABSPATH/i3/config ~/.i3/config ln -s $ABSPATH/i3/config ~/.i3/config
ln -s $ABSPATH/i3/wall.sh ~/.i3/wall.sh ln -s $ABSPATH/i3/wall.sh ~/.i3/wall.sh

View File

@ -33,7 +33,9 @@ if [ -f /etc/zsh_command_not_found ] ; then
fi fi
export PATH="/home/stonewareslord/.autojump/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" export PATH="/home/stonewareslord/.autojump/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export EDITOR='vim' export EDITOR='vim'
alias ls='ls --color=always -F' if [ "$(uname)" != "Darwin" ]; then
alias ls='ls --color=always -F'
fi
alias ehistory='cat ~/.bash_eternal_history|egrep -iP $@' alias ehistory='cat ~/.bash_eternal_history|egrep -iP $@'
alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"' alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'