Ubuntu下安装AirVideo服务器
- July 27th, 2010
- Write comment
准备环境
sudo apt-get install libmp3lame-dev libfaad-dev libx264-dev faac faad lame mpeg4ip-server git-core pkg-config
下载AirVideo源码,http://www.inmethod.com/air-video/licenses.html。选最新的2.5
配置安装,注意这边enable disable前面都是两个短杠。这个主题有点bug
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libfaad --disable-decoder=aac make sudo make install
下载服务器jar包,http://inmethod.com/air-video/download/linux/alpha3/AirVideoServerLinux.jar
下载配置文件,http://inmethod.com/air-video/download/linux/alpha1/test.properties
配置文件大致如下:
path.ffmpeg = /usr/local/bin/ffmpeg path.mp4creator = /usr/bin/mp4creator path.faac = /usr/bin/faac password = subtitles.encoding = windows-1250 subtitles.font = Verdana folders = Movies:/home//Videos,Series:/Volumes/Data/Series
启动
java -jar AirVideoServerLinux.jar-a3 test.properties
自动启动
ubuntu有个东西叫UpStart,创建一个文件 /etc/init/airvideo.conf
写入底下内容就能自动启动了(不过中文文件(夹)名有问题啊,谁告知下不?)
start on runlevel [2345] stop on shutdown respawn exec sudo -H -n -u 用户名(例如tsung) /usr/bin/java -jar /opt/AirVideoServer/AirVideoServerLinux.jar /opt/AirVideoServer/test.properties
如果提示/usr/bin/java找不到,则做个链接
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java
参考这篇英文:
http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux
以及这篇日文:
http://blog.browncat.org/2010/07/ubuntu1004_airvideo_server.html