Page 1 of 1

MakeMKV generates corrupt subtitle track when using custom track names

Posted: Mon Mar 25, 2024 3:04 am
by CaptPicard
MakeMKV 1.17.6 appears to be generating a corrupt subtitle track when I try to convert the "Pirates of the Caribbean: The Curse of the Black Pearl" blu-ray disc into an MKV file and use a custom name for some subtitle tracks. It seems to be inserting an extraneous 0x74 byte into the beginning of a track element of the MKV file, corrupting that track. It reports no errors when reading the blu-ray disc and creating the MKV file.

Here are my repro steps:
  1. Open the "Pirates of the Caribbean: The Curse of the Black Pearl" blu-ray disc in MakeMKV.
  2. Unselect all titles except for the first title (with 17 chapters).
  3. Set the name of this selected/enabled title to: Pirates of the Caribbean: The Curse of the Black Pearl
  4. Within this selected/enabled title, set the chapter names to:

    1. Opening Credits / A Pirate's Life
    2. Pirates Ye Be Warned
    3. Elizabeth's Rescue
    4. The Black Pearl
    5. Welcome Aboard
    6. The Hunt
    7. Finding a Crew
    8. Aztec Gold
    9. The Treasure of Cortez
    10. Keep to the Code
    11. The Battle
    12. Stranded Again
    13. The Curse
    14. The Trojan Horse
    15. The Curse Is Lifted
    16. End Credits
    17. Empty
  5. For the first 2 English audio tracks (LPCM and Dolby Digital), leave them at their default names.
  6. For the final 3 English audio tracks, set their names to:

    Commentary with Director Gore Verbinski and Actor Johnny Depp
    Commentary with Producer Jerry Bruckheimer and Actors Keira Knightley and Jack Davenport
    Commentary with Screenwriters Stuart Beattie, Ted Elliott, Terry Rossio and Jay Wolpert
  7. For the first set of English subtitle tracks (regular and "forced only"), set their names to: SDH
  8. For the 3 sets of English subtitle tracks (regular and "forced only"), set their names to:

    Commentary with Director Gore Verbinski and Actor Johnny Depp
    Commentary with Producer Jerry Bruckheimer and Actors Keira Knightley and Jack Davenport
    Commentary with Screenwriters Stuart Beattie, Ted Elliott, Terry Rossio and Jay Wolpert
  9. Click the Save button to create the MKV file.
When I then open this MKV file in MPC-HC version 2.1.7.4, it shows all of the subtitle tracks I selected in MakeMKV except for the last one. That last subtitle track (Commentary with Screenwriters Stuart Beattie, Ted Elliott, Terry Rossio and Jay Wolpert) is missing.

When I examine the MKV file using the "Info tool" in MKVToolNix GUI version 82.0, it shows all of the subtitle tracks as expected except for that last subtitle track. In the location of the MKV file where it should have that last subtitle track, the MKVToolNix info tool shows "Unknown element (ID: 0x74ae)".

Track, Position=2185, Size=43, Data size=41

Code: Select all

00000000  ae a9 d7 81 07 73 c5 81  .....s..
00000008  07 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e 83  ..engSn.
00000028  53 44 48                 SDH
EBML void, Position=2228, Size=43, Data size=41

Code: Select all

00000000  ec a9 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00                 ...
Track, Position=2271, Size=101, Data size=99

Code: Select all

00000000  ae e3 d7 81 09 73 c5 81  .....s..
00000008  09 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e bd  ..engSn.
00000028  43 6f 6d 6d 65 6e 74 61  Commenta
00000030  72 79 20 77 69 74 68 20  ry with 
00000038  44 69 72 65 63 74 6f 72  Director
00000040  20 47 6f 72 65 20 56 65   Gore Ve
00000048  72 62 69 6e 73 6b 69 20  rbinski 
00000050  61 6e 64 20 41 63 74 6f  and Acto
00000058  72 20 4a 6f 68 6e 6e 79  r Johnny
00000060  20 44 65 70 70            Depp
EBML void, Position=2372, Size=101, Data size=99

Code: Select all

00000000  ec e3 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00 00 00 00 00 00  ........
00000030  00 00 00 00 00 00 00 00  ........
00000038  00 00 00 00 00 00 00 00  ........
00000040  00 00 00 00 00 00 00 00  ........
00000048  00 00 00 00 00 00 00 00  ........
00000050  00 00 00 00 00 00 00 00  ........
00000058  00 00 00 00 00 00 00 00  ........
00000060  00 00 00 00 00           .....
Track, Position=2473, Size=128, Data size=126

