I am new to php. I have installed ffmpeg in my local iis.. Is it possible to generate a thumbnail image for a flv file.? Please help..
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
There is no need to specify a time of 1. The ffmpeg api provides a format of image2 and the ability to pass -vframes 1.
Following script ic created using PHP FFMPEG Library . You can grab the video information and thumbnail using the given functions
Function
will create number of thumbnails in folder specified in the function . You can alter the code according to your requirement . This works if you installed ffmpeg and php ffmpeg library .
Refer this link http://tecserver.blogspot.in/2009/07/ffmpeg-video-conversion-tool.html
Try this
An explanation of the command options:
-i filename (the source video's file path)
-deinterlace (converts interlaced video to non-interlaced form)
-an (audio recording is disabled; we don't need it for thumbnails)
-ss position (input video is decoded and dumped until the timestamp reaches position, our thumbnail's position in seconds)
-f output file format
-t duration (the output file stops writing after duration seconds)
-r fps (sets the frame rate to write at; fps is expressed in Hertz (1/seconds); we use 1 so that we grab only one frame)
-y (overwrites the output file if it already exists)
-s widthxheight (size of the frame in pixels)
Yes. You can run ffmpeg from PHP using the right parameters.
Using ffmpeg-php, you can use $movie->getFrame() to obtain a frame, and $frame->toGDImage() to get a GD image.