public
Last active

Install the AirVideoServer on a Debian server

  • Download Gist
InstallAirVideoServerDebian.sh
Shell
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
INSTALL_DIR="/home/maicki"
FFMPEG_DIR="$INSTALL_DIR/ffmpeg"
PROPERTIE_FILE="$INSTALL_DIR/test.properties"
MEDIA="Movies:/home/maicki/Movies"
AIR_VIDEO_LINK="http://inmethod.com/air-video/download/linux/alpha4/AirVideoServerLinux.jar"
 
 
mkdir $INSTALL_DIR
cd $INSTALL_DIR
 
# Install dependencies
sudo aptitude install bzip2 make checkinstall yasm git-core
 
# 1. Update x264
sudo aptitude remove x264 libx264-dev
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --default
 
# 2. Add Debian Multimedia Packages
wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb
sudo dpkg -i debian-multimedia-keyring_2008.10.16_all.deb
rm debian-multimedia-keyring_2008.10.16_all.deb
 
echo "" | sudo tee -a /etc/apt/sources.list
echo "deb http://debian.netcologne.de/debian-multimedia.org stable main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://debian.netcologne.de/debian-multimedia.org stable main" | sudo tee -a /etc/apt/sources.list
sudo aptitude update
 
# 3. Compile the patched ffmpeg from InMethod.
sudo apt-get install libmp3lame-dev libfaad-dev mpeg4ip-server git-core pkg-config
cd $INSTALL_DIR
wget http://www.inmethod.com/air-video/download/ffmpeg-for-2.2.5.tar.bz2
tar xvfj ffmpeg-for-2.2.5.tar.bz2
rm ffmpeg-for-2.2.5.tar.bz2
if [[ "`pwd`/ffmpeg" != $FFMPEG_DIR ]]; then
mv ffmpeg $FFMPEG_DIR
fi
cd $FFMPEG_DIR
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libfaad --disable-decoder=aac
make
 
# 4. Install Java
sudo aptitude install openjdk-6-jdk
 
# 5. Install the linux Air Video server.
cd $INSTALL_DIR
wget $AIR_VIDEO_LINK
 
touch $PROPERTIE_FILE
echo "path.ffmpeg = $FFMPEG_DIR/ffmpeg" >> $PROPERTIE_FILE
echo "path.mp4creator = /bin/mp4creator" >> $PROPERTIE_FILE
echo "path.faac = /bin/faac" >> $PROPERTIE_FILE
echo "password =" >> $PROPERTIE_FILE
echo "subtitles.encoding = windows-1250" >> $PROPERTIE_FILE
echo "subtitles.font = Verdana" >> $PROPERTIE_FILE
echo "folders = $MEDIA" >> $PROPERTIE_FILE
 
echo "Successfully installed, now edit the '$PROPERTIE_FILE' and create the media folders"
echo "and start AirVideoServer with 'java -jar $INSTALL/AirVideoServerLinux.jar $PROPERTIE_FILE'"
 
#If you want the server to auto-start, follow Mbirth’s note
#create a file /etc/init/airvideo.conf
 
#start on runlevel [2345]
#stop on shutdown
#respawn
#exec sudo -H -n -u mbirth /usr/bin/java -jar /opt/AirVideoServer/AirVideoServerLinux.jar /opt/AirVideoServer/test.properties
#manual control by
 
#sudo start airvideo
#or
#sudo stop airvideo

I spend a good 3 or 4 hours trying to install AirVideoServer on my debian machine. No luck. Just before I give up, I try this. Works like a charm. If this comment convinces other people to use this, then great. If not, I would just like to thank the author for saving me so much time.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.