Code: Select all

00000000  ae fe d7 81 0b 73 c5 81  .....s..
00000008  0b 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e d8  ..engSn.
00000028  43 6f 6d 6d 65 6e 74 61  Commenta
00000030  72 79 20 77 69 74 68 20  ry with 
00000038  50 72 6f 64 75 63 65 72  Producer
00000040  20 4a 65 72 72 79 20 42   Jerry B
00000048  72 75 63 6b 68 65 69 6d  ruckheim
00000050  65 72 20 61 6e 64 20 41  er and A
00000058  63 74 6f 72 73 20 4b 65  ctors Ke
00000060  69 72 61 20 4b 6e 69 67  ira Knig
00000068  68 74 6c 65 79 20 61 6e  htley an
00000070  64 20 4a 61 63 6b 20 44  d Jack D
00000078  61 76 65 6e 70 6f 72 74  avenport
EBML void, Position=2601, Size=127, Data size=size 124

Code: Select all

00000000  ec 40 7c 00 00 00 00 00  .@|.....
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00 00 00 00 00 00  ........
00000030  00 00 00 00 00 00 00 00  ........
00000038  00 00 00 00 00 00 00 00  ........
00000040  00 00 00 00 00 00 00 00  ........
00000048  00 00 00 00 00 00 00 00  ........
00000050  00 00 00 00 00 00 00 00  ........
00000058  00 00 00 00 00 00 00 00  ........
00000060  00 00 00 00 00 00 00 00  ........
00000068  00 00 00 00 00 00 00 00  ........
00000070  00 00 00 00 00 00 00 00  ........
00000078  00 00 00 00 00 00 00     .......
Unknown element (ID: 0x74ae), Position=2728, Size=128, Data size=125

Code: Select all

00000000  74 ae fd d7 81 0d 73 c5  t.....s.
00000008  81 0d 83 81 11 88 81 00  ........
00000010  9c 81 00 86 8a 53 5f 48  .....S_H
00000018  44 4d 56 2f 50 47 53 22  DMV/PGS"
00000020  b5 9c 83 65 6e 67 53 6e  ...engSn
00000028  d7 43 6f 6d 6d 65 6e 74  .Comment
00000030  61 72 79 20 77 69 74 68  ary with
00000038  20 53 63 72 65 65 6e 77   Screenw
00000040  72 69 74 65 72 73 20 53  riters S
00000048  74 75 61 72 74 20 42 65  tuart Be
00000050  61 74 74 69 65 2c 20 54  attie, T
00000058  65 64 20 45 6c 6c 69 6f  ed Ellio
00000060  74 74 2c 20 54 65 72 72  tt, Terr
00000068  79 20 52 6f 73 73 69 6f  y Rossio
00000070  20 61 6e 64 20 4a 61 79   and Jay
00000078  20 57 6f 6c 70 65 72 74   Wolpert
EBML void, Position=2856, Size=127, Data size=125

Code: Select all

00000000  ec fd 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00 00 00 00 00 00  ........
00000030  00 00 00 00 00 00 00 00  ........
00000038  00 00 00 00 00 00 00 00  ........
00000040  00 00 00 00 00 00 00 00  ........
00000048  00 00 00 00 00 00 00 00  ........
00000050  00 00 00 00 00 00 00 00  ........
00000058  00 00 00 00 00 00 00 00  ........
00000060  00 00 00 00 00 00 00 00  ........
00000068  00 00 00 00 00 00 00 00  ........
00000070  00 00 00 00 00 00 00 00  ........
00000078  00 00 00 00 00 00 00     .......
Notice how all of the tracks except for the corrupt one start with an 0xAE byte to represent the TrackEntry element. However, the corrupt track starts with an 0x74 byte, which isn't a valid starting byte to represent any MKV element. But right after that 0x74 byte is an 0xAE byte, which is likely the desired start of this track element.

If I skip putting the "Commentary with Producer Jerry Bruckheimer and Actors Keira Knightley and Jack Davenport" custom name in the middle set of English commentary subtitle tracks (regular and "forced only"), then the MKV file that MakeMKV generates includes all of the subtitle tracks without corruption.

Track, Position=2185, Size=43, Data size=41

Code: Select all

00000000  ae a9 d7 81 07 73 c5 81  .....s..
00000008  07 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e 83  ..engSn.
00000028  53 44 48                 SDH
EBML void, Position=2228, Size=43, Data size=41

Code: Select all

00000000  ec a9 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00                 ...
Track, Position=2271, Size=101, Data size=99

Code: Select all

