Hello!
I’m running the OSMC May 2024 update (2024.05-1
) on a Vero 4K+, and am having trouble with OSMC not correctly identifying the all the audio tracks on some BDMV folder structure rips of Criterion UHD discs that were made with MakeMKV.
The discs I’m having trouble with are Trainspotting (UPC 715515291613) and La haine (UPC 715515294515). Both discs have a stereo and a multi-channel DTS-MA track along with an AC-3 commentary track.
The problem is that OSMC is failing to identify the two main DTS-MA tracks (both are listed as having 0 channels in the GUI) and only finds the commentary.
The mediainfo
output for Trainspotting’s main title is as follows:
❯ mediainfo BDMV/STREAM/00009.m2ts
General
ID : 0 (0x0)
Complete name : BDMV/STREAM/00009.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 69.7 GiB
Duration : 1 h 34 min
Overall bit rate mode : Variable
Overall bit rate : 106 Mb/s
Maximum Overall bit rate : 109 Mb/s
Frame rate : 23.976 FPS
Video #1
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 1 h 34 min
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Video #2
ID : 4117 (0x1015)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 1 h 34 min
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 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Audio #1
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Muxing mode : Stream extension
Codec ID : 134
Duration : 1 h 34 min
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Audio #2
ID : 4353 (0x1101)
Menu ID : 1 (0x1)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Muxing mode : Stream extension
Codec ID : 134
Duration : 1 h 34 min
Bit rate mode : Variable
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Audio #3
ID : 4354 (0x1102)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 1 h 34 min
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 1 channel
Channel layout : M
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 129 MiB (0%)
Service kind : Complete Main
Dialog Normalization : -31 dB
compr : -0.28 dB
mixlevel : 285 dB
roomtyp : 3
ltrtcmixlev : -3.0 dB
ltrtsurmixlev : -3.0 dB
lorocmixlev : -3.0 dB
lorosurmixlev : -3.0 dB
dialnorm_Average : -31 dB
dialnorm_Minimum : -31 dB
dialnorm_Maximum : -31 dB
Text
ID : 4768 (0x12A0)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
Dumping the first 5 MB of the m2ts file and then analysing it with mediainfo
results in none of the three audio streams being identified:
❯ dd if=BDMV/STREAM/00009.m2ts of=trainspotting.bin bs=5000000 count=1
1+0 records in
1+0 records out
5000000 bytes transferred in 0.270860 secs (18459721 bytes/sec)
❯ mediainfo trainspotting.bin
General
ID : 0 (0x0)
Complete name : trainspotting.bin
Format : BDAV
Format/Info : Blu-ray Video
File size : 4.77 MiB
Duration : 463 ms
Overall bit rate mode : Constant
Overall bit rate : 86.4 Mb/s
Maximum Overall bit rate : 109 Mb/s
Frame rate : 23.976 FPS
Conformance errors : 2
MPEG-TS : Yes
General compliance : File size 5000000 is less than expected size at least 5000064 (offset 0x4C4AC0)
General compliance : Element size 184 is more than maximal permitted size 120 (offset 0x4C4AC8)
FileExtension_Invalid : m2ts mts ssif
Video #1
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 417 ms
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Video #2
ID : 4117 (0x1015)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 458 ms
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 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Text
ID : 4768 (0x12A0)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
If I bump the dump size up to 15 MB, the streams are identified correctly:
❯ dd if=BDMV/STREAM/00009.m2ts of=trainspotting.bin bs=15000000 count=1
1+0 records in
1+0 records out
15000000 bytes transferred in 0.770441 secs (19469369 bytes/sec)
❯ mediainfo trainspotting.bin
General
ID : 0 (0x0)
Complete name : trainspotting.bin
Format : BDAV
Format/Info : Blu-ray Video
File size : 14.3 MiB
Duration : 1 s 572 ms
Overall bit rate mode : Variable
Overall bit rate : 76.3 Mb/s
Maximum Overall bit rate : 109 Mb/s
Frame rate : 23.976 FPS
FileExtension_Invalid : m2ts mts ssif
Video #1
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 1 s 584 ms
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Video #2
ID : 4117 (0x1015)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 1 s 584 ms
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 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0001 cd/m2, max: 1000 cd/m2
Audio #1
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Muxing mode : Stream extension
Codec ID : 134
Duration : 725 ms
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Audio #2
ID : 4353 (0x1101)
Menu ID : 1 (0x1)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Muxing mode : Stream extension
Codec ID : 134
Duration : 725 ms
Bit rate mode : Variable
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Audio #3
ID : 4354 (0x1102)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 1 s 248 ms
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 1 channel
Channel layout : M
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 29.2 KiB (0%)
Service kind : Complete Main
Dialog Normalization : -31 dB
compr : -0.28 dB
mixlevel : 285 dB
roomtyp : 3
ltrtcmixlev : -3.0 dB
ltrtsurmixlev : -3.0 dB
lorocmixlev : -3.0 dB
lorosurmixlev : -3.0 dB
dialnorm_Average : -31 dB
dialnorm_Minimum : -31 dB
dialnorm_Maximum : -31 dB
Text
ID : 4768 (0x12A0)
Menu ID : 1 (0x1)
Format : PGS
Codec ID : 144
The results are identical for La Haine.
Looking at the debug logs, the following output sticks out:
2024-08-03 15:59:31.102 T:3002 debug <general>: Open - probing detected format [mpegts]
2024-08-03 15:59:31.103 T:3002 debug <general>: Open - avformat_find_stream_info starting
2024-08-03 15:59:31.168 T:2840 debug <general>: ------ Window Init (DialogBusy.xml) ------
2024-08-03 15:59:32.237 T:3003 debug <general>: Thread BackgroundLoader 3655364864 terminating
2024-08-03 15:59:32.711 T:3002 info <general>: ffmpeg[0xb28b2120]: [hevc] Skipping NAL unit 62
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Could not find codec parameters for stream 1 (Audio: dts (dca) ([134][0][0][0] / 0x0086), 0 channels): unspecified sample format
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Could not find codec parameters for stream 2 (Audio: dts (dca) ([134][0][0][0] / 0x0086), 0 channels): unspecified sample format
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Could not find codec parameters for stream 3 (Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp): unspecified sample rate
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
2024-08-03 15:59:32.820 T:3002 debug <general>: ffmpeg[0xb28b2120]: [mpegts] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
2024-08-03 15:59:32.830 T:3002 debug <general>: Open - av_find_stream_info finished
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Input #0, mpegts, from 'bluray://%2fmnt%2fMedia%2fVideos%2fMovies%2fUHD%2fLa%20haine%20(1995)%2f/BDMV/PLAYLIST/00005.mpls':
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Duration: N/A, start: 600.000000, bitrate: N/A
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Program 1
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:1[0x1100]: Audio: dts ([134][0][0][0] / 0x0086), 0 channels
2024-08-03 15:59:32.830 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:2[0x1101]: Audio: dts ([134][0][0][0] / 0x0086), 0 channels
2024-08-03 15:59:32.831 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp
2024-08-03 15:59:32.831 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:4[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
2024-08-03 15:59:32.831 T:3002 info <general>: ffmpeg[0xb28b2120]: Stream #0:5[0x1015]: Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
Based on my dd
experiments and the debug log entries, it would seem that the default 5 MB FFmpeg probesize
is not large enough to allow the streams to be analysed correctly. Is there a tunable for adjusting the probesize
or any other mechanism to force OSMC/FFmpeg to analyse a larger chunk of the file in order to allow the tracks to be identified?
As an aside, this older issue also sounds vaguely similar, but I’m not seeing any fake playlists in the title selection menu.
Thanks for your help!