Reputation: 319
My ffmpeg command in php is
echo $cmd_thumbnail_create = ("\"$ffmpeg\" -i \"" . $dir.$videopath . "\" -an -ss $getFromSecond \"" . $dir.$thumbnailpath ."\"");
exec($cmd_thumbnail_create);
Output of which is
"C:\FFMPEG\bin\ffmpeg" -i "C:/xampp/htdocs/final/uploaded_videos/intro_en.mp4" -an -ss 6 "C:/xampp/htdocs/final/thumbnail/intro_en.jpg"
This when copied and executed on the command prompt creates the thumbnail at proper location with proper name.
Any suggestions?
Upvotes: 0
Views: 830
Reputation: 90
This worked for me...
first.... locate your path to FFMPEG
mine is
$ffmpeg = "H:\\SERVr\\htdocs\\ffmpeg\\bin\\ffmpeg";
Then.. in your shell_exec...
shell_exec("$ffmpeg -i your-input.jpg -an -ss 30 -s 120x100 your-output.jpg 2>&1");
-i is your input file.
-ss is video time you want the clip pulled from.
-s is the size of the thumbnail you want
This works on my Windows machine with XAMPP, and works perfectly.
Upvotes: 2