00000000  ae e3 d7 81 09 73 c5 81  .....s..
00000008  09 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e bd  ..engSn.
00000028  43 6f 6d 6d 65 6e 74 61  Commenta
00000030  72 79 20 77 69 74 68 20  ry with 
00000038  44 69 72 65 63 74 6f 72  Director
00000040  20 47 6f 72 65 20 56 65   Gore Ve
00000048  72 62 69 6e 73 6b 69 20  rbinski 
00000050  61 6e 64 20 41 63 74 6f  and Acto
00000058  72 20 4a 6f 68 6e 6e 79  r Johnny
00000060  20 44 65 70 70            Depp
EBML void, Position=2372, Size=101, Data size=99

Code: Select all

00000000  ec e3 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00 00 00 00 00 00  ........
00000030  00 00 00 00 00 00 00 00  ........
00000038  00 00 00 00 00 00 00 00  ........
00000040  00 00 00 00 00 00 00 00  ........
00000048  00 00 00 00 00 00 00 00  ........
00000050  00 00 00 00 00 00 00 00  ........
00000058  00 00 00 00 00 00 00 00  ........
00000060  00 00 00 00 00           .....
Track, Position=2473, Size=37, Data size=35

Code: Select all

00000000  ae a3 d7 81 0b 73 c5 81  .....s..
00000008  0b 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67           ..eng
EBML void, Position=2510, Size=37, Data size=35

Code: Select all

00000000  ec a3 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00           .....
Track, Position=2547, Size=127, Data size=125

Code: Select all

00000000  ae fd d7 81 0d 73 c5 81  .....s..
00000008  0d 83 81 11 88 81 00 9c  ........
00000010  81 00 86 8a 53 5f 48 44  ....S_HD
00000018  4d 56 2f 50 47 53 22 b5  MV/PGS".
00000020  9c 83 65 6e 67 53 6e d7  ..engSn.
00000028  43 6f 6d 6d 65 6e 74 61  Commenta
00000030  72 79 20 77 69 74 68 20  ry with 
00000038  53 63 72 65 65 6e 77 72  Screenwr
00000040  69 74 65 72 73 20 53 74  iters St
00000048  75 61 72 74 20 42 65 61  uart Bea
00000050  74 74 69 65 2c 20 54 65  ttie, Te
00000058  64 20 45 6c 6c 69 6f 74  d Elliot
00000060  74 2c 20 54 65 72 72 79  t, Terry
00000068  20 52 6f 73 73 69 6f 20   Rossio 
00000070  61 6e 64 20 4a 61 79 20  and Jay 
00000078  57 6f 6c 70 65 72 74     Wolpert
EBML void, Position=2674, Size=127, Data size=125

Code: Select all

00000000  ec fd 00 00 00 00 00 00  ........
00000008  00 00 00 00 00 00 00 00  ........
00000010  00 00 00 00 00 00 00 00  ........
00000018  00 00 00 00 00 00 00 00  ........
00000020  00 00 00 00 00 00 00 00  ........
00000028  00 00 00 00 00 00 00 00  ........
00000030  00 00 00 00 00 00 00 00  ........
00000038  00 00 00 00 00 00 00 00  ........
00000040  00 00 00 00 00 00 00 00  ........
00000048  00 00 00 00 00 00 00 00  ........
00000050  00 00 00 00 00 00 00 00  ........
00000058  00 00 00 00 00 00 00 00  ........
00000060  00 00 00 00 00 00 00 00  ........
00000068  00 00 00 00 00 00 00 00  ........
00000070  00 00 00 00 00 00 00 00  ........
00000078  00 00 00 00 00 00 00     .......
Here are my drive and disc details:

Code: Select all

Drive Information
OS device name: \Device\CdRom0
Current profile: BD-ROM
Manufacturer: HL-DT-ST
Product: BD-RE WH16NS60
Revision: 1.02
Serial number: <redacted>
Firmware date: 2118-10-29 19:36
Bus encryption flags: 17
Highest AACS version: 81

LibreDrive Information
Status: Enabled
Drive platform: MT1959
Firmware type: Patched (microcode access re-enabled)
Firmware version: 1.02
DVD all regions: Yes
BD raw data read: Yes
BD raw metadata read: Yes
Unrestricted read speed: Yes

Disc Information
Label: PIRATES1
Timestamp: 2007-10-24 15:25:07
Protection: AACS v4
Data capacity: 46.61 Gb
Disc type: BD-ROM
Number of layers: 2
Channel bit length: 74,5 nm (25.0 GB max. per layer)
And here are the MakeMKV debug log file details:

Code: Select all

