Chapters in MKV file don't display in chapters tab

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
danhi
Posts: 23
Joined: Fri Nov 28, 2008 5:00 pm

Chapters in MKV file don't display in chapters tab

Post by danhi »

Please describe the problem in as much detail as possible:
I have two files, one that has metatags added with MetaX and one untagged. The untagged file shows the chapters in the chapters tab, but the tagged one does not, even though they show up in VLC and MPC-HC. Plus when I dump them with mkvinfo, they look correct. You cand download the files at http://www.danhinsley.com/downloads/BadChapters.mkv and http://www.danhinsley.com/downloads/GoodChapters.mkv

What are the steps to reproduce this problem:
Just open the BadChapters.mkv and go to the Chapters tab, there should be 3 chapters but it just shows one with the entire duration.

What version of HandBrake you are running:
.10.5.0

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 7

If there was any exception or error displayed, please copy it and paste it here:
No

Please include the scan or encode log:

Code: Select all

 HandBrake 0.10.5.0 - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
Ram: 6135 MB, 
GPU Information:
  ATI Radeon HD 3400 Series  - 8.850.0.0
Screen: 1680x1050
Temp Dir: C:\Users\DanHi\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\DanHi\AppData\Roaming\HandBrake Team\HandBrake\0.10.5.0

-------------------------------------------
[17:36:56] CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
[17:36:56]  - logical processor count: 8
[17:36:56] OpenCL: library not available
[17:36:56] Intel Quick Sync Video support: no
[17:36:56] hb_scan: path=C:\Downloads\Temp\PHOTOGRAPHY_DVD_1_t00.mkv, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Downloads\Temp\PHOTOGRAPHY_DVD_1_t00.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Downloads\Temp\PHOTOGRAPHY_DVD_1_t00.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Downloads\Temp\PHOTOGRAPHY_DVD_1_t00.mkv) failed
[17:36:56] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[17:36:56] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Downloads\Temp\PHOTOGRAPHY_DVD_1_t00.mkv':
  Metadata:
    TITLE           : Cool Hand Luke
    ARTIST          : Paul Newman, George Kennedy, Luke Askew, Morgan Woodward, Harry Dean Stanton, Dennis Hopper, Lou Antonio, Robert Drivas, Strother Martin, Jo Van Fleet, Clifton James, Marc Cavell, Richard Davalos, Robert Donner, J. D. Cannon, Joe Don Baker, James Gam...
    ACTOR           : Paul Newman, George Kennedy, Luke Askew, Morgan Woodward, Harry Dean Stanton, Dennis Hopper, Lou Antonio, Robert Drivas, Strother Martin, Jo Van Fleet, Clifton James, Marc Cavell, Richard Davalos, Robert Donner, J. D. Cannon, Joe Don Baker, James Gam...
    DIRECTOR        : Stuart Rosenberg
    PRODUCER        : Gordon Carroll, Carter De Haven Jr.
    SCREENPLAY_BY   : Frank Pierson, Donn Pearce
    PRODUCTION_STUDIO: Jalem Productions
    GENRE           : Drama, Crime
    DATE_RELEASED   : 1967-06-22
    DATE_RELEASE    : 1967-06-22
    CONTENT_TYPE    : Movie
    DESCRIPTION     : What we've got here is failure to communicate.
    SUMMARY         : What we've got here is failure to communicate.
    SYNOPSIS        : When petty criminal Luke Jackson is sentenced to two years in a Florida prison farm, he doesn't play by the rules of either the sadistic warden or the yard's resident heavy, Dragline, who ends up admiring the new guy's unbreakable will. Luke's bravado, even in the face of repeated stints in the prison's dreaded solitary confinement cell, "the box," make him a rebel hero to his fellow convicts and a thorn in the side of the prison officers.
    LAW_RATING      : PG
  Duration: 00:00:54.42, start: 0.000000, bitrate: 5233 kb/s
    Chapter #0.0: start 52.552000, end 54.421000
    Metadata:
      title           : Chapter 03
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 8:9 DAR 4:3], 6500 kb/s, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
    Stream #0.2: Attachment: mjpeg
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
[17:36:56] dxva2:DxFindVideoServiceConversion failed
[17:36:56] scan: decoding previews for title 1
[17:36:56] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
[17:36:57] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/0, aspect 4:3, PAR 8:9
[17:36:57] libhb: scan thread found 1 valid title(s)
 
Woodstock
Veteran User
Posts: 4015
Joined: Tue Aug 27, 2013 6:39 am

Re: Chapters in MKV file don't display in chapters tab

Post by Woodstock »

Are you sure the people who ripped and uploaded the file took the time to put chapters in MKV file? They spent a lot of time editing meta data, but may have forgotten chapters....
danhi
Posts: 23
Joined: Fri Nov 28, 2008 5:00 pm

Re: Chapters in MKV file don't display in chapters tab

Post by danhi »

I state in the post that both VLC and MPC-HC and MKVInfo all see the chapters, so they are definitely there.
danhi
Posts: 23
Joined: Fri Nov 28, 2008 5:00 pm

Re: Chapters in MKV file don't display in chapters tab

Post by danhi »

Anyone have a chance to look into this. I would think it would be fairly easy to debug into the code where it reads chapters and find out why the posted file is rejected.
danhi
Posts: 23
Joined: Fri Nov 28, 2008 5:00 pm

Re: Chapters in MKV file don't display in chapters tab

Post by danhi »

OK, if anyone cares, here's my current working theory by using an MKV file where Handbrake displays the chapters, then tagging it and Handbrake no longer displays the chapters. The difference is in the case where Handbrake displays the chapters, the chapters are before the first Cluster, in tagging, the chapters are moved to the end of the file and the Seek points to where the chapters are. So it appears to me that Handbrake isn't using the Seek entries to find chapters, and quits looking after it finds the first Cluster. The correct behavior is to use the Seek entries to locate the chapters, whether they are before or after the first Cluster. Note, this doesn't mean that it has to scan through all the Clusters, it just means that it should read the Seek entries to locate items, not just search through every item.

If anyone would like more information to look into this, I would be happy to provide it.
User avatar
Rodeo
HandBrake Team
Posts: 12714
Joined: Tue Mar 03, 2009 8:55 pm

Re: Chapters in MKV file don't display in chapters tab

Post by Rodeo »

This could be a libavformat demuxer bug. Can you provide a very shot sample (but with many dummy chapters, e.g. a 10-second file with a chapter every second) where HandBrake doesn't see the chapters?
Post Reply