M2TS file showing wrong duration

Bug report and feature request
Post Reply
alister
Beginner
Beginner
Posts: 3
Joined: Sun Jan 22, 2012 8:12 am

M2TS file showing wrong duration

Post by alister » Wed Aug 15, 2018 6:43 am

I've a M2TS file of ~20GB and it shows a duration of 1 second

here the detailed information for the file

General
ID : 0 (0x0)
Complete name : G:\blu-rays discs\XXXXXXXXXXXXXXXXXX\BDMV\STREAM\00001.m2ts
CompleteName_Last : G:\blu-rays discs\XXXXXXXXXXXXXXXXXX\BDMV\STREAM\00039.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 41.0 GiB
Duration : 1 s 80 ms
Overall bit rate mode : Variable
Overall bit rate : 326 Gb/s
Maximum Overall bit rate : 48.0 Mb/s

Video #1
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : MPEG Video
Format version : Version 2
Format profile : Main@High
Format settings : CustomMatrix
Format settings, BVOP : No
Format settings, Matrix : Custom
Format settings, GOP : N=1
Codec ID : 2
Duration : 1 s 376 ms
Bit rate mode : Variable
Maximum bit rate : 15.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Video #2
ID : 6912 (0x1B00)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.2
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : 27
Duration : 1 s 84 ms
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

Audio #1
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Muxing mode : Stream extension
Codec ID : 134
Duration : 1 s 80 ms
Bit rate mode : Variable / Constant
Bit rate : Unknown / 1 509 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless / Lossy
Delay relative to video : 1 s 993 ms

Audio #2
ID : 4353 (0x1101)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : 130
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 1 s 993 ms
Stream size : 101 KiB (0%)

Audio #3
ID : 4354 (0x1102)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : 130
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 1 s 993 ms
Stream size : 101 KiB (0%)

Audio #4
ID : 4355 (0x1103)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : 130
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 768 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 1 s 993 ms
Stream size : 101 KiB (0%)

Audio #5
ID : 4356 (0x1104)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 129
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 224 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 1 s 982 ms
Stream size : 29.5 KiB (0%)
Service kind : Complete Main

Audio #6
ID : 4357 (0x1105)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 129
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 224 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 1 s 982 ms
Stream size : 29.5 KiB (0%)
Service kind : Complete Main

Audio #7
ID : 6656 (0x1A00)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Format profile : Express
Codec ID : 162
Duration : 1 s 80 ms
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Compression mode : Lossy
Delay relative to video : 1 s 961 ms
Stream size : 25.3 KiB (0%)

Text #1
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #2
ID : 4609 (0x1201)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #3
ID : 4610 (0x1202)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #4
ID : 4611 (0x1203)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #5
ID : 4612 (0x1204)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #6
ID : 4613 (0x1205)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #7
ID : 4614 (0x1206)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #8
ID : 4615 (0x1207)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #9
ID : 4616 (0x1208)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #10
ID : 4617 (0x1209)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #11
ID : 4618 (0x120A)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #12
ID : 4619 (0x120B)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #13
ID : 4620 (0x120C)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #14
ID : 4621 (0x120D)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #15
ID : 4622 (0x120E)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 6 s 588 ms

Text #16
ID : 4623 (0x120F)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #17
ID : 4624 (0x1210)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 5 s 921 ms

Text #18
ID : 4625 (0x1211)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 6 s 588 ms

Text #19
ID : 4626 (0x1212)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #20
ID : 4627 (0x1213)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 5 s 921 ms

Text #21
ID : 4628 (0x1214)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 6 s 588 ms

Text #22
ID : 4629 (0x1215)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

Text #23
ID : 4630 (0x1216)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Delay relative to video : 5 s 921 ms

Text #24
ID : 4631 (0x1217)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144

All That's been put into mediacoder is the 0000001.m2ts file

Now I've set the duration manually to the correct 1:21:09 length and it seems to be encoded fine.

Given that the m2ts files don't have a header I think something went wrong on calc duration

Post Reply