image-story-assembly-hardening 是做什么的?
Use when assembling a long (≥5 min / ≥40 shots) image-story or slideshow video with ffmpeg — push-in (Ken Burns / zoompan) motion, crossfades, burned-in or layered subtitles, and pre-delivery QC. Covers the four failure modes that only show up at this scale (multi-branch filtergraph OOM/throttle, crossfade subtitle ghosting, zoompan jitter, generation artifacts like scan-lines and baked watermarks) plus the quantitative criteria to catch them. 触发词:图片联播、静态图叙事、长片装配、推镜卡顿、转场字幕叠影、去水印、扫描线伪影、成片 QA.
| Failure Mode | Symptom | Quantitative Criteria | Mitigation Strategy |
|---|---|---|---|
| Multi-branch filtergraph OOM/throttle | ffmpeg crashes with "Cannot allocate memory" or excessive frame drops | Memory usage > 80% of available RAM; frame drops > 5% of total frames | Split into smaller chunks (e.g., ≤20 shots per pass); use hardware acceleration (hwupload_cuda); reduce concurrent filter branches |
| Crossfade subtitle ghosting | Subtitles remain visible during crossfade transition, creating overlapping text | Visual inspection: subtitle text appears for > 1 frame after transition start; subtitle opacity > 0.5 during crossfade | Apply setpts=PTS-STARTPTS before overlay; use fade filter on subtitle stream; or render subtitles as separate video stream and crossfade after overlay |
| Zoompan jitter | Ken Burns pan/zoom motion appears jerky or stuttering | Frame-to-frame displacement > 2 pixels for smooth motion; inconsistent zoom rate (per-frame scale factor varies > 5%) | Use zoompan with d (duration) parameter set to shot length; apply fps=30 filter; use scale before zoompan for high-res images |
| Generation artifacts (scan-lines, baked watermarks) | Horizontal scan-lines or persistent watermark remnants in output | Artifact visibility at 1:1 pixel ratio; peak signal-to-noise ratio (PSNR) < 30 dB compared to source | Use zscale or sws_flags=lanczos for high-quality scaling; apply unsharp filter (5:5:0.8:3:3:0.4) to reduce scan-lines; mask or inpaint watermarks before assembly |