'pregress'에 해당되는 글 1건

 
  1. 2009.06.25 php ffmpeg command example on windows
2009. 6. 25. 19:02 PROGRAMMING
php ffmpeg command example on windows
생성된 flv에 메타태그가 없으면 클라이언트가 100%다운로드하기전까진 트래킹이 안됩니다.
(flvtool2 사용하여 추가할 수 있습니다.)

제가 사용하는 ffmpeg는 preset이 전체경로로만 가져올 수 있게되어있습니다.
(제 빌드는 tripp의 버전입니다. http://tripp.arrozcru.org)

동영상 가운데 5부분으로 썸네일 만들기
for($i=1;$i<6;$i++){
 $sec=round($duration/6*$i);
 exec("ffmpeg -itsoffset -".$sec." -i ".$filename." -an -r 1 -vframes 1 -s 120x100 -y ".$directory."thumb".$i.".png");
 $sec=$sec-2;
 $strParam.="&Thumb".$i."=".$thumburl."thumb".$i.".png&Time".$i."=".$sec;
 fwrite($fp,"thumb".$i."=".$sec."\n");
}

동영상 컨버팅하면서 텍스트파일로 진행상황 내보내기
ob_start();
passthru("ffmpeg -y -i ".$filename." -vcodec libx264 -vpre ".$directory."kaudo_libx264 -ar 44100 -ab 96k -b ".$_REQUEST['bitrate']." -f flv ".$output." 2>".$progress." | flvtool2 -U ".$output);
@unlink($filename);
ob_end_clean();

최근에 올라온 글

최근에 달린 댓글