ubuntu/debianã§AirVideoããµã¼ãã¨ãã¦å©ç¨ããæ¹æ³
AirVideoã¯ã³ã³ãã¥ã¼ã¿ä¸ã§åçã§ããæ åãiPhone,iPadã§åçããã¨ããã¨ã¦ãç´ æ´ããããµã¼ãã¹ãã½ããã§ãã
http://www.inmethod.com/air-video/
ãããæ¹æ³æ¬¡ç¬¬ã§ã¯å¤åºå ãããiPhone,iPadã§èªå® ã®ã³ã³ãã¥ã¼ã¿ã®æ åãè¦ãã¾ãããã®AirVideoãubuntu/debianã§æ§ç¯ããã®ã§ãã®æ¹æ³ãã¡ã¢ã£ã¨ãã¾ããåä½ç°å¢ã¯2.6.32-24-generic #42-Ubuntuã§ãã
ã¤ã³ã¹ãã¼ã«ã®æ¹æ³ã¯
AirVideo Server under Linux | wiki.mbirth.de
ãåèã«ãã¦ãã¾ããå¤å°ç°ãªã£ã¦ããé¨åãªã©ãããã¾ããããããªãé¨åã¯ä¸è¨ãåèã«ãã¦ããã ããã¨æ¸ããæå³ããã¾ã^^
1 ä¸æºåï¼ffmpegã®ã³ã³ãã¤ã«ã®ããã®apt-get
aptã§ãã¤ã³ã¹ãã¼ã«ã§ãã¾ããconfigureãªã©ã®ãªãã·ã§ã³ãæ確ã«ããããã«èªåã§ã³ã³ãã¤ã«ãã¾ãããã®ä»ãAirVideoã§mp4creatorãå©ç¨ããããã«mpeg4ip-serverãå ¥ãã¾ãã
# apt-get install faad # apt-get install libfaad-dev # apt-get install libxvidcore-dev # apt-get install libmp3lame # apt-get install libx264-85 # apt-get install libx264-dev # apt-get install mpeg4ip-server # apt-get install libfaac-dev # apt-get install libmp3lame-dev
2 ffmpegã®downloadã¨configure, make, make install
Licenses
ããffmpegãdownloadãã¾ããç§ã¯2.2.5ãdownloadãã¾ããã
# wget http://www.inmethod.com/air-video/download/ffmpeg-for-2.2.5.tar.bz2 # bzip2 -dc ffmpeg-for-2.2.5.tar.bz2 | tar xvf - # cd ffmpeg # ./configure --enable-gpl --enable-nonfree --enable-postproc \ --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame \ --enable-libx264 --enable-libxvid --enable-x11grab --disable-shared \ --enable-static --disable-decoder=aac # make # make install
ffmpegã§"ERROR: libx264 not found"ã¨ã©ã¼ãåºãå ´å
ffmpeg-2.2.5ã§ã¯x264ãè¦ã¤ãããªã "ERROR: libx264 not found" ã¨ããã¨ã©ã¼ãåºããã¨ãããã¾ãããã®ãã¼ã¸ã§ã³ã®ffmpegã®ãã°ã®ããã§ããææ°çã®ffmpegã§ã³ã³ãã¤ã«ããã¨ãã¾ããããã¨ãããã¾ãããã®éã«ãx264ã®ãã¼ã¸ã§ã³ãä½ãã¨ffmpegã³ã³ãã¤ã«ã®éã«æããããã¨ãããã¾ããx264ã1ããã³ã³ãã¤ã«ããã»ããç¡é£ãªããã§ãã
http://www.videolan.org/developers/x264.html ããx264ãdownloadã
# wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 # bzip2 -dc last_x264.tar.bz2 | tar xvf - # cd x264-* # ./configure --disable-asm # ã¢ã»ã³ãã©ãå ¥ã£ã¦ãªãã®ã§ç¡å¹ã«ããã»ããç¡é£ # make # make install
ãã®å¾ã«ffmpegã®ææ°çãdownload
http://ffmpeg.org/download.html
# wget http://ffmpeg.org/releases/ffmpeg-0.6.90-rc0.tar.bz2 # bzip2 -dc ffmpeg-0.6.90-rc0.tar.bz2 | tar xvf - # ./configure --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-x11grab --disable-shared --enable-static --disable-decoder=aac --disable-yasm
ããã§ffmpegãã³ã³ãã¤ã«ã§ãããã¨ãããã¾ãã
3 AirVideoServerLinuxã®èµ·å
AirVideoLinuxServerãDownloadãã¾ãã
# wget http://inmethod.com/air-video/download/linux/alpha5/AirVideoServerLinux.jar
AirVideoServerLinuxã¯javaãã¼ã¹ã§ããJavaä¸å¼ãå ¥ã£ã¦ããªãå ´åã¯ã¨ãããã
# apt-get install openjdk-6-jre
ã§åé¡ã¯ãªãã¨æãã¾ãã
AirVideoServerLinuxã®èµ·åç¨è¨å®ãã¡ã¤ã«ãä½ãã¾ãã
#vim test.properties
test.propertiesã®å 容
path.ffmpeg = /usr/local/bin/ffmpeg path.mp4creator = /usr/bin/mp4creator path.faac = /usr/bin/faac password = xxxxx âãã¹ã¯ã¼ã subtitles.encoding = windows-1250 subtitles.font = Verdana folders = Movies:/var/xxxxx âå ±æãããã¹(Moviesã¨ããååã§å ±æ)
ã§ã¯æ©éAirVideoServerLinuxãåããã¾ãã
ãAirVideoServerLinux.jarã¨test.propertiesã¯åããã¹ã«ä¿åãã¦ãã ãããã
# java -jar AirVideoServerLinux.jar test.properties
ããã§èµ·åãã¾ããiPhone,iPadãããµã¼ãã®ipãå ¥åãã¦ã¢ã¯ã»ã¹ãã¦ã¿ã¦ãã ããã"Your AirVideo server is outdated"ãªã©ã¨ããã¡ãã»ã¼ã¸ãiPhone,iPadã§åºãå ´åã¯åç´ã«AirVideoServerLinux.jarã®ãã¼ã¸ã§ã³ãä½ããã¨ãããã¾ãã
ç¾æç¹(2012-09-07)ã§ã¯
http://inmethod.com/air-video/download/linux/alpha1/AirVideoServerLinux.jar
http://inmethod.com/air-video/download/linux/alpha2/AirVideoServerLinux.jar
http://inmethod.com/air-video/download/linux/alpha3/AirVideoServerLinux.jar
http://inmethod.com/air-video/download/linux/alpha4/AirVideoServerLinux.jar
http://inmethod.com/air-video/download/linux/alpha5/AirVideoServerLinux.jar
http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar
ããªãªã¼ã¹ããã¦ãã¾ããããããããæ°ãããã®ãåºã¦ããããããã¾ããã®ã§æ¢ãã¦ã¿ã¦ãã ããã
4 avahi, bonjourã§æ¤ç´¢
IPæå®ã§ã¯ãªãbonjourã§ç°¡åã«AirVideoServerã«ã¢ã¯ã»ã¹åºæ¥ãããã«ããæ¹æ³ã§ãã
# apt-get install avahi-daemon
ã§avahi-daemonãã¤ã³ã¹ãã¼ã«ãå ¥ã£ã¦ããå ´åã¯ä¸è¦ã§ãã
ãã®å¾
# vim /etc/avahi/services/airvideo.service
/etc/avahi/services/airvideo.serviceã®å 容
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_airvideoserver._tcp</type> <port>45631</port> </service> </service-group>
# /etc/init.d/avahi-daemon start
5 AirVideoServerLinuxãèªåèµ·åããã
update-rc.d使ã£ã¦ãããã®ã§ãããupstartã使ã£ã¦ãã¾ããupstartå ¥ã£ã¦ãªãå ´åã¯
# apt-get install upstart
upstartç¨ã«AirVideoèµ·åè¨å®
# mkdir /opt/AirVideoServer # cp test.property /opt/AirVideoServer # cp VirVideoServerLinux.jar /opt/AirVideoServer # vim /etc/init/airvideo.conf
/etc/init/airvideo.confã«
start on runlevel [2345] stop on shutdown respawn exec sudo -H -n -u mbirth env LANG=ja_JP.UTF-8 \ `which java` -jar /opt/AirVideoServer/AirVideoServerLinux.jar \ /opt/AirVideoServer/test.properties
mbirthã¯èªåã®ã¦ã¼ã¶åã§ã
ãã¨ã¯upstartã§
# sudo start airvideo
ã§èµ·åãã¾ãã
å®éã«ä¸è¨éãã§åä½ããã®ã§åé¡ã¯ãªãã¨æãã¾ãã