View Single Post
Old 27th March 2016, 14:29   #905  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Quote:
Originally Posted by tebasuna51 View Post
AFAIK the only method is extract the timecodes of each audio track:
mkvextract timecodes_v2 INPUT.mkv 1:timecodes_1.txt
and read the second line of the txt:
Code:
# timecode format v2
200
210.666667
...
Here the delay of track 1 is 200 ms.
Indeed, the delay is not easy to retrieve. And I would like to avoid mkvextract, because it requires to save a big temp file on disc for each audio stream, and it takes ages to process the whole MKV file. I need only the first occurrence of the audio timecode, but I have no way to stop it to process the whole file. Also, currently, mkvextract is not included in the toolset, and I don't want to add it just for the delay problem.

Luckily, there is another solution. I can use mkvinfo --track-info (or -v) to output a lot of lines to stdout. And when I find a line with the following structure (for all audio tracks), I have found the delay, and I can kill mkvinfo:
Code:
| + SimpleBlock (key, track number 2, 8 frame(s), timecode 1.024s = 00:00:01.024)
That will certainly be much more rapid. And mkvinfo is already distributed with the toolset of BD3D2MK3D. :-)

Another solution would be to use the command-line version of MediaInfo, but it is not included in the toolset. However, that solution is so simple that I may be tempted to use it. ;-)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline