Page 1 of 1

m2ts files reporting incorrect duration

PostPosted: Thu Feb 21, 2013 5:14 pm
by probedb
I mentioned this earlier today on your facebook page.

It's a problem I had with Twonky and with the file I tried Serviio fixed it, however it doesn't seem to be the case with all files.

Basically the client sees the wrong duration for the file and so won't play beyond it. In this case it's my rip of Inglourious Basterds Blu-Ray with original video and original DTS-MA track. As you can see from MediaInfo below it's 2h 33m, however on both my Oppo BDP-93 and Panasonic Viera 42GT50 they report 8m 53s and 8m 50s respectively.

I've attached the logs from startup, playing in the Oppo then the Panasonic. I notice there's a Content-Length header for 2,004,877,312 bytes when the file is 35,334,998,016 bytes?

  Code:
ID                                       : 0 (0x0)
Complete name                            : V:\Films\Blu-Ray\inglourious.basterds.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 32.9 GiB
Duration                                 : 2h 33mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 30.8 Mbps
Maximum Overall bit rate                 : 48.0 Mbps

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : 27
Duration                                 : 2h 32mn
Bit rate mode                            : Variable
Maximum bit rate                         : 38.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Format profile                           : MA / Core
Mode                                     : 16
Format settings, Endianness              : Big
Muxing mode                              : Stream extension
Codec ID                                 : 134
Duration                                 : 2h 32mn
Bit rate mode                            : Variable
Bit rate                                 : Unknown / 1 509 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 24 bits
Compression mode                         : Lossless / Lossy

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


Re: m2ts files reporting incorrect duration

PostPosted: Fri Feb 22, 2013 8:29 am
by probedb
Anyone? This is quite a major problem and not limited to one device.

Re: m2ts files reporting incorrect duration

PostPosted: Fri Feb 22, 2013 4:16 pm
by zip
can you post ffmpeg -i for the file?

Re: m2ts files reporting incorrect duration

PostPosted: Fri Feb 22, 2013 9:49 pm
by probedb
I hope I've done this right, I downloaded from http://ffmpeg.zeranoe.com/builds/

And did:
  Code:
E:\Temp\ffmpeg-20130222-git-b16bf91-win64-static\ffmpeg-20130222-git-b16bf91-win
64-static\bin>dir
 Volume in drive E is Random
 Volume Serial Number is 8862-794C

 Directory of E:\Temp\ffmpeg-20130222-git-b16bf91-win64-static\ffmpeg-20130222-g
it-b16bf91-win64-static\bin

22/02/2013  06:14    <DIR>          .
22/02/2013  06:14    <DIR>          ..
22/02/2013  06:14        22,363,648 ffmpeg.exe
22/02/2013  06:14        22,300,672 ffplay.exe
22/02/2013  06:14        22,312,448 ffprobe.exe
               3 File(s)     66,976,768 bytes
               2 Dir(s)  69,570,134,016 bytes free

E:\Temp\ffmpeg-20130222-git-b16bf91-win64-static\ffmpeg-20130222-git-b16bf91-win
64-static\bin>ffmpeg.exe -i V:\Films\Blu-Ray\inglourious.basterds.m2ts
ffmpeg version N-50171-gb16bf91 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 22 2013 01:12:32 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable
-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 39.100 /  3. 39.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpegts @ 00000000003da1e0] Stream #2: not enough frames to estimate rate; consi
der increasing probesize
[mpegts @ 00000000003da1e0] Could not find codec parameters for stream 2 (Subtit
le: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 00000000002fdc00] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from 'V:\Films\Blu-Ray\inglourious.basterds.m2ts':
  Duration: 02:32:59.67, start: 11.608967, bitrate: 30794 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1
080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000
 Hz, 5.1(side), fltp, 1536 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
At least one output file must be specified

E:\Temp\ffmpeg-20130222-git-b16bf91-win64-static\ffmpeg-20130222-git-b16bf91-win
64-static\bin>

Re: m2ts files reporting incorrect duration

PostPosted: Tue Feb 26, 2013 8:35 am
by probedb
Any thoughts on this? I don't really want to have to get a media player that can deal with NTS/Samba shares.

Cheers,
Paul.

Re: m2ts files reporting incorrect duration

PostPosted: Tue Feb 26, 2013 4:54 pm
by zip
might be possible the file has been checked in the middle of being copied to the shared folder? Try to rename the file, let Serviio add it again and check it then.

Re: m2ts files reporting incorrect duration

PostPosted: Tue Feb 26, 2013 6:51 pm
by probedb
It works fine playing from a HDD connected directly to the player so it's not the file. I wonder if it's a DLNA issue?

I can try a rescan.

Re: m2ts files reporting incorrect duration

PostPosted: Tue Feb 26, 2013 7:45 pm
by probedb
A rescan seems to have sorted it thanks.

Should I raise this as a bug? It shouldn't be attempting to scan a file whilst it's being copied.

Re: m2ts files reporting incorrect duration

PostPosted: Tue Feb 26, 2013 11:36 pm
by zip
There was a related bug fixed for 1.2, so let's see if it helps

Re: m2ts files reporting incorrect duration

PostPosted: Wed Feb 27, 2013 7:41 am
by probedb
zip wrote:There was a related bug fixed for 1.2, so let's see if it helps


Excellent, thanks for the help Petr.