[FFmpeg-user] ffmpeg problem with creating thumbnail

Dragan forumwt at gmail.com
Sun May 19 17:09:40 CEST 2013


I have a tube site and im using this function to generate thumbs from video
file

$thumbwidth = 240; //thumb width
$thumbheight = 180; //thumb height

$imagick_command = "-modulate 110,102,100 -sharpen 1x1 -enhance";

shell_exec("$ffmpeg_path -ss $first -i \"".$row[file]."\" -vcodec mjpeg
-vframes 1 -an -f rawvideo -s ".$thumbwidth."x".$thumbheight." \"$image\"");

shell_exec("/usr/local/bin/mogrify $imagick_command $image"); 


Here is thumbs result, this image is just what i need, no border and etc..

<http://ffmpeg-users.933282.n4.nabble.com/file/n4659218/Fm6gV.png> 

but sometimes *depending on video size* i have thumbs like this

<http://ffmpeg-users.933282.n4.nabble.com/file/n4659218/QRTOl.png> 

Whats the best way to remove this *black space* from thumbs, but need to
keep thumb size 240x180



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/ffmpeg-problem-with-creating-thumbnail-tp4659218.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list