** In this guide I gonna explain how I got AirVideoServer to run on Ubuntu 12.04**

First prepare the installation for the AirVideoServer:

sudo su
apt-get install build-essential yasm
mkdir -p /opt/airvideo-server
cd /opt/airvideo-server

Now we edit the properties

vim AirVideoServerLinux.properties 

and we add the following lines:

path.ffmpeg = /opt/airvideo-server/ffmpeg/ffmpeg
path.mp4creator = /usr/bin/mp4creator
path.faac = /usr/bin/faac
password =
subtitles.encoding = windows-1250
subtitles.font = Verdana
folders = Movies:/some/movies,Series:/some/shows

after that we install all the dependencies for AVS and download + install it:

apt-get install libx264-dev libmp3lame-dev libfaad-dev git-core pkg-config libavcodec53 libmp4v2-2
wget http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar
wget http://inmethod.com/air-video/download/ffmpeg-for-2.4.5-beta6.tar.bz2
tar jxvf ffmpeg-for-2.4.5-beta6.tar.bz2
cd ffmpeg
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame
make install

now we change one directory back to look test it

cd ..

Because I run a server I hadn't had the need for java so I installed it now:

apt-get install default-jre

After that I run:

java -jar /opt/airvideo-server/AirVideoServerLinux.jar /opt/airvideo-server/AirVideoServerLinux.properties

to verify everything works.

Now you can also create a rule so the server starts at startup:

vim /etc/init.d/airvideo-server

You should insert these lines into the empty file:

case "$1" in
echo "Starting AirVideo"
start-stop-daemon --start --quiet -b -m -p /var/run/airvideo-server.pid --chuid username --exec /usr/bin/java -- -jar /opt/airvideo-server/AirVideoServerLinux.jar /opt/airvideo-server/AirVideoServerLinux.properties
echo "Stopping AirVideo"
start-stop-daemon --stop --quiet --pidfile /var/run/airvideo-server.pid
rm -f /var/run/airvideo-server
echo "Usage: /etc/init.d/airvideo-server {start|stop}"
exit 1
exit 0

Make the file executable, then add it to the startup defaults.

sudo chmod +x /etc/init.d/airvideo-server
sudo update-rc.d airvideo-server defaults

Done! Reboot your System to see if everything works.

##Error Handling

If you get an error like this:

error: DEBUG: SnapshotCache: Exception during SnapshotCache initialization: /home/spruce/.air-video-server/thumbnailCache.index.db (No such file or directory)

just touch the file and your good touch ~/.air-video-server/thumbnailCache.index.db

Source1 Source2