FFmpeg: Difference between revisions
| Line 115: | Line 115: | ||
;Resizing with transparent padding | ;Resizing with transparent padding | ||
Useful for generating logos | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
ffmpeg -i icon.svg -vf "scale=h=128:w=128:force_original_aspect_ratio=decrease,pad=128:128:(ow-iw)/2:(oh-ih)/2:color=0x00000000" -y icon.png | ffmpeg -i icon.svg -vf "scale=h=128:w=128:force_original_aspect_ratio=decrease,pad=128:128:(ow-iw)/2:(oh-ih)/2:color=0x00000000" -y icon.png | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{hidden | More sizes | | |||
;256 | |||
<syntaxhighlight lang="bash"> | |||
ffmpeg -i icon.svg -vf "scale=h=256:w=256:force_original_aspect_ratio=decrease,pad=256:256:(ow-iw)/2:(oh-ih)/2:color=0x00000000" -y icon.png | |||
</syntaxhighlight> | |||
;512 | |||
<syntaxhighlight lang="bash"> | |||
ffmpeg -i icon.svg -vf "scale=h=512:w=512:force_original_aspect_ratio=decrease,pad=512:512:(ow-iw)/2:(oh-ih)/2:color=0x00000000" -y icon.png | |||
</syntaxhighlight> | |||
}} | |||
==C API== | ==C API== | ||