Created
December 20, 2010 09:20
-
-
Save planbnet/748190 to your computer and use it in GitHub Desktop.
Air Video Server Install Script (Probably outdated)
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment