Â
åè¨äºã§ãRaspberryPiï¼å代ï¼ã«HandBrakeã®ã¤ã³ã¹ãã¼ã«ãã§ããªãã£ãã
ãªãã³ã¸ã«ãRaspberryPi 3 ã« HandBrake ãã¤ã³ã¹ãã¼ã«ãããã¨ã«ãããå代 㨠3 ã¨ã§ã¯ã3ã®ã»ããCPUã®æ°ã4åã«å¢ãã¦ããããã¨ã³ã³ã¼ãã¹ãã¼ãã段éãã ããã
ãªãã¨ãRaspberryPi 3 ï¼ã¨2ï¼ç¨ã«ãå°ç¨ã®ã¤ã³ã¹ãã¼ã©ï¼debãã¡ã¤ã«ï¼ãä½ã£ã¦ãã人ãããã
Raspberry Pi ⢠View topic - Video Converter HandBrake 0.10.5 for RPi2&3
ãã£ãããã ãã§ã¤ã³ã¹ãã¼ã«ã§ãããããã
ã¤ã³ã¹ãã¼ã«ãã¦ã¿ããä½æ¥ã¯å ¨é¨ sudo ãã¦ããè¡ããã¨ã«ããã
ã¾ã㯠gdebi-core ã¨ãããã¤ã³ã¹ãã¼ã«ã
# sudo -s
# apt-get install gdebi-core
次ã¯wget ã§debãã¡ã¤ã«ããã¦ã³ãã¼ãã
#Â wget http://steinerdatenbank.de/software/ghb_0.10.5-1_armhf.deb
gdebiã³ãã³ãã§ãdebãã¡ã¤ã«ãã¤ã³ã¹ãã¼ã«ããã
# sudo gdebi ghb_0.10.5-1_armhf.deb
ã¤ã³ã¹ãã¼ã«å®äºã
ãã£ãã®3ã¹ããã㧠HandBrake ãã¤ã³ã¹ãã¼ã«ã§ãã¦ãã¾ã£ããarmç¨ã¯ç¡ãããã½ã¼ã¹ããã³ã³ãã¤ã«ãè¦æãã¦ãããåè¨äºã®ãããªã¨ã©ã¼ã¯åºãã ãããããããã1ã¤1ã¤èªãã§ãããã°â¦ã¨æã£ã¦ãããã©ãããä¸çºã§è§£æ±ºãã»ãã¨ããããã¯ç´ æ´ãããã
Â
ã¤ã³ã¹ãã¼ã«ãã HandBrake ã®ãã«ããè¦ã¦ã¿ãã
ã¡ããã¨ã¤ã³ã¹ãã¼ã«ãããããã ããã£ããã¨ã³ã³ã¼ãã試ãã¦ã¿ããã½ã¼ã¹ã¯DVDãã£ã¹ã¯ãdfã³ãã³ãã«è¡¨ç¤ºããã /media/pi/DVD_VIDEO ãããã
$ df
ã¨ã³ã³ã¼ãï¼å§ç¸®ï¼å¾ã«åºåãããmp4ã®ä¿åå ã¯ããããã¯ã¼ã¯å ã«ããNASï¼192.168.xxx.xxxï¼ã®ãPT3ãã¨ããå ±æãã©ã«ãã«ãããè¦æ £ããæ¸ãæ¹ãããã°ã¥¥192.168.xxx.xxxÂ¥PT3ãã¨ãã£ãã¨ãããã
NASããã¦ã³ããããRaspberryPi3ã®fstabã«è¨è¿°ãããã®ã§ãmountã³ãã³ãã§ãã¦ã³ããã¦ããã
$ sudo mount -a
ãã¦ã³ããããã確èªã
$ df | grep PT3
/volumes/PT3 ã¨ãã¦ãã¦ã³ããããã®ããããã
Â
ããã§ãå§ç¸®å ã½ã¼ã¹ï¼DVD_VIDEOï¼ã¨ãå§ç¸®å ã®NASï¼PT3ï¼ãæã£ããæ©éHandBrakeã§ã¨ã³ã³ã¼ããã¦ã¿ãã
ã¨æã£ãããä»åã®DVDï¼4.7GBï¼ãã¨ã³ã³ã¼ãããåã«ãå°ãããµã³ãã«ãã¡ã¤ã«ã§ç¶ºéºã«ã¨ã³ã³ã¼ãã§ããããã¹ããã¦ã¿ããã
Â
ã¾ãã¯ã½ã¼ã¹ãã¡ã¤ã«ãããNASï¼å ±æãã©ã«ããPT3ãï¼ã«ç§»åããã
# cd /volumes/PT3
ãµã³ãã«ãã¡ã¤ã«ã«ã¯ã以åãã£ããã£ããåç»ãã¡ã¤ã«ã使ãããã¡ã¤ã«åã«ãè±æããver1ãã¨ããåèªãå«ãã§ããã¤ããã¡ã¤ã«åã®çµãããtsã§çµãããã¡ã¤ã«ãããããããæ¤ç´¢ãããã®ãµã¤ãºã確ãããã
# for i in *è±æ*ver1*ts; do echo "$i"; ls -shal | grep "$i"; done
ãã¡ã¤ã«ãµã¤ãºã¯ 43MB ãããªãããããªãã¨ã³ã³ã¼ãã«ãæéã¯ãããã¾ãããµã³ãã«ã¨ãã¦ã¡ããã©ããã
æ¸å¼
HandBrakeCLI -i ã½ã¼ã¹ -o åºåå -Z "å質æå®ãããã¡ã¤ã«"
å®è¡
HandBrakeCLI -i è±æãåã«_ver1.ts -o è±æãåã«_ver1.ts.mp4 -Z "AppleTV 3"
â» å質æå®ã®ãAppleTV 3ãã«ã¤ãã¦ã¯ãHandBrakeãæã£ã¦ããå質æå®ãã¡ã¤ã«ï¼ãããã¡ã¤ã«ï¼åãæå®ãããã©ããªãããã¡ã¤ã«ããããã¯ãããã«æ å ±ã溢ãã¦ããã©ãä»ã¾ã§è©¦ããä¸ã§ä¸çªãã©ã³ã¹ãåãã¦ãã®ããAppleTV 3ãã ã£ãã®ã§ãä»åãããã使ã£ã¦ã¿ãã
ãªãããAppleTVãã¨ã3ãã®éã«åè§ã¹ãã¼ã¹ãããã®ã§ãæå®ããã¨ãã¯ããã«ã¯ãªã¼ã""ã§å²ã㧠"AppleTV 3"ã¨ãã¦ããå¿ è¦ãããã
Â
ã¨ã³ã³ã¼ãå®è¡ã-i ã -o ãææ¸ãããã®ãé¢åãªã®ã§ãforæã«çµã¿è¾¼ãã
# for i in *è±æ*ver1*ts; do echo "$i";  HandBrakeCLI -i "$i" -o "$i".mp4 -Z "AppleTV 3"; done
å§ç¸®éå§ãããä¸ããæ°è¡ç®ã«ã4 CPUs detectedãã¨ãããRaspberryPi 3 ã®4ã¤ã®CPUããã«æ´»ç¨ãããããã ãå®äºã¾ã§ãã°ããå¾ ã¤ã
Â
å§ç¸®å®äºãæ°åã§çµãã£ãã
æ åã¯1åã»ã©ã§ãå§ç¸®ã1åç¨åº¦ã ãããæ åãã¡ã¤ã«ã®å æéã¨åãç¨åº¦ã§å§ç¸®ã§ããã£ã¦ãã¨ãããã£ããååã«éããRaspberryPi3ã®æ¶è²»é»åã¯ã¹ããç¨åº¦ã ãããããã§ãè¶ çé»åã®åç»å§ç¸®å°ç¨ãã·ã³ãã§ãããã¨ã«ãªãã
Â
ã¨ã³ã³ã¼ãããããã¡ã¤ã«.mp4 ãåçãã¦ã¿ãã
ååãã¬ã¤ãå ãã¡ã¤ã«.tsã«è¦å£ãããªããããã㯠HandBrakeãå§ç¸®åå¾ã®åç»ãã¡ã¤ã«ãµã¤ãºã¯ã©ããã
å§ç¸®åï¼43MB
å§ç¸®å¾ï¼29MB
ä½ãã¼ã»ã³ãå§ç¸®ãããï¼è¨ç®å¼ã¯ã29 / 43 * 100ãã§ããã¨æããã©ãé¢åãªã®ã§pythonã«ããããï¼bashã ã¨å°æ°ç¹è¨ç®ãé¢åã ããï¼ã
$ python
>>> 29.000 / 43.000 * 100
67.4ï¼ å§ç¸®ãããã ã»ã㨠RaspberryPi 3 æé«ã
Â