GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   ffmpeg problem with creating thumbnail (https://gfy.com/showthread.php?t=1109909)

arena18 05-19-2013 03:42 PM

ffmpeg problem with creating thumbnail
 
I have a tube site and im using this function to generate thumbs from video file


Code:

ffmpeg -ss 255 -i test.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 240x180 test.jpg

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

i.imgur.com/ePpVA8E.png

but sometimes depending on video size i have thumbs like this

i.imgur.com/VTTESDf.png

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

Tent Pitcher 05-19-2013 09:18 PM

You will need to crop the frame/image to a multiple of your thumbnail before you resize it. The problem is that your thumbnail is a different aspect ratio than the source image. Try cropping it to 1200x900 or whatever the closest ratio to your source is.

Code:

-vf crop=width:height:x:y

arena18 05-20-2013 05:24 AM

Yes im try something like this, but problems is because i dont know what video resolution user will upload 4:3 or 16:9, so any trick to detect black area and remove it automaticly, than with imagic i can resize and enhance image?

P.S good example i think you can see on hardsextube, black areas is removed

dappz-datton 05-20-2013 06:09 AM

you need to asking your server support... to fixed that issue on ffmpeg

arena18 05-20-2013 06:29 AM

I'm not sure is server fault

CPA-Rush 05-27-2013 03:27 PM

u have ffmpeg installed on your cp?

arena18 05-27-2013 03:29 PM

Sure that i have it, latest version...!

CPA-Rush 05-27-2013 05:00 PM

nice :thumbsup


All times are GMT -7. The time now is 03:10 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc