Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.34k stars 789 forks source link

Some rare occasions with some MKV where LAV Splitter isn't finding all tracks #608

Closed zotabee closed 1 month ago

zotabee commented 1 month ago

Hello Nevcairiel,

Been using MPC-HC / LAV Filters / madVR for the last decade! (Many thanks for the great piece of software).

Tested couple hundred of MKV in the past few days for some reasons. I noticed that for some of them, strangely, subtitles tracks were not showing in MPC-HC and LAV filters menu... I noticed it on a very small batch (<1% of movies tested perhaps). Apparently sometimes additional audio tracks as well. Example with a file below:

Screenshot 2024-07-21 160851 Screenshot 2024-07-21 160732 Screenshot 2024-07-21 160704

Strangely, it's supposed to be a standard one edition / one cut movie here, seems the splitter is lost and wrongly showing two editions (have a bunch of 2in1 mkv, they are working perfectly).

While these releases have been hash checked and confirmed on multiple movies, i don't think it's only one "broken" release. Could it be a specific version of mkvmerge / libebml / libmatroska that induced this bug perhaps?

Tested some of these releases with VLC and mediainfo and each time, they were able to play these subtitles and show all the tracks properly.

Here is one example :

Format : Matroska Format version : Version 4 File size : 13.7 GiB Duration : 1 h 21 min Overall bit rate : 24.0 Mb/s Movie name : Dasha Nekrasova - The Scary of Sixty-First (2021) Encoded date : UTC 2022-02-15 20:03:18 Writing application : mkvmerge v65.0.0 ('Too Much') 64-bit Writing library : libebml v1.4.2 + libmatroska v1.6.4

Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High Format level : 4.1 Format settings, CABAC : Yes Format settings, Referenc : 4 frames Codec ID : V_MPEG4/ISO/AVC Duration : 1 h 21 min Bit rate : 22.8 Mb/s Width : 1 920 pixels Height : 1 038 pixels Display aspect ratio : 1.85:1 Frame rate mode : Constant Frame rate : 23.976 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.477 Stream size : 13.0 GiB (95%) Title : -EA Writing library : x264 core 164 r3085+55M 938b6d0 t_mod_New [(8 & 10)-bit@all X86_64] Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=0.92:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=13 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=0 / crf=21.2000 / qcomp=0.65 / qpmin=0:0:0 / qpmax=69:69:69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.30 / pb_ratio=1.20 / aq=3:0.70 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0 Language : English Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709

Audio # 1 ID : 2 Format : E-AC-3 Format/Info : Enhanced AC-3 Commercial name : Dolby Digital Plus Format settings : Big Codec ID : A_EAC3 Duration : 1 h 21 min Bit rate mode : Constant Bit rate : 1 024 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Compression mode : Lossy Stream size : 599 MiB (4%) Language : English Default : Yes Forced : No

Audio # 2 ID : 3 Format : AAC LC SBR Format/Info : Advanced Audio Codec Commercial name : HE-AAC Codec ID : A_AAC-2 Duration : 1 h 21 min Bit rate : 64.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 23.438 FPS (2048 SPF) Compression mode : Lossy Delay relative to video : 31 ms Stream size : 37.5 MiB (0%) Title : Commentary with Dasha Nekrasova and Madeline Quinn Language : English Default : No Forced : No

Audio # 3 ID : 4 Format : AAC LC SBR Format/Info : Advanced Audio Codec Commercial name : HE-AAC Codec ID : A_AAC-2 Duration : 1 h 21 min Bit rate : 64.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 23.438 FPS (2048 SPF) Compression mode : Lossy Delay relative to video : 31 ms Stream size : 37.5 MiB (0%) Title : Commentary with Film Critics / Authors Alexandra Heller-Nicholas & Josh Nelson Language : English Default : No Forced : No

Text # 1 ID : 5 Format : UTF-8 Codec ID : S_TEXT/UTF8 Duration : 1 h 20 min Bit rate : 47 b/s Frame rate : 0.225 FPS Count of elements : 1087 Stream size : 27.9 KiB (0%) Title : srt HoH Language : English Default : No Forced : No

