<?php
$filename = $_SERVER[argv][1]; //cli실행으로 php test.avi 첫번째 인자를 파일명을 받게함 ,편집요망~
$movie = new ffmpeg_movie($filename, false); //ffmpeg모듈이 정상적으로 설치돼야합니다
if (is_object($movie) === false) {
die("movie Error");
}
$duration = floor($movie->getDuration()); //플레이타임 추출
if ($duration == 0) {
die("duration Error");
}
$codec['video'] = $movie->getVideoCodec(); //비디오코덱추출
$codec['audio'] = $movie->getAudioCodec(); //오디오코덱추출
$codec['channel'] = $movie->getAudioChannels(); //채널 추출
if ($codec['video'] == "") {
die("video Error");
}
$rand = mt_rand(0, 10); //이부분은 프레임중 랜덤하게 추출하는것이라 구간을 작게잡아야 빠릅니다
$frame = $movie->getFrame($rand);
if (is_object($frame) === false) {
die("frame Error");
}
$codec['height'] = $frame->getHeight();
$codec['width'] = $frame->getWidth();
?>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4056 | |
| 29 |
아우겐나이스
|
21년 전 | 4445 | |
| 28 |
아우겐나이스
|
21년 전 | 3467 | |
| 27 | 21년 전 | 5841 | ||
| 26 | 21년 전 | 3123 | ||
| 25 | 21년 전 | 6090 | ||
| 24 | 18년 전 | 3653 | ||
| 23 | 21년 전 | 3643 | ||
| 22 | 21년 전 | 4250 | ||
| 21 | 21년 전 | 3821 | ||
| 20 | 21년 전 | 4232 | ||
| 19 | 21년 전 | 6685 | ||
| 18 | 21년 전 | 4736 | ||
| 17 | 21년 전 | 6998 | ||
| 16 | 21년 전 | 4177 | ||
| 15 | 21년 전 | 2641 | ||
| 14 | 21년 전 | 4981 | ||
| 13 | 21년 전 | 3406 | ||
| 12 |
Recluse
|
21년 전 | 3891 | |
| 11 |
아우겐나이스
|
21년 전 | 3575 | |
| 10 |
Recluse
|
21년 전 | 3401 | |
| 9 | 21년 전 | 4008 | ||
| 8 | 21년 전 | 5181 | ||
| 7 | 21년 전 | 4771 | ||
| 6 | 21년 전 | 5697 | ||
| 5 | 21년 전 | 4124 | ||
| 4 | 21년 전 | 4855 | ||
| 3 | 21년 전 | 4747 | ||
| 2 | 21년 전 | 3250 | ||
| 1 | 22년 전 | 4345 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기