Log in

View Full Version : Matroska mkvmerge a/v sync problem for some RM files


karl_lillevold
26th November 2004, 20:04
I discovered a problem in mkvmerge 1.0, which has probably also existed in all previous versions.

Occasionally, the first audio packet in an RM file will have a timecode larger than zero, in three files I have found so far it was from 600 to 750 ms. This can be found with 'rmeditor -i input.rmvb -d dump.log', and then check the timecode for the first audio packet. Example:

Media Stream 1
packet 0: stream 1 timestamp 750 size:1118 keyframe

I am not sure what triggers an RM file to be created like this, but I will find out. It is relatively rare, maybe 5% or so :eek:

For these files, the resulting Matroska file will have audio out of sync (audio in mkv file will start at 0). If you have any such files, you can correct the problem by remuxing with audio delayed the right amount (mkvmerge/mmg option). If you have the original RM file, find this delay with rmeditor. Otherwise, you can for instance use the audio delay feature in MPC and experiment until you find the right value.

I have communicated this problem to Mosu, and he has already fixed it! The fix should be included in the next mkvtoolnix release.