VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Hi,

    I've been using following command to get a thumbnail out of video (and merge it together with mask file to get a transparency):

    Code:
    -ss 00:10:00 -i "myVideo" -i "maskPicture" -filter_complex scale=256x144, alphamerge -f image2 -pix_fmt rgba -vframes 1 -y "myThumb"
    as you can see the final thumb should be 256x144 (my mask file has also dimentions of 256x144) and it is working.

    My question is if it is possible to make a thumb "aspect-ratio aware" - at the moment all 16:9 videos work fine but if input video is 4:3 the picture gets wider to fit 256x144 aspect ratio. Is it possible to keep original video's ascpect in thumbnail ( by adding black borders to fill the sides) ?
    Quote Quote  
  2. Is it possible to keep original video's ascpect in thumbnail ( by adding black borders to fill the sides) ?
    Sure, 'just' you need to resize and calculate the appropriate padding and then pad the video, see: http://superuser.com/a/547406 for an example on how to do the filtering.
    Quote Quote  
  3. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Thanks, that really is a "just"
    Quote Quote  
  4. Yup, ffmpeg can do a lot of stuff through it's normal filter options and even more if you use the filter_complex options if you 'just' know how to.
    -> it's basically a lot of searching, reading the documentation and testing at the beginning.
    Quote Quote