시놀로즈카페 저스틴님의 글을 참조로 작성되었습니다.

장비 :
- 시놀로지 DS-411+
- ATOM i686
- IPHONE4

Bootstrap 설치

1. NAS 리부팅
2. root 로 로그인
3. cd /volume1/@tmp
4.  wget  http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh (D410용)
5. chmod 755 syno-i686-bootstrap_1.2-7_i686.xsh
6.  ./syno-i686-bootstrap_1.2-7_i686.xsh
7.  rm *.xsh
8. NAS 리부팅후 root 로 로그인
9. ipkg update
10. ipkg upgrade

Package 설치

0. 설치 환경

접속 방법 : ssh (Putty 사용)
권한 : root
작업디렉토리 : /opt/etc
Air Video Server 설치 디렉토리 : /opt/airvideo
Java 설치 디렉토리 /opt/java

/etc/profile에 아래 내용을 추가하거나 수정합니다.
수정 후에는 로그오프하고 로그온 하시거나  ./etc/profile 명령어를 실행합니다.

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/syno/bin:/usr/syno/sbin:/opt/bin:/opt/sbin:/opt/java/bin:/opt/i686-linux-gnu/bin
LD_LIBRARY_PATH=/opt/lib:/lib:/opt/i686-linux-gnu/lib
LD_RUN_PATH=/opt/lib:/lib:/opt/i686-linux-gnu/lib
JAVA_HOME=/opt/java
export PATH LD_LIBRARY_PATH LD_RUN_PATH JAVA_HOME
LANG="ko_KR.UTF-8"
LC_ALL="ko_KR.UTF-8"
SUPPORTED="ko_KR.UTF-8:ko_KR:ko"
export LANG LC_ALL SUPPORTED

1. 패키지 설치

ipkg install optware-devel
ipkg install gcc
ipkg install git
ipkg install grep
ipkg install sdl
ipkg install sdl-dev
ipkg install libmpeg2
ipkg install mpeg2dec
ipkg install libpth
ipkg install lame
ipkg install faad2
ipkg install xvid
ipkg install libjpeg
ipkg install vim

ln -s /opt/bin/bash /bin/bash

2. x264 설치

cd /opt/etc/
git clone git://git.videolan.org/x264.git
cd /opt/etc/x264
./configure --prefix=/opt --disable-asm
make
make install

3. faac 설치

cd /opt/etc
wget http://switch.dl.sourceforge.net/sourceforge/faac/faac-1.28.tar.gz
(전 URL에서 직접 다운로드하여 FTP 로 올려서 사용했습니다.)
tar -xzf faac-1.28.tar.gz
cd faac-1.28
./configure --prefix=/opt --without-mp4v2
make
make install

4. Xvid

cd /opt/etc/
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
(전 URL에서 직접 다운로드하여 FTP 로 올려서 사용했습니다.)
tar -xzf xvidcore-1.2.2.tar.gz
cd /opt/etc/xvidcore/build/generic/
./configure --prefix=/opt
make
make install

5. ffmpeg-for-2.2.5 설치

cd /opt/etc
http://www.inmethod.com/air-video/download/ffmpeg-for-2.2.5.tar.bz2
(직접 다운로드 받아서 /opt/etc 에 업로드해서 사용했습니다)
tar jxf ffmpeg-for-2.2.5.tar.bz2
cd ffmpeg
./configure --prefix=/opt --enable-static --disable-shared --enable-gpl --enable-nonfree --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libmp3lame --enable-libx264 --enable-libxvid --disable-asm --disable-decoder=aac
make
make install

6. Library 링크 설정

cd /opt/lib
rm libxvidcore.so
ln -s libxvidcore.so.4.2 libxvidcore.so
ln -s libxvidcore.so.4.2 libxvidcore.so.4
ln -s libx264.so.106 libx264.so

7. mp4creator 설치

http://sourceforge.net/projects/mpeg4ip/mpeg4ip-1.5.0.1.tar.gz (다운로드)
tar -xzf mpeg4ip-1.5.0.1.tar.gz
cd mpeg4ip-1.5.0.1

vi  lib/rtp/rtp.c
:1733

i 를 누르고 아래와 같이 세 줄 앞에 // 로 주석처리해줍니다.

  //if (((packet->common.count * 6) + 1) < (ntohs(packet->common.length) - 5)) {
  //  rtp_message(LOG_NOTICE, "Profile specific SR extension ignored");
  //}

:1752
i 를 누르고 세 줄 앞에 // 로 주석처리해 줍니다.
 
  //if (((packet->common.count * 6) + 1) < ntohs(packet->common.length)) {
  //  rtp_message(LOG_INFO, "Profile specific RR extension ignored");
  //}

ESC키를 누르고 :wq 엔터 눌러 저장하고 종료합니다.

cd /opt/etc/mpeg4ip-1.5.0.1
./bootstrap --prefix=/opt --disable-mp4live --disable-mp4live-alsa
make
cd lib
make install
cd ../server
make install

참고로 /opt/bin/mp4creator 가 생성되어야 하지만 안생기더군요.
그래도 동영상 재생하는데는 이상이 없었습니다.

7. Java 설치

Oracle 이 SUN을 잡수셨죠....그래서 www.sun.com 이 나닌 www.oracle.com 에서 JAVA를 찾으셔야 합니다.
x86용 Java SE를 다운받아 설치해야 합니다.
다운받기 위해서는 몇 가지 정보를 입력해야 합니다. (이름, 이메일주소 등)
Submit을 하면 입력된 이메일주소로 다운로드 링크를 전송해 줍니다.

아래 파일을 다운받으시고 /opt 에 FTP를 통해서 업로드 합니다.
ejre-1_6_0_21-fcs-b09-linux-i586-headless-27_sep_2010.tar.gz

cd /opt
tar -xzf ejre-1_6_0_21-fcs-b09-linux-i586-headless-27_sep_2010.tar.gz
ln -s ejre1.6.0_21 java

8. Air Video Server 설치

mkdir /opt/airvideo
cd /opt/airvideo

http://inmethod.com/forum/posts/list/1856.page 참조사이트

아래 파일을 다운로드 받아서 FTP 로 /opt/airvideo 에 업로드 합니다.
http://inmethod.com/air-video/download/linux/alpha4/AirVideoServerLinux.jar

9. 글꼴 설치 및 한글 글꼴 변경
(저스틴님 글에는 이걸 해야 한다고 나오던데 전 오류가 나서 진행하지 않았습니다)
추후 다음팟인코더를 통해 영상과 자막을 합치면 폰트 설치 안해도 자막 잘보입니다.

10. Air Video 설정파일 만들기(한글자막 설정)

vi /opt/airvideo/test.properties

path.ffmpeg = /opt/bin/ffmpeg
path.faac = /opt/bin/faac
path.mp4creator = /opt/bin/mp4creator (이건 생성이 안되어 있더군요)
password =
subtitles.encoding = UTF-8
subtitles.font = Bitstream Vera Sans Mono (9번작업이 진행이 안되서 음영부분은 삭제했습니다)
folders = Movie:/volume1/movie,Video:/volume1/video (제목:경로,제목:경로,...)

10. Air Video Server 구동하기

/usr/syno/etc/rc.d/S94airvideo.sh 를 생성합니다.

vi /usr/syno/etc/rc.d/S94airvideo.sh

#!/bin/sh
# Copyright (c) 2000-2008 Synology Inc. All rights reserved.

SynoStop=/usr/bin/killall

case $1 in
start)
echo "Starting Air Video Server ..."
nohup /opt/java/bin/java -jar /opt/airvideo/AirVideoServerLinux.jar /opt/airvideo/test.properties > /dev/null 2>&1 &
;;
stop)
$SynoStop -9 java > /dev/null 2>&1
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usages: $0 [start|stop|restart]"
;;
esac

[ESC] 누르고 :wq로 저장하고 빠져나옵니다.
chmod 755 S94airvideo.sh

/etc/profile에 alias로 등록시켜놓으면 쉽게 start/stop/restart가 가능합니다.
vi /etc/profile 후 아래내용 추가
alias air="/usr/syno/etc/rc.d/S94airvideo.sh"

EXIT 후 재로그인하고 alias 명령어로 air 가 있는지 확인합니다.

실행 : air start
중지 : air stop

개별실행명령 : nohup /opt/java/bin/java -jar /opt/airvideo/AirVideoServerLinux.jar /opt/airvideo/test.properties

11. 참고 자료

우분투에서 에어비디오 서버 구동하기
http://clien.career.co.kr/cs2/bbs/board.php?bo_table=lecture&wr_id=64177&page=0

Video-Streaming from QNAP NAS via AirVideo to iPad or iPhone
http://forum.qnap.com/viewtopic.php?f=177&t=32731

AirVideo Server under Linux
http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux

덧1,
모든 동영상은 다음팟인코더로 IPHONE4 고화질로 자막입혀서 MP4로 인코딩해서 보시면 됩니다.
일반 미드의 경우 파일크기가 오히려 더 커집니다. 유의하시구요.
즐감하시기 바랍니다.

덧2, 대부분 모든 내용을 담으려고 했습니다만 빠진부분이 있을수 있습니다. 참고자료 사이트 참조하시면서 공부하듯 진행하시기 바랍니다.
자주 들르지 못해 질문에 답변을 못드릴수도 있습니다. 미리 죄송~

-------------

아이폰4 AVI,MKV 동영상을 MP4로 변환하기

스누피님 블로그 발췌 : http://snpbox.tistory.com/1403



저작자 표시 비영리 변경 금지
by 제씨 2010/11/14 10:22



원문 : http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server%2C_bootstrap%2C_ipkg_etc#How_to_install_ipkg

The steps to install the bootstrap (provided as .xsh files) are below, you should replace the text in bold with the relevant text for your CPU's bootstrap file (listed above).

  1. Reboot your NAS.
  2. Enable and then Login to the Command Line Interface as user "root", password is the same as for admin.
  3. Change to a directory such as "/volume1/@tmp", i.e. enter the command "cd /volume1/@tmp"
  4. Get the NAS to download the bootstrap, e.g. if you have an mv5281 ARM model enter the command "wget http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh", alternatively download the bootstrap to your PC and then copy it to a shared folder on the NAS
  5. Now run the .xsh script, e.g. if you have an mv5281 ARM model and used the bootstrap above enter the command "sh syno-x07-bootstrap_1.2-7_arm.xsh"
  6. After the script has finished you can delete the script file, e.g. for mv5281 ARM users using the bootstrap above enter the command "rm syno-x07-bootstrap_1.2-7_arm.xsh"
  7. Reboot the NAS and login again to the Command Line Interface as user "root"
  8. Update the ipkg list of available packages using the command "ipkg update"
  9. Upgrade any ipkg installed packages to the latest versions using the command "ipkg upgrade"
  10. Finished, you can now install ipkg packages using the command "ipkg install xxxx" where xxxx is the name of the package. You can list all the available packages using the command "ipkg list". As this is a long list you can filter it using the command "ipkg list | grep xxxx" where xxxx is the text you want to search for. Alternatively, you view one page at a time using the "more" pipe, e.g. "ipkg list | more"
NAS에 접속해서 iperf 설치하기

# ipkg install iperf

Iperf 사용법

NAS(서버)에서 iperf -s
PC(클라이언트)에서 iperf -c 192.168.0.xxx (서버쪽 ip)

IPTIME N6004 와 CS407 에서 점보프레임 설정법
IPTIME N6004는 12K까지 점보프레임을 지원함(자동)
LAN 카드는 7K 까지 점보프레임을 지원
CS407은 7K 까지 점보프레임을 지원
랜카드와 NAS 동일 대역폭의 점보프레임을 세팅함
7K 부터 2K까지 테스트 결과 : 500M 지원
설정안할때는 230M 측정됨
저작자 표시 비영리 변경 금지
by 제씨 2010/05/25 01:03
| 1 |