How to Install Airvideo in Debian VM


dlandon

Recommended Posts

I used this procedure to install airvideo in IronicBadger's Debian VM.  The procedure was put together from several different sources from the Internet.

 

echo "" >> /etc/apt/sources.list

echo deb http://www.deb-multimedia.org wheezy main non-free >> /etc/apt/sources.list

 

gpg --keyserver pgpkeys.mit.edu --recv-key 07DC563D1F41B907

gpg -a --export 07DC563D1F41B907 | apt-key add -

 

apt-get update

apt-get install deb-multimedia-keyring

apt-get upgrade

apt-get install autoconf build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libtool libvorbis-dev pkg-config texi2html yasm zlib1g-dev x264 libx264-dev

 

mkdir /home/airvideo

cd /home/airvideo

wget http://s3.amazonaws.com/AirVideo/Linux-2.4.6-beta3/libav.tar.bz2

tar -xjvf libav.tar.bz2

cd libav

./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-nonfree --enable-encoder=libfaac

make

cd ..

wget http://s3.amazonaws.com/AirVideo/Linux-2.4.6-beta3/AirVideoServerLinux.jar

 

# Create a properties file with the following contents:

nano airvideo-properties

folders = TV:/mnt/TV
subtitles.encoding = windows-1250
subtitles.font = Verdana
password = password
path.ffmpeg = /home/airvideo/libav/avconv

 

# You'll need to modify the properties file for your situation.

# I mounted my Recorded TV unRAID share to /mnt/TV

# You can mount other media sources as you see fit.

 

aptitude install openjdk-6-jdk

 

To start airvideo on boot

copy the following script to /etc/init.d/airvideo

#!/bin/bash
# start|stop|restart
#
# $Id$
#
# airvideo	initscript
#			This file should be placed in /etc/init.d/airvideo.
#
# Original Author: Dan Landon
#
### BEGIN INIT INFO
# Provides:          	airvideo
# Required-Start:    	$all
# Required-Stop:     	$all
# Should-Start:      	$all
# Should-Stop:       	$all
# Default-Start:     	2 3 4 5
# Default-Stop:      	0 1 6
# Short-Description:	Startup script for the Airvideo Server
# Description:			Airvideo server for iPhone, iPad, and iPod
#
### END INIT INFO
#

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PIDFILE=/var/run/airvideo.pid

airvideo_start()
{
  # no-op if already running
  if [ -f $PIDFILE ]; then
    echo "Airvideo already running."
    return
  fi

  echo "Starting Airvideo."

  /usr/bin/java -jar /home/airvideo/AirVideoServerLinux.jar /home/airvideo/airvideo-properties > /dev/null 2>&1 &

  PID=$!
  test "$PID" != "" && echo $PID > $PIDFILE  
}

airvideo_stop()
{
  # no-op if already stopped
  if [ ! -f $PIDFILE ]; then
    echo "Airvideo not running."
    return
  fi

  echo "Stopping Airvideo."

  #kill airvideo process
  kill -9 $(cat $PIDFILE)

  # remove copy of pid created during start
  rm -f $PIDFILE
}

airvideo_restart()
{
  echo "Restart Airvideo."

  airvideo_stop
  airvideo_start
}

case "$1" in
  'start')
    airvideo_start
  ;;
  'stop')
    airvideo_stop
  ;;
  'restart')
    airvideo_restart
  ;;  
  *)
    echo "usage $0 start|stop|restart"
esac

 

# Set up airvideo to start on boot

update-rc.d airvideo defaults

 

# If you want to manually start and stop airvideo:

/etc/init.d/airvideo start

/etc/init.d/airvideo stop

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.