HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
17.21k stars 1.32k forks source link

Chapter Markers missing on output file #3019

Closed justinbrinton closed 4 years ago

justinbrinton commented 4 years ago

Problem description:

My process is MakeMKV to HandBrake in order to format the videos for the devices in my home. The MKV file has chapter markers, however, after running it through HandBrake there are no more chapter markers. The Chapters are found and displayed on the Chapters tab in HandBrake also the box is checked to add markers.

HandBrake version (e.g., 1.3.0):

1.3.3

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

Ubuntu 20.04

Error message text and/or screenshot:

There is no error message, just no chapter markers.

HandBrake Activity Log:

[08:40:58] Starting work at: Mon Jul 20 08:40:58 2020
[08:40:58] 1 job(s) to process
[08:40:58] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": 0.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "Name": "Stereo",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 48000,
                "Track": 0
            },
            {
                "Bitrate": 640,
                "CompressionLevel": 0.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ac3",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "Name": "Stereo",
                "NormalizeMixLevel": false,
                "PresetEncoder": "copy",
                "Quality": -3.0,
                "Samplerate": 48000,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:mp3",
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:truehd"
        ],
        "FallbackEncoder": "ac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 42,
                    "Ticks": 19984964
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 47,
                    "Ticks": 41985694
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 12,
                    "Seconds": 53,
                    "Ticks": 69560742
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 0,
                    "Seconds": 26,
                    "Ticks": 2342340
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 1,
                    "Seconds": 9,
                    "Ticks": 6178860
                },
                "Name": "Chapter 5"
            }
        ],
        "ChapterMarkers": true,
        "File": "/mnt/wwn-0x5000cca27ee158e1/The Twilight Zone (1959) - S01E14.mp4",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": true
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 3,
                "Settings": {
                    "block-height": "16",
                    "block-thresh": "40",
                    "block-width": "16",
                    "filter-mode": "2",
                    "mode": "3",
                    "motion-thresh": "1",
                    "spatial-metric": "2",
                    "spatial-thresh": "1"
                }
            },
            {
                "ID": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/450000"
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 242,
                    "crop-right": 242,
                    "crop-top": 0,
                    "height": 720,
                    "width": 1280
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Twilight Zone (1959) - S01 D2 1"
    },
    "PAR": {
        "Den": 480,
        "Num": 359
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.mkv",
        "Range": {
            "End": 5,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 14
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "3.1",
        "Options": "threads=8",
        "Preset": "placebo",
        "Profile": "high",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 23.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[08:40:58] CPU: AMD Ryzen 9 3900X 12-Core Processor            
[08:40:58]  - logical processor count: 24
[08:40:58] Intel Quick Sync Video support: no
[08:40:58] hb_scan: path=/mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.mkv, title_index=14
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.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(/mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.mkv/) failed
[08:40:58] 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
[08:40:58] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.mkv':
  Metadata:
    title           : The Twilight Zone (1959) - S01 D2 1
    encoder         : libmakemkv v1.15.1 (1.3.5/1.4.7) x86_64-linux-gnu
    creation_time   : 2020-07-17T00:44:03.000000Z
  Duration: 00:25:56.14, start: 0.000000, bitrate: 23614 kb/s
    Chapter #0:0: start 0.000000, end 222.055167
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 222.055167, end 688.562875
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 688.562875, end 1461.460000
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 1461.460000, end 1487.486000
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1487.486000, end 1556.140000
    Metadata:
      title           : Chapter 05
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 19958689
      DURATION-eng    : 00:25:56.137916666
      NUMBER_OF_FRAMES-eng: 37310
      NUMBER_OF_BYTES-eng: 3882306849
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      title           : Stereo
      BPS-eng         : 1536000
      DURATION-eng    : 00:25:56.140000000
      NUMBER_OF_FRAMES-eng: 46685
      NUMBER_OF_BYTES-eng: 298778880
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 1536000
      DURATION-eng    : 00:25:56.140000000
      NUMBER_OF_FRAMES-eng: 46685
      NUMBER_OF_BYTES-eng: 298778880
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 00:25:56.160000000
      NUMBER_OF_FRAMES-eng: 48630
      NUMBER_OF_BYTES-eng: 37347840
      SOURCE_ID-eng   : 001102
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:4(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 00:25:56.160000000
      NUMBER_OF_FRAMES-eng: 48630
      NUMBER_OF_BYTES-eng: 37347840
      SOURCE_ID-eng   : 001103
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:5(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 00:25:56.160000000
      NUMBER_OF_FRAMES-eng: 48630
      NUMBER_OF_BYTES-eng: 37347840
      SOURCE_ID-eng   : 001104
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-07-17 00:44:03
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[08:40:58] scan: decoding previews for title 14
[08:40:58] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch) (1536 kbps)
[08:40:58] scan: audio 0x2: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch) (1536 kbps)
[08:40:58] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
[08:40:58] scan: audio 0x4: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
[08:40:58] scan: audio 0x5: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
[08:40:59] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/242/242, aspect 16:9, PAR 1:1
[08:40:59] scan: supported video decoders: avcodec qsv
[08:40:59] libhb: scan thread found 1 valid title(s)
[08:40:59] Starting Task: Encoding Pass
[08:40:59] work: track 1, compression level not supported by codec
[08:40:59] work: track 2, compression level not supported by codec
[08:40:59] job configuration:
[08:40:59]  * source
[08:40:59]    + /mnt/wwn-0x500003965b8027f3-part1/TV/The Twilight Zone (1959) - S01E14.mkv
[08:40:59]    + title 14, chapter(s) 1 to 5
[08:40:59]    + container: matroska,webm
[08:40:59]    + data rate: 23614 kbps
[08:40:59]  * destination
[08:40:59]    + /mnt/wwn-0x5000cca27ee158e1/The Twilight Zone (1959) - S01E14.mp4
[08:40:59]    + container: MPEG-4 (libavformat)
[08:40:59]      + optimized for HTTP streaming (fast start)
[08:40:59]      + chapter markers
[08:40:59]  * video track
[08:40:59]    + decoder: h264
[08:40:59]    + filters
[08:40:59]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[08:40:59]      + Decomb (mode=39)
[08:40:59]      + Framerate Shaper (mode=2:rate=27000000/450000)
[08:40:59]        + frame rate: 23.976 fps -> peak rate limited to 60.000 fps
[08:40:59]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=242:crop-right=242)
[08:40:59]        + source: 1920 * 1080, crop (0/0/242/242): 1436 * 1080, scale: 1280 * 720
[08:40:59]    + Output geometry
[08:40:59]      + storage dimensions: 1280 x 720
[08:40:59]      + pixel aspect ratio: 359 : 480
[08:40:59]      + display dimensions: 957 x 720
[08:40:59]    + encoder: H.264 (libx264)
[08:40:59]      + preset:  placebo
[08:40:59]      + options: threads=8
[08:40:59]      + profile: high
[08:40:59]      + level:   3.1
[08:40:59]      + quality: 23.00 (RF)
[08:40:59]      + color profile: 1-1-1
[08:40:59]  * audio track 1
[08:40:59]    + name: Stereo
[08:40:59]    + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[08:40:59]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[08:40:59]    + mixdown: Stereo
[08:40:59]    + dither: triangular
[08:40:59]    + encoder: AAC (libavcodec)
[08:40:59]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:40:59]  * audio track 2
[08:40:59]    + name: Stereo
[08:40:59]    + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[08:40:59]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[08:40:59]    + mixdown: Stereo
[08:40:59]    + dither: triangular
[08:40:59]    + encoder: AC3 (libavcodec)
[08:40:59]      + bitrate: 640 kbps, samplerate: 48000 Hz
[08:40:59] sync: expecting 37310 video frames
[08:40:59] encx264: min-keyint: 24, keyint: 240
[08:40:59] encx264: encoding at constant RF 23.000000
[08:40:59] encx264: unparsed options: threads=8:level=3.1:ref=5:bframes=16:b-adapt=2:direct=auto:analyse=all:me=tesa:merange=24:subme=11:trellis=2:fast-pskip=0:vbv-bufsize=17500:vbv-maxrate=17500:rc-lookahead=60
x264 [info]: using SAR=359/480
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 3.1
[08:40:59] sync: first pts video is 0
[08:40:59] sync: "Chapter 1" (1) at frame 1 time 0
[08:40:59] sync: first pts audio 0x1 is 0
[08:40:59] sync: first pts audio 0x1 is 0
[08:50:40] sync: "Chapter 2" (2) at frame 5328 time 19996226
[09:07:24] sync: "Chapter 3" (3) at frame 16510 time 61970658
[09:36:12] sync: "Chapter 4" (4) at frame 35041 time 131531400
[09:37:36] sync: "Chapter 5" (5) at frame 35665 time 133873740
[09:40:11] reader: done. 1 scr changes
[09:40:26] work: average encoding speed for job is 10.484025 fps
[09:40:26] comb detect: heavy 0 | light 0 | uncombed 37310 | total 37310
[09:40:26] decomb: deinterlaced 0 | blended 0 | unfiltered 37310 | total 37310
[09:40:26] vfr: 37310 frames output, 0 dropped and 0 duped for CFR/PFR
[09:40:26] vfr: lost time: 0 (0 frames)
[09:40:26] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:40:26] pcm_s16le-decoder done: 46685 frames, 0 decoder errors
[09:40:26] pcm_s16le-decoder done: 46685 frames, 0 decoder errors
[09:40:26] h264-decoder done: 37310 frames, 0 decoder errors
[09:40:26] sync: got 37310 frames, 37310 expected
[09:40:26] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:237   Avg QP:20.69  size: 93769
x264 [info]: frame P:6274  Avg QP:24.23  size: 27247
x264 [info]: frame B:30799 Avg QP:27.07  size:  8674
x264 [info]: consecutive B-frames:  1.0%  0.5%  1.6%  4.3% 10.3% 59.6%  8.9%  2.4%  2.6%  3.3%  2.0%  1.6%  0.6%  0.3%  0.1%  0.1%  0.8%
x264 [info]: mb I  I16..4:  8.8% 82.2%  9.0%
x264 [info]: mb P  I16..4:  0.4%  5.8%  0.4%  P16..4: 38.9% 34.0% 10.1%  1.0%  0.1%    skip: 9.4%
x264 [info]: mb B  I16..4:  0.0%  1.6%  0.0%  B16..8: 43.0%  8.8%  1.1%  direct: 2.4%  skip:43.1%  L0:47.8% L1:48.9% BI: 3.3%
x264 [info]: 8x8 transform intra:90.9% inter:69.3%
x264 [info]: direct mvs  spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 91.2% 0.0% 0.0% inter: 14.2% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 25% 24%  6% 45%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  4%  5%  5% 12% 18% 14% 17% 11% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6%  7%  3% 10% 16% 14% 17% 11% 16%
x264 [info]: i8c dc,h,v,p: 98%  2%  0%  0%
x264 [info]: Weighted P-Frames: Y:24.1% UV:0.0%
x264 [info]: ref P L0: 49.3% 12.0% 21.0%  8.0%  7.7%  2.0%  0.0%
x264 [info]: ref B L0: 74.7% 17.8%  6.1%  1.3%
x264 [info]: ref B L1: 92.5%  7.5%
x264 [info]: kb/s:2366.47
[09:40:27] mux: track 0, 37310 frames, 460308865 bytes, 2366.35 kbps, fifo 2048
[09:40:27] mux: track 1, 72945 frames, 31062390 bytes, 159.69 kbps, fifo 4096
[09:40:27] mux: track 2, 48629 frames, 124490240 bytes, 639.98 kbps, fifo 2048
[09:40:27] Finished work at: Mon Jul 20 09:40:27 2020
sr55 commented 4 years ago

How are you determining that the output mp4 file does not have chapters?

Also, can you confirm that your are NOT using the HandBrake build in the Ubuntu Repo. I.e you are using the PPA build we provide or flatpak.

justinbrinton commented 4 years ago

I am using the video player on ubuntu and the plex server video player. Both recognize the chapters in the mkv file, neither recognize the chapters in the mp4 file.

I am using the ppa here, which I believe is the ppa provided on this github. http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu

Edit: Based on your comment that made me do further research. The chapters do appear on my apple device using the outputted mp4 file. This might be an ubuntu player specific issue and not related to HandBrake. You can close this issue if you would agree.

sr55 commented 4 years ago

The log indicates the file appears to be fine and the fact Apple Players are working suggests that indeed it's a player problem.

DNLA and Web Based UI's might be problematic. Plex app standalone I'd have thought would be fine unless served over a network.