Skip to content

Fix Scale 720p/1080p presets distorting portrait and non-16:9 videos - #831

Open
MyrQv0x wants to merge 1 commit into
Tichau:integrationfrom
MyrQv0x:fix/829-scale-preset-aspect-ratio
Open

MyrQv0x wants to merge 1 commit into
Tichau:integrationfrom
MyrQv0x:fix/829-scale-preset-aspect-ratio

Conversation

@MyrQv0x

@MyrQv0x MyrQv0x commented Nov 23, 2026

Copy link
Copy Markdown

Summary

The default Scale 720p and Scale 1080p presets used a fixed output size (scale=1920:1080 and scale=1280:720). Any video that was not 16:9 was stretched or squeezed into a 16:9 frame. This change keeps the source aspect ratio and scales the short side to 720 or 1080 pixels. Fixes #829.

Key Changes

  • Application/FileConverter/Settings.default.xml: all 10 Scale 720p/* and Scale 1080p/* presets (Mkv, Mp4, Webm, Ogv, Avi) now use
    scale='if(gt(iw,ih),-2,N)':'if(gt(iw,ih),N,-2)':flags=lanczos,format=yuv420p, with N set to 720 or 1080.
    • Landscape: height becomes N and the width follows the aspect ratio.
    • Portrait: width becomes N and the height follows the aspect ratio.
    • -2 keeps the computed side even, which yuv420p requires.
    • flags=lanczos gives sharper scaling than the default bicubic.
  • CHANGELOG.md: added a Fixes: entry under Version 2.2.
  • Existing users get the new presets automatically, because presets marked IsDefaultSettings are replaced from Settings.default.xml on startup (SettingsService.cs).
  • The Scale 75% and Scale 25% presets are not touched.

Verification Evidence

  • Reproduced with the bundled ffmpeg: the old filter turns a 464x848 clip into 1920x1080 (display aspect ratio 29:53) and a 640x480 clip into a stretched 1920x1080.

  • Ran all 10 changed presets with the same argument layout the app builds (-n -progress pipe:1 -i <in> <custom command> <out>) on a 464x848 clip with audio. All exited 0. Results: 720p presets give 720x1316, 1080p presets give 1080x1974, audio kept.

  • Output sizes with the new filter and the libx264 encoder:

    Source 1080 720
    464x848 1080x1974 720x1316
    640x480 1440x1080 960x720
    1080x1080 1080x1080 720x720
    2560x1080 2560x1080 1706x720
    1920x1080 1920x1080 1280x720
  • The settings file still parses as valid XML. I did not run the WPF application itself, and the repo has no automated tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scale 720p / 1080p presets stretch portrait and non-16:9 videos

1 participant