install airvideo on hp microserver + ubuntu

NEW INSTALL

case : ubuntu 16.04LTS

sudo apt-get install vlc browser-plugin-vlc
mkdir ~/AirVideoServerHD && cd $_
wget https://s3.amazonaws.com/AirVideoHD/Download/AirVideoServerHD-2.2.3.tar.bz2
tar xvfj AirVideoServerHD-2.2.3.tar.bz2
sudo cp -R AirVideoServerHD /opt

sudo vi /etc/init.d/airvideo

#!/bin/sh
 
### BEGIN INIT INFO
# Provides:          AirVideoServerHD
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start AirVideoServer HD
### END INIT INFO
 
UID=[your_account]
GID=[group_account]
AIRVIDEO_DIR=/opt/AirVideoServerHD
 
SERVER=$AIRVIDEO_DIR/AirVideoServerHD
OPTIONS="--config=Server.properties"
PIDFILE=/var/run/airvideoserverhd.pid
DBUS_SOCKET=/var/run/dbus/system_bus_socket
 
# See if the server is there
test -x $SERVER || exit 0
 
. /lib/lsb/init-functions
 
case $1 in
        start)
                if init_is_upstart; then
                        exit 1
                fi
                log_daemon_msg "Starting AirVideo" AirVideoServerHD
                        export DBUS_SYSTEM_BUS_ADDRESS=unix:path=$DBUS_SOCKET
                        if ! start-stop-daemon -d $AIRVIDEO_DIR -m -b --chuid $UID:$GID --start --quiet --oknodo --pidfile $PIDFILE --exec $SERVER -- $OPTIONS
                        then
                                log_end_msg 1
                                exit 1
                        fi
                        log_end_msg 0
 
                ;;
        stop)
                if init_is_upstart; then
                        exit 0
                fi
 
                log_daemon_msg "Stopping AirVideo name server" AirVideoServerHD
 
                start-stop-daemon --stop --quiet --user $UID --pidfile $PIDFILE --exec $SERVER
                rm -f $PIDFILE
                log_end_msg 0
 
                ;;
        restart|force-reload)
                if init_is_upstart; then
                        exit 1
                fi
                $0 stop
                sleep 1
                $0 start
                ;;
        status)
                status_of_proc -p $PIDFILE $SERVER AirVideoServer
                exit $?
                ;;
        *)
                echo "Usage: /etc/init.d/airvideo {start|stop|restart|force-reload|status}"
                exit 1
                ;;
esac

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

case : ubuntu 12.04LTS

sudo apt-get install build-essential yasm pkg-config
sudo apt-get install ttf-unfonts-core ttf-unfonts-extra # to use undotum
sudo apt-get install fonts-nanum fonts-nanum-coding fonts-nanum-extra # to use nanum
sudo apt-get install libmp3lame-dev libfaad-dev libx264-dev libfaac-dev 
sudo apt-get openjdk-6-jre

sudo mkdir /opt/airvideo-server/

wget http://s3.amazonaws.com/AirVideo/Linux-2.4.6-beta3/libav.tar.bz2
tar xvfj libav.tar.bz2
cd libav
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --enable-nonfree --enable-libfaac --prefix=/opt/airvideo-server/
make
sudo make install

wget http://s3.amazonaws.com/AirVideo/Linux-2.4.6-beta3/AirVideoServerLinux.jar
sudo mv AirVideoServerLinux.jar /opt/airvideo-server

sudo vi /opt/airvideo-server/AirVideoServerLinux.properties

path.ffmpeg = /opt/airvideo-server/bin/avconv
password = [password]
#subtitles.encoding = windows-1250
subtitles.encoding = utf-8
#subtitles.font = undotum
subtitles.font = nanumgothic
folders = movies:/home/xxx/movies,series:/home/xxx/series,animations:/home/xxx/animations

sudo vi /etc/init/airvideo.conf

start on runlevel [2345]
stop on shutdown
respawn

exec sudo -H -n -u [account name] LANG=ko_KR.UTF-8 /usr/bin/java -jar /opt/airvideo-server/AirVideoServerLinux.jar /opt/airvideo-server/AirVideoServerLinux.properties

OLD INSTALL

일단 과거의 인스톨 방법은 기록 차원에서 남겨두도록 하겠습니다.

그간 새로운 인스톨이 나온 것을 지금에서야 알았고 업데이트 한다. 일단 새로운 변경지점은 mpeg4ip, faac를 깔지 않아도 된다는 점.

hp microserver + ubuntu 에 airvideo를 깔아보았다.

각각 케이스별로 설치후 글마지막 부분의 default 케이스를 참고해서 셋팅하면 된다.

case : ubuntu 10.04LTS
여기 깔리는 airvideo-server 버젼은 alpha 4다.

sudo apt-get install libmp3lame-dev libfaad-dev libx264-dev faac openjdk-6-jre

apt-repository를 추가해서 설치하는 방법을 사용한다.

sudo apt-get install mpeg4ip-server
sudo apt-get install python-software-properties # to use 'add-apt-repository'
sudo add-apt-repository ppa:rubiojr/airvideo
sudo apt-get update
sudo apt-get install airvideo-server

