TMD20/PT-Muxer

Support Delayed Tracks

Opened this issue · 1 comments

Kino Lorber BD; Not sure how this would be done

Get a full bdinfo log, look at the Files section, run mediainfo on the first M2TS file. If the file has a video track, but no audio, then other audio, subtitles, and chapters need to be delayed by length of the file.

Use the length property from mediainfo and add delay to eac3to demux command

from datetime import datetime
# for example, first_file["length"] = '0:00:11.010'
length = datetime.strptime(first_file["length"], "%H:%M:%S.%f")
delay = int(length.second * 1000 + (length.microsecond / 1000))
# track_delay = "+11010ms"
track_delay = "+{}ms".format(delay)

Then demux, assume audio track is track 2, and needs a delay of 11010ms.

eac3to 1) 2:audio.dtsma +11010ms
TMD20 commented

Thank you for providing an example.

I should hopefully be able to find a way to implement this. So that it works, and is not too crazy.