如何用PHP简单方法抓取视频缩略图?
- 内容介绍
- 文章标签
- 相关推荐
本文共计87个文字,预计阅读时间需要1分钟。
phpfunction convertToFlv($input, $output) { echo Converting $input to $output...\n; $command=ffmpeg -v 0 -y -i $input -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect;}
<?php convertToFlv( "some-video-input.avi", "output.jpg" ); function convertToFlv( $input, $output ) { echo "Converting $input to $output<br />"; $command = "ffmpeg -v 0 -y -i $input -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect 16:9 $output "; echo "$command<br />"; shell_exec( $command ); echo "Converted<br />"; } ?>
本文共计87个文字,预计阅读时间需要1分钟。
phpfunction convertToFlv($input, $output) { echo Converting $input to $output...\n; $command=ffmpeg -v 0 -y -i $input -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect;}
<?php convertToFlv( "some-video-input.avi", "output.jpg" ); function convertToFlv( $input, $output ) { echo "Converting $input to $output<br />"; $command = "ffmpeg -v 0 -y -i $input -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect 16:9 $output "; echo "$command<br />"; shell_exec( $command ); echo "Converted<br />"; } ?>

