FFMS / ffms2

An FFmpeg based source library and Avisynth/VapourSynth plugin for easy frame accurate access
Other
574 stars 104 forks source link

A/V desync for certain mkv file after 4783c02 #350

Closed wangqr closed 9 months ago

wangqr commented 4 years ago

For certain MKV files, the audio and video are not synchronized. This happens in 2.31.0 but not in 2.23.1. Git bisect shows that 4783c0260929a05334c81643f2232cff1e8bd4ca is the first bad commit.

This table shows the track length in Aegisub after loading the file:

Load MKV with FFMS2 Remux to MKV[1] then load with FFMS2 Remux to MP4[2] then load with FFMS2 Reencode to MKV[3] then load with FFMS2
68895b7186556b5fea0f32b5b64645cb1b13de3f 1:10:38 1:10:38 1:10:38 1:10:38
4783c0260929a05334c81643f2232cff1e8bd4ca Video: 1:10:38 Audio: 1:10:40 Video: 1:10:38 Audio: 1:10:40 1:10:38 1:10:38

[1] ffmpeg -i test.mkv -c copy exp.mkv [2] ffmpeg -i test.mkv -c copy exp.mp4 [3] ffmpeg -i test.mkv exp.mkv

The file can be played with MPC-HC 1.7.13 (e37826845) without issue. The version of ffmpeg used to remux/reencode and linked to ffms2 is 4.2.1-win64-shared downloaded from https://ffmpeg.zeranoe.com/builds/

Original issue: https://github.com/wangqr/Aegisub/issues/22 I'm not able to provide the test video, but you can find the MediaInfo of that mkv in the original issue linked above. I can do other tests if needed.

dwbuiten commented 4 years ago

This particular issue looks pretty hard to debug without a test file. Is it possible to cut even a small chunk?

wangqr commented 4 years ago

Although the clip is short, it is still possible to feel the discrepancy of lip and voice at 1:37 video time.

wangqr commented 4 years ago

clip.zip

Ristellise commented 3 years ago

Any Updates/Fixes for this specific issue?

vxzms commented 2 years ago

I think new option FillGaps also fix the problem, I try FFMS3000 test1, it’s look fine in Aegisub.

myrsloik commented 9 months ago

Possibly fixed