# check ffmpeg & mp4creator & faac
whereis ffmpeg
whereis mp4creator
whereis faac

case : ubuntu 12.04LTS

새로운 ubuntu 12.04LTS 버젼이 나와서 위와 같은 방법으로 안된다고 하니, 일단 다른분의 글을 기초로 적어보겠다. 위와 비슷한 부분과 다른 부분을 비교해서 적어놨다.
여기 깔리는 airvideo-server 버젼은 alpha 6다.

reference : http://gabrielkim.tistory.com/m/post/view/id/38

sudo apt-get install libmp3lame-dev libfaad-dev libx264-dev faac openjdk-6-jre

직접 최신 버젼 airvideo (http://inmethod.com/forum/posts/list/1856.page)실행파일을 다운받는다.링크글에 나왔듯이 alpha5, 6를 사용할 경우 ffmpeg를 직접 빌드한다.

sudo apt-get install build-essential yasm pkg-config

wget http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar
wget http://inmethod.com/air-video/download/ffmpeg-for-2.4.5-beta7.tar.bz2

sudo mkdir /opt/airvideo-server/
sudo mv AirVideoServerLinux.jar /opt/airvideo-server/

tar xvfj ffmpeg-for-2.4.5-beta7.tar.bz2
cd ffmpeg
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --prefix=/opt/airvideo-server/
make;sudo make install

mpeg4ip-server 패키지를 깔기위해 각각 알맞은 라이브러리를 다운받아 사용한다.

# case : 32bit
wget http://free.nchc.org.tw/ubuntu/pool/main/libv/libvpx/libvpx0_0.9.6-1_i386.deb
wget http://free.nchc.org.tw/ubuntu/pool/main/liba/libav/libavutil50_0.6.6-0ubuntu0.11.04.1_i386.deb
wget http://free.nchc.org.tw/ubuntu/pool/main/liba/libav/libavcodec52_0.6.6-0ubuntu0.11.04.1_i386.deb
wget http://free.nchc.org.tw/ubuntu/pool/multiverse/m/mpeg4ip/libmpeg4ip-0_1.6dfsg-0.2ubuntu9_i386.deb
wget http://free.nchc.org.tw/ubuntu/pool/multiverse/m/mpeg4ip/libmp4v2-0_1.6dfsg-0.2ubuntu9_i386.deb
wget http://mirror.pnl.gov/ubuntu/pool/multiverse/m/mpeg4ip/mpeg4ip-server_1.6dfsg-0.2ubuntu9_i386.deb

# case : 64bit
wget http://free.nchc.org.tw/ubuntu/pool/main/libv/libvpx/libvpx0_0.9.6-1_amd64.deb
wget http://free.nchc.org.tw/ubuntu/pool/main/liba/libav/libavutil50_0.6.6-0ubuntu0.11.04.1_amd64.deb
wget http://free.nchc.org.tw/ubuntu/pool/main/liba/libav/libavcodec52_0.6.6-0ubuntu0.11.04.1_amd64.deb
wget http://free.nchc.org.tw/ubuntu/pool/multiverse/m/mpeg4ip/libmpeg4ip-0_1.6dfsg-0.2ubuntu9_amd64.deb
wget http://free.nchc.org.tw/ubuntu/pool/multiverse/m/mpeg4ip/libmp4v2-0_1.6dfsg-0.2ubuntu9_amd64.deb
wget http://mirror.pnl.gov/ubuntu/pool/multiverse/m/mpeg4ip/mpeg4ip-server_1.6dfsg-0.2ubuntu9_amd64.deb

sudo apt-get install libcaca0 libgsm1 liborc-0.4-0 libschroedinger-1.0-0 libsdl1.2debian libspeex1 libtheora0 libva1 libxvidcore4
sudo dpkg -i *.deb

# check ffmpeg & mp4creator & faac
whereis ffmpeg
whereis mp4creator
whereis faac

만일 위의 방식대로 안깔리면 다음과 같이 한다.

sudo apt-get -f install
sudo dpkg -i *.deb

default :

sudo apt-get install ttf-unfonts-core ttf-unfonts-extra # to use undotum
sudo apt-get install fonts-nanum fonts-nanum-coding fonts-nanum-extra # to use nanum
sudo vi /opt/airvideo-server/AirVideoServerLinux.properties

path.ffmpeg = /opt/airvideo-server/bin/ffmpeg
path.mp4creator = [mp4creator_path]
path.faac = [faac_path]
password = [password]
#subtitles.encoding = windows-1250
subtitles.encoding = euc-kr
subtitles.font = undotum
#subtitles.font = nanumgothic
folders = movies:/home/xxx/movies,series:/home/xxx/series,animations:/home/xxx/animations

sudo vi /etc/init/airvideo.conf

start on runlevel [2345]
stop on shutdown
respawn

exec sudo -H -n -u [account name] LANG=ko_KR.UTF-8 /usr/bin/java -jar /opt/airvideo-server/AirVideoServerLinux.jar /opt/airvideo-server/AirVideoServerLinux.properties

sudo start airvideo

글쓴이

yupmin

Inside Deep Throat.

답글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.