I'm trying to invoke the following command:
ffmpeg -y -i 1.png -vf "thumbnail=300,scale='min(300,iw)':-1" -frames:v 1 o.png
Input file:
Output file:
Is it possible to fix it?
Remove the thumbnail filter. It does not preserve transparency and it does nothing in your command as it is intended to be used with a video input and not a single image input:
thumbnail
Select the most representative frame in a given sequence of consecutive frames.
ffmpeg -y -i 1.png -vf "scale='min(300,iw)':-1" -frames:v 1 o.png
You can view the source code of libavfilter/vf_thumbnail.c
to see supported pixel formats:
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
AV_PIX_FMT_NONE
};
None of these support transparency (it would contain A
in the pixel format name that does support transparency/alpha).