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

FFmpeg

73 readers
3 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.

top 1 comments
sorted by: hot top controversial new old
[–] Zachariah 4 points 2 months ago

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