PHP simple way to get video preview

伊谢尔伦
Release: 2023-03-02 15:38:01
Original
1919 people have browsed it

<?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 />";
}
?>
Copy after login


Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template