MPlayer
|
MPlayer´Â ´Ù¾çÇÑ ÄÚµ¦°ú ÆÄÀÏÆ÷¸ËÀ» Áö¿øÇÏ´Â µ¿¿µ»ó Àç»ý±âÀÔ´Ï´Ù. MPEG-1/2/4, DivX 3/4/5, Windows Media 7/8/9, Quicktime 5/6, Vivo 1/2µîÀ» Áö¿øÇϰí, RealAudio/Videoµµ 9±îÁö Áö¿øÇÕ´Ï´Ù. MMX/SSE(2)/3Dnow(Ex)·Î ÃÖÀûÈµÈ ÀÚü ¿Àµð¿À/ºñµð¿À ÄÚµ¦À» ³»ÀåÇϰí ÀÖÁö¸¸, XAnimÀ̳ª RealPlayerÀÇ ¹ÙÀ̳ʸ® ÄÚµ¦ Ç÷¯±×ÀÎ, Win32ÀÇ ÄÚµ¦ DLLµµ »ç¿ë °¡´ÉÇÕ´Ï´Ù. ±âº»ÀûÀÎ VCD/DVD Àç»ý, DVD ÀÚ¸·, »Ó¸¸ ¾Æ´Ï¶ó ÅØ½ºÆ® ±â¹ÝÀÇ ÀÚ¸· Æ÷¸Ëµµ ´Ù¼ö Áö¿øµË´Ï´Ù. mencoder¶ó´Â ÇÁ·Î±×·¥À» ÅëÇØ raw/divx/mpeg4 AVI(pcm/mp3 audio)Çü½ÄÀ¸·Î º¯È¯±â´ÉÀ» Á¦°øÇϸç, V4L ÀåÄ¡¿¡¼ÀÇ ºñµð¿À ĸÃĵµ Áö¿øÇÕ´Ï´Ù. (http://freshmeat.net ÀÇ ¼Ò°³ Àοë)
[edit]
ÀÚ¸· À§Ä¡ Á¶Á¤ ¶#!/bin/bash WIDTH=`mplayer -vo null -ao null -identify -endpos 0 "$1" | grep ID_VIDEO_WIDTH | sed -e "s/^.*=//g"`; HEIGHT=`expr $WIDTH \* 9 / 16` mplayer -vf expand=-1:$HEIGHT "$1"
#!/usr/bin/php
<?php
if($_SERVER['argc'] < 2) {
echo "mplaysmi moviefile\n";
exit;
}
if(!file_exists($_SERVER['argv'][1])) {
echo '"'.$_SERVER['argv'][1]."\" file not found\n";
exit;
}
$moviefile = $_SERVER['argv'][1];
while(true) {
preg_replace_callback('/^ID_VIDEO_(WIDTH|HEIGHT)=(\d+)/m', 'size_callback', shell_exec('mplayer -vo null -ao null -identify -endpos 0 "'.$moviefile.'" | grep "^ID_VIDEO_"'));
$theight = ceil($width * 9 / 16);
if($height >= $theight) {
$theight = ceil($width * 10 / 16);
}
$ret = system('mplayer -vf expand=-1:'.$theight.' "'.$moviefile.'"');
if(false === $ret) {
exit;
}
if(preg_match('/\(Á¾·á\)/u', $ret)) {
exit;
}
$moviefile = preg_replace_callback('/(\d+)([^\d]+)$/', 'inc_callback', $moviefile);
if(!file_exists($moviefile)) {
exit;
}
}
function size_callback($matches)
{
global $width, $height;
if($matches[1] == 'WIDTH') {
$width = $matches[2];
} else {
$height = $matches[2];
}
}
function inc_callback($matches)
{
return sprintf('%0'.strlen($matches[1]).'d', $matches[1] + 1).$matches[2];
}
?>
|
A gift of flower will soon be made to you. |








