Back to catalog

xushilianzhuren /

xushilianzhuren/dsh-av-sync-gate

Verified

声画同步闸:解说视频的画面对音轨漂移终结核——输入各段配音实测时长,输出逐段帧计划(段长=配音+0.25秒呼吸位·基址/帧数/跨度),另带帧号空洞检测(ffmpeg遇缺号即停·成片腰斩的头号元凶);拼接视频前过闸,话没说完图先跳这种病出厂前死掉。

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
READMESource: main@405cdca2

dsh-av-sync-gate

Audio-visual sync gate for narrated slideshow videos. The #1 failure mode: picture cuts while the voice is still talking, and it drifts worse every segment. Root cause: visual segments ignore the tail silence between voice clips. This gate computes the exact frame plan so picture and audio stay locked, end to end.

The formula

segment_seconds = voiceover_seconds + 0.25   (breath gap, configurable)
frames          = ceil(segment_seconds × fps)

Frame-hole detector

ffmpeg stops encoding at the first missing frame number — a single hole cuts your video in half. act=check compares expected vs actual frame count and tells you to renumber sequentially before muxing.

Use

dsh plugin add github:<owner>/dsh-av-sync-gate
curl "http://127.0.0.1:<port>/av-sync/api?act=plan&durs=4.7,7.2,8.3&fps=30"
curl "http://127.0.0.1:<port>/av-sync/api?act=check&count=1611&expected=1615"
—/ 5

No ratings yet

Community comments

No comments yet. Be the first to write one.