update archive thumbnail

This commit is contained in:
jaehwang committed 2026-09-09 09:51:50 +09:00
1 parent ca9e40f43d
commit 3555fa05a2
6 files changed
+27 -5

No files matched your search

+6 -1
View File
@@ -36,6 +36,7 @@ SCROLL_SCREENS_PER_SECOND = 0.35
PROOF_COUNT = 8 # 완성본 전체에서 고르게 뽑는 시점 수
PROOF_SIZE = (180, 320)
PROOF_GAP = 10
THUMBNAIL_QUALITY = 90
BAND_HEIGHT = 300
BAND_RISE_SECONDS = 0.6
@@ -278,15 +279,19 @@ def compose_longcut(poster: bytes | Path | Image.Image, clip: bytes,
# 훅 구간만 보면 뒤쪽 스크롤과 엔드밴드를 검수할 수 없어 전체에서 고르게 뽑는다
proof_at = {round(step * total_frames / PROOF_COUNT) for step in range(PROOF_COUNT)}
tiles: list[Image.Image] = []
thumbnail = io.BytesIO()
def frames() -> Iterator[Image.Image]:
for index, frame in enumerate(
compose_frames(timeline, plan, source, clip, images, info, qr)):
if index == 0:
frame.save(thumbnail, "JPEG", quality=THUMBNAIL_QUALITY)
if preview and index in proof_at:
tiles.append(frame.resize(PROOF_SIZE))
yield frame
video = encode_mp4(frames(), (W, H), mix_audio(narration_mp3, bgm_mp3, timeline.total),
fps=FPS)
return LongcutResult(video=video, duration=timeline.total, frames=total_frames,
return LongcutResult(video=video, thumbnail=thumbnail.getvalue(),
duration=timeline.total, frames=total_frames,
plan=plan, proof=proof_sheet(tiles) if tiles else None)