gacopl / dvmkv2mp4

Convert any Dolby Vision/HDR10+ MKV to DV MP4 that runs on many devices
198 stars 36 forks source link

Sound delay in MKV is not transfered into MP4 #4

Closed sherics closed 1 year ago

sherics commented 2 years ago

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.

borsodos1947 commented 2 years ago

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

gacopl commented 2 years ago

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

sherics commented 2 years ago

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.

gacopl commented 2 years ago

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

gacopl commented 1 year ago

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