this post was submitted on 28 Sep 2024
7 points (100.0% liked)

FFmpeg

71 readers
2 users here now

A community to discuss the multimedia framework FFmpeg

founded 1 year ago
MODERATORS
 

Resizing then padding a centered video, maintaining aspect ratio, to a final 720 x 1280, with the same top an bottom colors, say darkgray, is below, which I think I got from Stack Overflow or somewhere (it works).

  • scale=720:1280:flags=spline:force_original_aspect_ratio=decrease:eval=frame,pad=720:1280:-1:-1:eval=frame:color=darkgray

But I would like to have different colors for top and bottom paddings. See the example pic below, which I want. Thanks in advance.

you are viewing a single comment's thread
view the rest of the comments
[–] Zachariah 4 points 1 month ago

If there isn’t a straightforward way, maybe add one bar on one pass and the other on another pass.