Skip to content

Add Final Resize Width setting#69

Open
huyparody wants to merge 1 commit into
the-database:mainfrom
huyparody:resize-width
Open

Add Final Resize Width setting#69
huyparody wants to merge 1 commit into
the-database:mainfrom
huyparody:resize-width

Conversation

@huyparody

Copy link
Copy Markdown

What changed

Adds a Final Resize Width field above Final Resize Height, passing
--final-resize-width to aji_encode:

  • width + height both set → the video is resized to exactly that
    resolution. Restores the correct 16:9 display aspect for anamorphic
    sources such as DVDs — e.g. a 720x480 source upscaled 2x becomes
    1440x960 (3:2), and setting 1708x960 produces proper 16:9 output.
  • one alone → the other dimension is derived to keep the aspect
    ratio (width-only mirrors the existing height-only behavior).
  • Final Resize Factor is disabled while either width or height is set.

New strings added to Resources.resx / Resources.ja-JP.resx /
Resources.Designer.cs.

Depends on

the-database/animejanai-inference#8 - the GUI passes
--final-resize-width, which aji_encode only understands with that patch.
That PR needs to be merged and released as a new aji version, then
AjiVersion in BuildVideoJaNai/Program.cs bumped to it, before this PR
is merged; otherwise the flag is rejected as an unknown arg on aji v0.6.0.

Tested

Built locally and run against the patched engine (Windows, TensorRT,
hevc_nvenc). DVD source 720x480 (DAR 16:9):

  • Final Resize Width 1708 + Final Resize Height 960 → output 1708x960 ✅
  • Final Resize Height 720 only → 1080x720, aspect preserved (no regression) ✅

Passes --final-resize-width to aji_encode. Width and height combine
(both set = exact output resolution, for anamorphic sources; one alone
keeps aspect); Final Resize Factor stays disabled while either is set.
Requires aji with --final-resize-width support.
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.

1 participant