Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matroska muxer sets subtitle 'default' flag for first track when no default subtitle is requested #3200

Closed
ghost opened this issue Oct 25, 2020 · 5 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Oct 25, 2020

Problem description:

HandBrakeCLI -i -o <output.mkv> --subtitle --subtitle-default=none

HandBrake version (e.g., 1.3.0):

HandBrake 20201024155346-523f011bf-master (2020102401) - Darwin x86_64

Operating system and version (e.g., Ubuntu 19.10, macOS 10.15 Catalina, Windows 10 1909):

macOS 10.15 Catalina

Error message text and/or screenshot:

General
Unique ID                                : 276544176893230284924921082807745049712 (0xD00C789B7B4311A29E80856210CCF470)
Complete name                            : /Users/tim/out.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 486 MiB
Duration                                 : 4 min 10 s
Overall bit rate                         : 16.3 Mb/s
Encoded date                             : UTC 2020-10-25 21:19:26
Writing application                      : HandBrake 20201024155346-523f011bf-master 2020102401
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L4
Format settings                          : 1 Ref Frames
Format settings, CABAC                   : No
Format settings, Reference frames        : 1 frame
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 4 min 9 s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 157 r2935 545de2f
Encoding settings                        : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 4 min 10 s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -75 ms
Title                                    : Lossless
Language                                 : English
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 3 min 33 s
Language                                 : English
Default                                  : Yes
Forced                                   : No

Menu
00:00:00.031                             : :Chapter 1
00:00:01.116                             : :Chapter 2
00:00:01.157                             : :Chapter 2

HandBrake Activity Log:

[22:19:25] Compile-time hardening features are enabled
[22:19:25] hb_init: starting libhb thread
[22:19:25] thread 70000c71d000 started ("libhb")
HandBrake 20201024155346-523f011bf-master (2020102401) - Darwin x86_64 - https://handbrake.fr
12 CPUs detected
Opening /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv...
[22:19:25] CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
[22:19:25]  - Intel microarchitecture Kaby Lake
[22:19:25]  - logical processor count: 12
[22:19:25] hb_scan: path=/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv/) failed
[22:19:25] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[22:19:25] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv':
  Metadata:
    encoder         : libebml v1.2.0 + libmatroska v1.1.0
    creation_time   : 2011-02-18T03:30:24.000000Z
  Duration: 00:04:10.03, start: 0.000000, bitrate: 27419 kb/s
    Chapter #0:0: start 0.000000, end 1.084489
    Metadata:
      title           : Chapter 00
    Chapter #0:1: start 1.084489, end 250.026000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Lossless
    Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : 3/2+1
    Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : 2/0
    Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle (default)
[22:19:25] scan: decoding previews for title 1
[22:19:25] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[22:19:25] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[22:19:25] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)

Scanning title 1 of 1, preview 6, 60.00 %[22:19:26] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1

Scanning title 1 of 1, preview 10, 100.00 %[22:19:26] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv
  + duration: 00:04:10
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:00:01
    + 2: duration 00:04:09
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
[22:19:26] Starting work at: Sun Oct 25 22:19:26 2020

