fix(copy): --overwrite 现在真的生效 —— 已是 HEVC hvc1 但音轨非 AAC 时重封音轨而不是 SKIP
--overwrite 从加进 argparse 起就没被读过(只在 help 里)。控制面换了规则之后需要一个 「视频没问题、这条仍要跑」的开关:kind="audio" 的行(hevc + ac3/mp3/pcm)在 copy 挡位 只能被 SKIP,结果是控制面把行标成 done 而音轨一条没动。 audio_only_remux = args.overwrite and acodec not in (aac, mp4a, "") → 不吃 already_hevc 的 SKIP,走正常 copy 流程;实测输出 video md5 与源逐位相同、audio 转成 aac。
This commit is contained in:
1 parent
64a80d2234
commit
6950f75d26
1 file changed
+12
-1
+12
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user