[Logo] Air Video Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
linux tips and tricks for air video running on debian that i have to remember  XML
Forum Index » Air Video General
Author Message
chri



Joined: 12/15/2010 08:45:47
Messages: 19
Offline

Official linux thread

(dependencies debian is missing can be loaned from ubuntu as it is painful to compile them and ubuntu is similar to debian)

--
mkdir /home/airvideo
cd /home/airvideo
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 xvjf ffmpeg-for-2.4.5-beta6.tar.bz2
cd ffmpeg
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame
(as ffmpeg now supports all aac stuff internally and therefore don't need libfaad )
make
cd /home/airvideo
nano test.properties
paste wrote:
path.ffmpeg = /home/airvideo/ffmpeg/ffmpeg
path.mp4creator = /usr/bin/mp4creator
path.faac = /usr/bin/faac
password = specify
subtitles.encoding = windows-1250
subtitles.font = Verdana
folders = Movies:path to movies

ctrl+o, ctrl+x
chmod +x AirVideoServerLinux.jar
nano /etc/init.d/airvideo
(Added new syntax (-Djava.awt.headless=true ) as the server bugged out with errors regarding the parsing of the video files)

paste wrote:

#! /bin/sh

#Original /etc/init.d/skeleton modified for http://mydebian.blogdns.org

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Description"
NAME="airvideoserver"
DAEMON=/usr/bin/java
DAEMON_ARGS="-jar -Djava.awt.headless=true /home/airvideo/AirVideoServerLinux.jar /home/airvideo/test.properties"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/airvideo
#the user that will run the script
USER=<USERNAME FOR RUNNING THE SCRIPT>

# NO NEED TO MODIFY THE LINES BELOW

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{

start-stop-daemon -b --start --quiet --chuid $USER -m -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
|| return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
RETVAL="$?"
rm -f $PIDFILE
return "$RETVAL"
}

case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 3
;;
esac

:


ctrl+o,ctrl+x
chmod +x /etc/init.d/airvideo
./etc/init.d/airvideo start


--

Hack for changing ports:

If you take the AirVideoServerLinux.jar and unzip it, it contains the java source code.
Using a hex editor, open the file Cli.class in the subdirectory /com/inmethod/air/video/ I tried using VI but it gave me errors, so I just used a hex editor.
Scroll down to address 7EE. There is the port, listed as 45631. I changed it to the port I needed. (33517)
I then rezipped the entire folder structure into a new zip file AirVideoServerLinux33517.jar and ran with the normal

(Thx Peter)

This message was edited 3 times. Last update was at 06/17/2011 13:03:11

 
Forum Index » Air Video General
Go to:   
Powered by JForum 2.1.8 © JForum Team