gacopl/dvmkv2mp4

Sound delay in MKV is not transfered into MP4

Closed this issue · 5 comments

Hello,

this tool is amazin, I just found one small bug.

If the MKV container has a delay set to the sound, that delay is not transfered into the MP4 so it makes the output unsynchronised.

For example from MKV infotool window with 800 ms delay on the audio:
Audio #1
ID : 2
Format : AC-3
Duration : 2 h 20 min
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Delay relative to video : 800 ms
Stream size : 641 MiB (2%)

Default : Yes
Forced : No

The same from the output MP4 without the delay:
Audio #1
ID : 2
Format : AC-3
Duration : 2 h 20 min
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Stream size : 641 MiB (2%)
Title : hun.ac3:sopt:gfreg=ffdmx@GPAC1.0.1-rev0-gd8538e8ae-HEAD

Is it possible to fix that, please?

Thank you.

yes, this error exists
I put a pause in front of "### MUX MP4".
I changed the sound with the eac3to utility

hi share with me sample clips i'll try to fix it when i have time

Hello,

thank you in advance.

Here you can download a 310MB sample, which contains 3 sound track, all of them has some delay set up:
https://drive.google.com/file/d/1oLAsXcY5J5JfAEaRkW7cq1Ww7uD53ZRg/view?usp=sharing

Track1 is the video.
Track2 is a DD AC3 which has 26ms delay.
Track3 is a DTS which has 3ms delay - this would be skipped I suppose.
Track4 is a DD AC3 which has 14ms delay.

@borsodos1947 instead of manually playing with eac3to can you check if adding following switch to mp4box fixes it for you -delay <track_id>= like -delay 2=26 this would be proper fix but may not work with all players

hi sorry for so long time @sherics checkout latest master it has the delay support, i checked with VLC and it works i could not check with TV as such badly cutted samples :P are not playable in DV on LGs.

please test on the full file