[GH-ISSUE #229] How to scale during export as video using FFmpeg? #190

Closed
opened 2026-02-26 09:30:29 +03:00 by kerem · 3 comments
Owner

Originally created by @slava-uxd on GitHub (Jan 4, 2018).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/229

It seems like you have created a possibility to pass parameters to FFmpeg while exporting as video. But I cant set them up properly to add scale.

We start out with:

-c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black"

I've tried to add scale=560:356 in random places, but none these attempts didn't work.

-c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black scale=560:356"
-c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black;scale=560:356"
-c:v libx264 -pix_fmt yuv420p -vf "pad=width=560:height=356:x=0:y=0:color=black"

You have no UI for this or docs on your website, and to get the docs on FFmpeg.org look like I need PhD in video editing. So could you help?

Thanks in advance.

Originally created by @slava-uxd on GitHub (Jan 4, 2018). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/229 It seems like you have created a possibility to pass parameters to FFmpeg while exporting as video. But I cant set them up properly to add `scale`. We start out with: -c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black" I've tried to add `scale=560:356` in random places, but none these attempts didn't work. -c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black scale=560:356" -c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black;scale=560:356" -c:v libx264 -pix_fmt yuv420p -vf "pad=width=560:height=356:x=0:y=0:color=black" You have no UI for this or docs on your website, and to get the docs on FFmpeg.org look like I need PhD in video editing. So could you help? Thanks in advance.
kerem closed this issue 2026-02-26 09:30:29 +03:00
Author
Owner

@slava-uxd commented on GitHub (Jan 4, 2018):

Found it.

-c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black,scale=560:356"
<!-- gh-comment-id:355368324 --> @slava-uxd commented on GitHub (Jan 4, 2018): Found it. -c:v libx264 -pix_fmt yuv420p -vf "pad=width={W}:height={H}:x=0:y=0:color=black,scale=560:356"
Author
Owner

@NickeManarin commented on GitHub (Jan 4, 2018):

Awesome. Yeah, understanding FFmpeg docs is nearly impossible. 😁

<!-- gh-comment-id:355369836 --> @NickeManarin commented on GitHub (Jan 4, 2018): Awesome. Yeah, understanding FFmpeg docs is nearly impossible. 😁
Author
Owner

@imeltemi commented on GitHub (Dec 25, 2019):

-c:v h264_nvenc -pixel_format yuv420p -preset default
have a try,its faster!

<!-- gh-comment-id:568816751 --> @imeltemi commented on GitHub (Dec 25, 2019): `-c:v h264_nvenc -pixel_format yuv420p -preset default` have a try,its faster!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#190
No description provided.