diff --git a/scripts/library_run.py b/scripts/library_run.py index 05f54fb..7ea9f80 100644 --- a/scripts/library_run.py +++ b/scripts/library_run.py @@ -1295,8 +1295,19 @@ def process(src, args, dest=None, origin=None): live = dest or dst_path_for(src, container) redo_playable = False # True once we know this run is re-doing a file that ALREADY plays + # A row the control plane queued as `kind="audio"`: the VIDEO is already what we ship, only the + # audio track is not AAC. The product promise is HEVC(hvc1) + AAC, so that row has real work to + # do - and the copy tier's answer ("SKIP already HEVC hvc1") is exactly wrong for it. `--overwrite` + # is how the control plane says "the video is fine but this file still needs the run"; without it + # 3 rows were filed as `done` with their AC3/MP3/PCM tracks untouched (measured 2026-10-28 on + # Z:\Temporary\短视频\_io-test, docs of hevc-transcode §10.149). + audio_only_remux = bool(getattr(args, "overwrite", False)) \ + and (info.get("acodec") or "") not in ("aac", "mp4a", "") + if audio_only_remux: + log(" audio-only run: video is %s %s, audio is %s -> re-muxing the audio to AAC" + % (info["vcodec"], info["tag"], info["acodec"])) if already_hevc(src, info, container) and info["pix"] in ("yuv420p",) \ - and not T.unusable_timeline(info, src)[0]: + and not T.unusable_timeline(info, src)[0] and not audio_only_remux: # Already converted. Only worth touching if the ORIGINAL is available and the current # file is BIGGER than it: that is precisely the old settings' damage (a fixed cq27 above # the source's own quality plus a fixed 256k audio). A file that is already smaller than