最终合成前先进行超分辨率放大
将通过审核的片段放大 2 倍,然后按交付尺寸进行裁剪、剪辑和添加字幕。
本指南以英语编写,供智能体使用。
This is the finishing order for any production delivered above the native video resolution, for example a
1080 × 1920 portrait short made from 768p segments. Generate and approve the story footage first,
upscale the accepted footage, normalize the delivery canvas, and only then compose final captions and
graphic text. API details are in https://aividart.com/docs/api.md (section 5.7).
What the upscaler does
- One upscaler, one factor:
2x. Width and height are multiplied exactly; there is no free target size. A 768p source becomes 1536 on its short side, a 544p source 1088. - Audio, frame count and frame rate are kept. Do not interpolate 24 fps to 30/60 fps.
- It upscales a finished video job of at most 16 seconds, by its job id, on whichever GPU is rented. The source job (and its video) is deleted after 2 days, so upscale accepted takes within that time.
- Rough cost: a 15 s 768p clip takes about 44 s; a 15 s 544p clip about 27 s.
Required processing order
- Generate the segments, select the accepted takes and review their actual speech and continuity.
- Upscale each accepted 5–15 second segment before burning any captions. Reuse an existing completed upscale of that exact take rather than submitting it twice. Store the source job ID, upscale job ID, factor, seed and local paths in the production ledger.
- Normalize the upscaled picture to the delivery size with a high-quality downsample. Review any crop.
- Assemble the opening and story segments, preserve the reviewed edit timing and mix narration/music.
- Render captions and any new title/graphic overlays at the final resolution. Recalculate font sizes, outlines and safe zones for this canvas rather than stretching a 768-pixel subtitle layer.
- Check the full film, final frame count, subtitle timing, sound, text and technical metadata before release.
Upscale per segment, never the assembled film: the source is limited to one finished job, and per-segment work keeps each request short. Never upscale a film with burned captions when clean accepted segments exist.
Keep accepted local reframes and corrections. If an accepted file contains a local reframe that is not in the
source job, preserve that correction in the upscaled edit with appropriately scaled crop coordinates; do not
silently substitute the uncorrected original. For an opening with an embedded title, check every letter after
upscaling, and prefer compositing crisp title artwork after canvas normalization when possible. Keep the
original high-resolution cover.png for the separate thumbnail upload.
Sizes for a portrait short
| Stage | Dimensions |
|---|---|
| Source at 768p, 9:16 request | 768 × 1344 (4:7, close to 9:16) |
| Native 2x result | 1536 × 2688 |
| Exact 9:16 center crop | 1512 × 2688 (12 pixels removed from each side) |
| Final downsample and composition canvas | 1080 × 1920 |
The final export size is set in post-processing; the upscale itself always runs at its native factor. Do not shrink the low-resolution input first merely to make the 2x output equal 1080 pixels: that discards source detail before enhancement.
If the small center crop would remove important action, use a reviewed reframe or an aspect-preserving fit/pad instead. Do not stretch 4:7 footage into 9:16. A fit of this example is 1080 × 1890 with 15 pixels of padding above and below; choose a suitable background rather than assuming black bars are desirable.
Requests and local finishing example
Submit the upscale of an accepted video job, then poll the returned job and download its outputs.video.
Record the ID immediately; after an ambiguous POST result, list recent jobs before retrying.
POST /api/jobs
{"kind":"video","mode":"upscale","params":{"source_job_id":"<accepted segment's job id>","factor":"2x"},"inputs":{}}
If the API answers that the video was not found, the source job is older than the 2-day retention; the take has to be generated again before it can be upscaled.
For an existing 1536 × 2688 intermediate, the exact crop/downsample is:
ffmpeg -i accepted.SR-2x.mp4 \
-map 0:v:0 -map '0:a?' \
-vf 'crop=1512:2688:12:0,scale=1080:1920:flags=lanczos,setsar=1' \
-c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p \
-c:a copy -movflags +faststart accepted.1080p.clean.mp4
This produces a clean normalized picture, not the captioned final film. Adapt the crop for other source dimensions. Preserve the accepted frame-based trims and reviewed transcription timing when assembling: upscaling and spatial resizing alone must not shift the speech/caption timeline. Render word captions at the final size after the resize. Export the publication copy as MP4/H.264 with AAC audio, then inspect the beginning, ending, joins and text before publishing.
Keep the native source, the upscaled intermediate and the final delivery as separate local files (the service deletes its copies after 2 days). Record the final file's actual width, height, duration and the upscale job IDs in the publishing manifest.