[22:19:26] 1 job(s) to process
[22:19:26] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 128,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ca_aac",
                "Gain": 0.0,
                "Mixdown": "dpl2",
                "Name": "Lossless",
                "NormalizeMixLevel": false,
                "PresetEncoder": "ca_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac"
        ],
        "FallbackEncoder": "ca_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 0,
                    "Seconds": 1,
                    "Ticks": 97603
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 9,
                    "Ticks": 22404737
                },
                "Name": "Chapter 2"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/tim/out.mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv",
        "Range": {
            "End": 2,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": [
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 0
            }
        ]
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "auto",
        "Options": "",
        "Preset": "ultrafast",
        "Profile": "auto",
        "QSV": {
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[22:19:26] Starting Task: Encoding Pass
[22:19:26] Skipping vfr filter
[22:19:26] Skipping crop/scale filter
[22:19:26] job configuration:
[22:19:26]  * source
[22:19:26]    + /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/BSG - Episode 1 - 4minutes.mkv
[22:19:26]    + title 1, chapter(s) 1 to 2
[22:19:26]    + container: matroska,webm
[22:19:26]    + data rate: 27419 kbps
[22:19:26]  * destination
[22:19:26]    + /Users/tim/out.mkv
[22:19:26]    + container: Matroska (libavformat)
[22:19:26]      + chapter markers
[22:19:26]  * video track
[22:19:26]    + decoder: vc1
[22:19:26]    + Output geometry
[22:19:26]      + storage dimensions: 1920 x 1080
[22:19:26]      + pixel aspect ratio: 1 : 1
[22:19:26]      + display dimensions: 1920 x 1080
[22:19:26]    + encoder: H.264 (libx264)
[22:19:26]      + preset:  ultrafast
[22:19:26]      + profile: auto
[22:19:26]      + level:   auto
[22:19:26]      + quality: 22.00 (RF)
[22:19:26]      + color profile: 1-1-1
[22:19:26]  * subtitle track 1, English [PGS] (track 0, id 0x4, Picture) -> Passthrough
[22:19:26]  * audio track 1
[22:19:26]    + name: Lossless
[22:19:26]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[22:19:26]      + samplerate: 48000 Hz
[22:19:26]    + mixdown: Dolby Pro Logic II
[22:19:26]    + encoder: AAC (Apple AudioToolbox)
[22:19:26]      + bitrate: 128 kbps, samplerate: 48000 Hz
[22:19:26] sync: expecting 5994 video frames
[22:19:26] encx264: min-keyint: 24, keyint: 240
[22:19:26] encx264: encoding at constant RF 22.000000
[22:19:26] encx264: unparsed options: ref=1:scenecut=0:bframes=0:no-deblock=1:cabac=0:analyse=none:8x8dct=0:weightp=0:me=dia:subme=0:mixed-refs=0:aq-mode=0:mbtree=0:rc-lookahead=0
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Constrained Baseline, level 4.0, 4:2:0, 8-bit
[22:19:26] sync: first pts audio 0x1 is 0
[22:19:26] sync: first pts video is 2790
[22:19:26] sync: "Chapter 1" (1) at frame 1 time 2790
[22:19:27] sync: "Chapter 2" (2) at frame 28 time 100414
[22:19:30] sync: first pts subtitle 0x4 is 1132740
@ghost
Copy link
Author

ghost commented Oct 25, 2020

Originally reported here: https://forum.handbrake.fr/viewtopic.php?f=10&t=40645

It does seem like it's not the desired behavior?

@ghost
Copy link
Author

ghost commented Oct 25, 2020

In addition, when requesting a default flag on a subtitle track, the muxer seems to set the Matroska 'forced' flag on that track too:

General
Unique ID                                : 203324870885212840492755549231938963760 (0x98F6F21B350F9EA72A397E53093A8930)
Complete name                            : /Users/tim/Downloads/out.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 33.9 MiB
Duration                                 : 30 s 677 ms
Overall bit rate                         : 9 260 kb/s
Encoded date                             : UTC 2020-10-25 22:48:40
Writing application                      : HandBrake 20201024155346-523f011bf-master 2020102401
Writing library                          : Lavf58.45.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L4
Format settings                          : 1 Ref Frames
Format settings, CABAC                   : No
Format settings, Reference frames        : 1 frame
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 30 s 614 ms
Width                                    : 1 920 pixels
Height                                   : 1 038 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 157 r2935 545de2f
Encoding settings                        : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=22.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 30 s 677 ms
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -44 ms
Title                                    : Stereo
Default                                  : Yes
Forced                                   : No

Text #1
ID                                       : 3
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 30 s 575 ms
Default                                  : No
Forced                                   : No

Text #2
ID                                       : 4
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 30 s 616 ms
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 5
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 30 s 616 ms
Default                                  : Yes
Forced                                   : Yes

Text #4
ID                                       : 6
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 s 87 ms
Default                                  : No
Forced                                   : No

Text #5
ID                                       : 7
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 s 87 ms
Default                                  : No
Forced                                   : No
[23:48:38] Compile-time hardening features are enabled
[23:48:39] hb_init: starting libhb thread
[23:48:39] thread 70000a493000 started ("libhb")
HandBrake 20201024155346-523f011bf-master (2020102401) - Darwin x86_64 - https://handbrake.fr
12 CPUs detected
Opening /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts...
[23:48:39] CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
[23:48:39]  - Intel microarchitecture Kaby Lake
[23:48:39]  - logical processor count: 12
[23:48:39] hb_scan: path=/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts/) failed
[23:48:39] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[23:48:39] dvd: not a dvd - trying as a stream/file instead
[23:48:39] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[23:48:39] Found the following PIDS
[23:48:39]     Video PIDS : 
[23:48:39]       0x1011 type H.264 (0x1b)
[23:48:39]       0x1b00 type H.264 (0x1b)
[23:48:39]       0x1b01 type H.264 (0x1b)
[23:48:39]     Audio PIDS : 
[23:48:39]       0x1100 type DTS-HD MA (0x86)
[23:48:39]       0x1101 type DTS (0x82)
[23:48:39]       0x1102 type DTS (0x82)
[23:48:39]       0x1103 type AC3 (0x81)
[23:48:39]       0x1104 type AC3 (0x81)
[23:48:39]       0x1a00 type E-AC3 (0xa1)
[23:48:39]       0x1a01 type E-AC3 (0xa1)
[23:48:39]     Subtitle PIDS : 
[23:48:39]       0x1200 type PGS Subtitle (0x90)
[23:48:39]       0x1201 type PGS Subtitle (0x90)
[23:48:39]       0x1202 type PGS Subtitle (0x90)
[23:48:39]       0x1203 type PGS Subtitle (0x90)
[23:48:39]       0x1204 type PGS Subtitle (0x90)
[23:48:39]     Other PIDS : 
[23:48:39]       0x1001 type Unknown (0xff) (PCR)
[23:48:39] stream id 0x1100 (type 0x86 substream 0x71) audio 0x711100
[23:48:39] stream id 0x1100 (type 0x86 substream 0x0) audio 0x1100
[23:48:39] stream id 0x1101 (type 0x82 substream 0x0) audio 0x1101
[23:48:39] stream id 0x1102 (type 0x82 substream 0x0) audio 0x1102
[23:48:39] stream id 0x1103 (type 0x81 substream 0x0) audio 0x1103
[23:48:39] stream id 0x1104 (type 0x81 substream 0x0) audio 0x1104
[23:48:39] stream id 0x1a00 (type 0xa1 substream 0x0) audio 0x1a00
[23:48:39] stream id 0x1a01 (type 0xa1 substream 0x0) audio 0x1a01
[23:48:39] stream id 0x1200 (type 0x90 substream 0x0) subtitle 0x1200
[23:48:39] stream id 0x1201 (type 0x90 substream 0x0) subtitle 0x1201
[23:48:39] stream id 0x1202 (type 0x90 substream 0x0) subtitle 0x1202
[23:48:39] stream id 0x1203 (type 0x90 substream 0x0) subtitle 0x1203
[23:48:39] stream id 0x1204 (type 0x90 substream 0x0) subtitle 0x1204
[23:48:39] hb_ts_stream_getPEStype: EOF while searching for PID 0x1011
[23:48:39] hb_sample_pts: couldn't find video packet near 99070560
[23:48:39] scan: decoding previews for title 1
[23:48:39] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[23:48:39] scan: audio 0x1101: dca, rate=48000Hz, bitrate=768000 Unknown (DTS) (5.1 ch) (768 kbps)
[23:48:39] scan: audio 0x1102: dca, rate=48000Hz, bitrate=768000 Unknown (DTS) (5.1 ch) (768 kbps)
[23:48:39] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 Unknown (DTS) (5.1 ch) (1536 kbps)
[23:48:39] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 Unknown (DTS-HD MA) (5.1 ch)
[23:48:39] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[23:48:39] scan: audio 0x1104: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[23:48:39] scan: audio 0x1a00: eac3, rate=48000Hz, bitrate=192000 Unknown (E-AC3) (2.0 ch) (192 kbps)
[23:48:39] scan: audio 0x1a01: eac3, rate=48000Hz, bitrate=192000 Unknown (E-AC3) (2.0 ch) (192 kbps)