Debug log started at Mon Mar 25 00:31:50 2024 , written by MakeMKV v1.17.6 win(x64-release)
001005:0000 MakeMKV v1.17.6 win(x64-release) started
001004:0000 Debug logging enabled, log will be saved as file://C:\Users\<redacted>/MakeMKV_log.txt
Using 262272KB for read cache.
Network access is ENABLED, CURL version 7.72.0/Schannel/1.41.0 (x86_64-pc-win32) , proxy server not set.
WinCdArb=v1.2.0_tiny win(x64-release)
DEBUG: Code 3 at (Fjq;j%;wku%(|]PM?.".JoL:29395310
SDF  v098: HL-DT-ST_BD-RE__WH16NS60_1.02_211810291936_<redacted>
DEBUG: Code 3 at (Fjq;j%;wku%(|]PM?.".JoL:29395310
SDF  v098: HL-DT-ST_BD-RE__WH16NS60_1.02_211810291936_<redacted>
001011:0000 Using LibreDrive mode (v06.3 id=7FA2657C7667)
003007:0000 Using direct disc access mode
005085:0000 Loaded content hash table, will verify integrity of M2TS files.
DEBUG: Code 2147483648 at WKYQi`r2nRn]/W8S:121265499
DISCID=1596EE8FFB688FBA80F3844BF7AA2A216B4EDED8
003307:0000 File 00001.mpls was added as title #0
003025:0000 Title #00003.mpls has length of 10 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00004.mpls has length of 8 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00005.mpls has length of 18 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00008.mpls has length of 6 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003307:0000 File 00009.mpls was added as title #1
003307:0000 File 00010.mpls was added as title #2
003025:0000 Title #00016.mpls has length of 96 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003307:0000 File 00020.mpls was added as title #3
003025:0000 Title #00069.mpls has length of 2 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00070.mpls has length of 4 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00071.mpls has length of 4 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003307:0000 File 00072.mpls was added as title #4
003025:0000 Title #00075.mpls has length of 11 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00076.mpls has length of 16 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003307:0000 File 00001.m2ts was added as title #5
003025:0000 Title #00003.m2ts has length of 18 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00014.m2ts has length of 62 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00015.m2ts has length of 46 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00016.m2ts has length of 14 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00017.m2ts has length of 5 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00018.m2ts has length of 12 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00019.m2ts has length of 16 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00020.m2ts has length of 21 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003309:0000 Title 00021.m2ts is equal to title 00020.mpls and was skipped
003025:0000 Title #00022.m2ts has length of 37 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00023.m2ts has length of 38 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00024.m2ts has length of 31 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00025.m2ts has length of 34 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003025:0000 Title #00026.m2ts has length of 28 seconds which is less than minimum title length of 120 seconds and was therefore skipped
003307:0000 File 00028.m2ts was added as title #6
003025:0000 Title #00029.m2ts has length of 49 seconds which is less than minimum title length of 120 seconds and was therefore skipped
005011:0000 Operation successfully completed
005014:0000 Saving 1 titles into directory file://E:/Video
004007:0010 AV synchronization issues were found in file 'file://E:/Video/Pirates of the Caribbean- The Curse of the Black Pearl_t00.mkv' (title #1)
004008:0010 AV sync issue in stream 1 at 0:00:00 with duration of 1ms : encountered overlapping frame, audio skew is +1ms
004047:0010 AV sync issue in stream 2 at 0:00:00 : 0 frame(s) dropped to reduce audio skew to +9ms
004047:0010 AV sync issue in stream 3 at 0:00:00 : 0 frame(s) dropped to reduce audio skew to +9ms
004047:0010 AV sync issue in stream 5 at 0:00:00 : 0 frame(s) dropped to reduce audio skew to +9ms
004008:0010 AV sync issue in stream 2,3,5 at 0:00:00 with duration of 9ms : encountered overlapping frame, audio skew is +9ms
004047:0010 AV sync issue in stream 7 at 0:00:00 : Forced subtitles track #7 turned out to be empty and was removed from output file
004047:0010 AV sync issue in stream 9 at 0:00:00 : Forced subtitles track #9 turned out to be empty and was removed from output file
004047:0010 AV sync issue in stream 11 at 0:00:00 : Forced subtitles track #11 turned out to be empty and was removed from output file
004047:0010 AV sync issue in stream 13 at 0:00:00 : Forced subtitles track #13 turned out to be empty and was removed from output file
005005:0080 1 titles saved
005036:0104 Copy complete. 1 titles saved.
Application exited at Mon Mar 25 00:54:22 2024