Fixing A/V Sync Drift When Joining Vertical MP4 Episodes with FFmpeg
Concatenating two AI-generated vertical episodes with FFmpeg's concat demuxer and stream copy caused dialogue to run about 100 ms ahead of the video at the splice point. The author's team found that each source clip's audio stream ended slightly earlier than its video stream, with offsets of -33.67 ms and -83.33 ms. Because the demuxer appends packets without aligning the shorter audio track, the drift compounds across the boundary. The suggested fix is to route both streams through the concat filter, which pads shorter streams and also normalizes the clips to 1080x1920 at 9:16 for vertical platforms, at the cost of re-encoding that runs roughly 3.5 to 4 times real time. The article notes this will not repair clips whose audio was already desynced before joining.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in