Text # 2 ID : 6 Format : PGS Muxing mode : zlib Codec ID : S_HDMV/PGS Duration : 1 h 20 min Bit rate : 31.3 kb/s Frame rate : 0.430 FPS Count of elements : 2074 Stream size : 18.0 MiB (0%) Title : sup HoH Language : English Default : No Forced : No

Menu # 1 _00_00_00_000 : :Chapter 01 _00_10_24_749 : :Chapter 02 _00_19_53_567 : :Chapter 03 _00_33_32_886 : :Chapter 04 _00_45_15_630 : :Chapter 05 _00_58_18_495 : :Chapter 06 _01_08_47_123 : :Chapter 07 _01_19_00_819 : :Chapter 08

Menu # 2 _00_00_00_097 : en:Chapter 01 / en:Chapter 01

Current setup :

Win11 23H2 x64 MPC-HC (64-bit) 2.3.3 (I just tried some random older versions till 1.7.14 and it seems all are impacted.

Build information: Version: 2.3.3 (4217ab0c1) Build date: Jul 18 2024

LAV Filters: LAV Splitter: 0.79.2.18 LAV Video: 0.79.2.18 LAV Audio: 0.79.2.18 FFmpeg compiler: MinGW-w64 GCC 13.3.0

Operating system: Name: Windows 11 (Build 23H2) Version: 10.0.22631 (64-bit)

Hardware: CPU: AMD Ryzen 9 7900 12-Core Processor GPU1: AMD Radeon RX 6650 XT (driver version: 32.0.11021.1011) GPU2: AMD Radeon RX 6650 XT (driver version: 32.0.11021.1011) GPU3: AMD Radeon RX 6650 XT (driver version: 32.0.11021.1011) GPU4: AMD Radeon RX 6650 XT (driver version: 32.0.11021.1011) Monitor: \.\DISPLAY2 - Generic PnP Monitor [1920x1080 32-bit 120 DPI] Monitor: \.\DISPLAY3 - Generic PnP Monitor [1920x1080 32-bit 120 DPI] Monitor: \.\DISPLAY1 - Generic PnP Monitor [1920x1080 32-bit 96 DPI] Monitor: \.\DISPLAY4 - Generic PnP Monitor [2560x1440 32-bit 96 DPI] - [Current]

Text: Scale Factor: 1.000000 Ansi Codepage: 1252

Let me know if I can do more tests or provide more logs and information.

Regards,

zotabee

clsid2 commented 1 month ago

They are hidden because the tracks are set as disabled. This is mistake of creator of the file.

You can fix it with MkvToolNix header editor, and change disabled flag to false.

VLC does not follow Matroska specification correctly.

zotabee commented 1 month ago

They are hidden because the tracks are set as disabled. This is mistake of creator of the file.

It seems you are right @clsid2 ! (By the way, many thanks for keeping MPC-HC alive!)

What a weird spec from Matroska however. Keeping tracks in the container but not exposing those to the player, I wonder what's the use case.

It seems some other players like mpv ignore this flag. Would it be out of question to have a checkbox in LAV Splitter panel to ignore this flag? I imagine the goal with LAV and MPC-HC is to strictly follow Matroska specs...

You can fix it with MkvToolNix header editor, and change disabled flag to false.

Just saw that, thanks. My goal is to have my releases untouched and external srt files when needed. I imagine informing the releaser and hoping for a nuke and proper is the only correct solution.

VLC does not follow Matroska specification correctly.

No surprise here. 😋

Nevcairiel commented 1 month ago

What a weird spec from Matroska however. Keeping tracks in the container but not exposing those to the player, I wonder the use case.

Its not even that weird, considering you need to specifically include a Enabled=False tag in the file - by default any track is enabled (eg. Enabled=True is not required, its the default). So someone opted to specifically write it like that.