· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
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 ÀÇ ¼Ò°³ Àοë)

ÀÚ¸· À§Ä¡ Á¶Á¤

#!/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"
  • 16:9 ºñÀ²·Î ¸ÂÃß¾úÀ¸¹Ç·Î 16:10 ¿¡¼­ ³Ê¹« ¹Ù´Ú¿¡ ºÙÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. - ¼ÛÈ¿Áø

#!/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];
}

?>
  • php ·Î ®½À´Ï´Ù. ¿ø·¡ 16:9 ÀÎ °æ¿ì È­¸éÀ» 16:10 À¸·Î ÇØ¼­ ÀÚ¸·À» Á¶±Ý ¹ÛÀ¸·Î »©³À´Ï´Ù. Á¤»óÁ¾·áÀΰæ¿ì¸¸ ´ÙÀ½ ÆÄÀÏÀ» Àç»ýÇÕ´Ï´Ù.






sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2007-12-21 03:13:15
Processing time 0.0382 sec