Scanning title 1 of 1, preview 2, 20.00 %[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced
[h264 @ 0x7fe3e100f600] non-existing PPS 0 referenced

Scanning title 1 of 1, preview 5, 50.00 %
Scanning title 1 of 1, preview 8, 80.00 %
Scanning title 1 of 1, preview 10, 100.00 %[23:48:40] stream: 9 good frames, 0 errors (0%)
[23:48:40] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 16/26/0/0, aspect 16:9, PAR 1:1
[23:48:40] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts
  + duration: 00:00:30
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 16/26/0/0
  + chapters:
    + 1: duration 00:00:30
  + audio tracks:
    + 1, Unknown (DTS) (5.1 ch) (1536 kbps) (iso639-2: und), 48000Hz, 1536000bps
    + 2, Unknown (DTS-HD MA) (5.1 ch) (iso639-2: und)
    + 3, Unknown (DTS) (5.1 ch) (768 kbps) (iso639-2: und), 48000Hz, 768000bps
    + 4, Unknown (DTS) (5.1 ch) (768 kbps) (iso639-2: und), 48000Hz, 768000bps
    + 5, Unknown (AC3) (2.0 ch) (Dolby Surround) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 6, Unknown (AC3) (2.0 ch) (Dolby Surround) (192 kbps) (iso639-2: und), 48000Hz, 192000bps
    + 7, Unknown (E-AC3) (2.0 ch) (192 kbps) (iso639-2: und)
    + 8, Unknown (E-AC3) (2.0 ch) (192 kbps) (iso639-2: und)
  + subtitle tracks:
    + 1, Unknown [PGS]
    + 2, Unknown [PGS]
    + 3, Unknown [PGS]
    + 4, Unknown [PGS]
    + 5, Unknown [PGS]
Warning: Could not find subtitle track 0, skipped
Warning: Could not find subtitle track 6, skipped
Warning: Could not find subtitle track 7, skipped
Warning: Could not find subtitle track 8, skipped
[23:48:40] Starting work at: Sun Oct 25 23:48:40 2020

[23:48:40] 1 job(s) to process
[23:48:40] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 128,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ca_aac",
                "Gain": 0.0,
                "Mixdown": "dpl2",
                "NormalizeMixLevel": false,
                "PresetEncoder": "ca_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac"
        ],
        "FallbackEncoder": "ca_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 0,
                    "Seconds": 30,
                    "Ticks": 2756530
                },
                "Name": "Chapter 1"
            }
        ],
        "ChapterMarkers": false,
        "File": "/Users/tim/out.mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 26,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 16,
                    "height": 1038,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": [
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 0
            },
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 1
            },
            {
                "Burn": false,
                "Default": true,
                "Forced": false,
                "Track": 2
            },
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 3
            },
            {
                "Burn": false,
                "Default": false,
                "Forced": false,
                "Track": 4
            }
        ]
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "auto",
        "Options": "",
        "Preset": "ultrafast",
        "Profile": "auto",
        "QSV": {
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[23:48:40] Starting Task: Encoding Pass
[23:48:40] Skipping vfr filter
[23:48:40] job configuration:
[23:48:40]  * source
[23:48:40]    + /Volumes/T5DRIVE/Y.TEST.CLIPS/Blu-ray/Forgetting Sarah Marshall/00007.m2ts
[23:48:40]    + title 1, chapter(s) 1 to 1
[23:48:40]  * destination
[23:48:40]    + /Users/tim/out.mkv
[23:48:40]    + container: Matroska (libavformat)
[23:48:40]  * video track
[23:48:40]    + decoder: h264
[23:48:40]      + bitrate 200 kbps
[23:48:40]    + filters
[23:48:40]      + Crop and Scale (width=1920:height=1038:crop-top=16:crop-bottom=26:crop-left=0:crop-right=0)
[23:48:40]        + source: 1920 * 1080, crop (16/26/0/0): 1920 * 1038, scale: 1920 * 1038
[23:48:40]    + Output geometry
[23:48:40]      + storage dimensions: 1920 x 1038
[23:48:40]      + pixel aspect ratio: 1 : 1
[23:48:40]      + display dimensions: 1920 x 1038
[23:48:40]    + encoder: H.264 (libx264)
[23:48:40]      + preset:  ultrafast
[23:48:40]      + profile: auto
[23:48:40]      + level:   auto
[23:48:40]      + quality: 22.00 (RF)
[23:48:40]      + color profile: 1-1-1
[23:48:40]  * subtitle track 1, Unknown [PGS] (track 0, id 0x1200, Picture) -> Passthrough
[23:48:40]  * subtitle track 2, Unknown [PGS] (track 1, id 0x1201, Picture) -> Passthrough
[23:48:40]  * subtitle track 3, Unknown [PGS] (track 2, id 0x1202, Picture) -> Passthrough, Default
[23:48:40]  * subtitle track 4, Unknown [PGS] (track 3, id 0x1203, Picture) -> Passthrough
[23:48:40]  * subtitle track 5, Unknown [PGS] (track 4, id 0x1204, Picture) -> Passthrough
[23:48:40]  * audio track 1
[23:48:40]    + decoder: Unknown (DTS) (5.1 ch) (1536 kbps) (track 1, id 0x711100)
[23:48:40]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[23:48:40]    + mixdown: Dolby Pro Logic II
[23:48:40]    + encoder: AAC (Apple AudioToolbox)
[23:48:40]      + bitrate: 128 kbps, samplerate: 48000 Hz
[23:48:40] file is MPEG Transport Stream with 192 byte packets offset 4 bytes
[23:48:40] sync: expecting 734 video frames
[23:48:40] encx264: min-keyint: 24, keyint: 240
[23:48:40] encx264: encoding at constant RF 22.000000
[23:48:40] encx264: unparsed options: ref=1:scenecut=0:bframes=0:no-deblock=1:cabac=0:analyse=none:8x8dct=0:weightp=0:me=dia:subme=0:mixed-refs=0:aq-mode=0:mbtree=0:rc-lookahead=0
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Constrained Baseline, level 4.0, 4:2:0, 8-bit
[23:48:40] sync: first pts video is 0
[23:48:40] sync: first pts audio 0x711100 is 0
[23:48:40] sync: first pts subtitle 0x1200 is 0
[23:48:40] sync: first pts subtitle 0x1201 is 0
[23:48:40] sync: first pts subtitle 0x1202 is 0
[23:48:40] sync: first pts subtitle 0x1203 is 90090
[23:48:40] sync: first pts subtitle 0x1204 is 90090
[23:48:44] hb_ts_stream_decode - eof
[23:48:44] reader: done. 1 scr changes
[23:48:44] work: average encoding speed for job is 0.000000 fps
[23:48:44] stream: 734 good frames, 0 errors (0%)
[23:48:44] dca-decoder done: 2871 frames, 0 decoder errors
[23:48:44] h264-decoder done: 734 frames, 0 decoder errors
[23:48:44] sync: got 734 frames, 734 expected
[23:48:44] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:4     Avg QP:18.50  size:187447
x264 [info]: frame P:730   Avg QP:21.46  size: 45953
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4: 12.3%  0.0%  0.0%  P16..4: 72.7%  0.0%  0.0%  0.0%  0.0%    skip:15.0%
x264 [info]: coded y,uvDC,uvAC intra: 25.3% 91.3% 66.7% inter: 24.8% 73.5% 18.9%
x264 [info]: i16 v,h,dc,p: 39% 26% 15% 20%
x264 [info]: i8c dc,h,v,p: 48% 17% 23% 12%
x264 [info]: kb/s:8962.14
[23:48:45] mux: track 0, 734 frames, 34295593 bytes, 8949.90 kbps, fifo 256
[23:48:45] mux: track 1, 1438 frames, 507796 bytes, 132.52 kbps, fifo 1024
[23:48:45] mux: track 2, 22 frames, 245605 bytes, 64.09 kbps, fifo 16
[23:48:45] mux: track 3, 20 frames, 218293 bytes, 56.97 kbps, fifo 16
[23:48:45] mux: track 4, 20 frames, 221566 bytes, 57.82 kbps, fifo 16
[23:48:45] mux: track 5, 2 frames, 70 bytes, 0.02 kbps, fifo 8
[23:48:45] mux: track 6, 2 frames, 70 bytes, 0.02 kbps, fifo 8
[23:48:45] Finished work at: Sun Oct 25 23:48:45 2020

[23:48:45] libhb: work result = 0

Encode done!
HandBrake has exited.

@sr55 sr55 added the Bug label Oct 31, 2020
@ftpmorph
Copy link

Came here to make a bug report for this issue but I see it's already been done.

Just commenting to note this bug is still present in the latest beta build (2.4.0 beta-1) on macOS 11.0.1.

No default subtitle track selected, but in the output file HB always sets the first subtitle track as default in Matroska.

@sr55 sr55 added this to the 1.4.0 milestone Jan 2, 2021
@drmandarin
Copy link

Just to be clear this bug also present on Windows 10.

@drmandarin
Copy link

Originally reported here: https://forum.handbrake.fr/viewtopic.php?f=10&t=40645

It does seem like it's not the desired behavior?

Yes, correct that it's not the desired behaviour.
I'm commenting for clarity since your use of a question mark seems to indicate that you may not be clear whether this is the desired behaviour.

It is not the desired, or indeed specified, behaviour that a subtitle track NOT marked default, is then marked by the muxer as default.

Hopefully this is now clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants