View Full Version : is adding chapters to bdmv rocket science or "advanced"? "basic" feature, right?


JediFonger
3rd August 2026, 07:44
howdy ya'll!

my goal is to shrink zack snyder's justice league 2xbd50s i own to 1x bd50. yesh i know i am that lazy! but on my nas the combined remux is only a few gb/hair over bd50. plus it was more the challenge of it that excited me to try to tackle this. so i'm not a super experienced encoder at all, i'm a handbrake gui user at best.... before gen ai. having gen ai has allowed me to really dip into this hobby way more than i thought i would be getting, ok enough background. i've completed a handful of bd25/50s compliant discs, so not a 100% complete newbie.

since the dual bd50s of the movie is already bd compliance, i figured the only thing i'd be doin is shrinking filesize down a hair and spitting back out a decent bd50 file, mux it burn and away we go right? during the many iterations w/gen-ai, i've got a working compliant video that checks all the boxes for me.... EXCEPT chapter marks. meaning, when i use tsmuxer (2.11, 2.7.2, 2.7.0, cli or gui) on all permutations, i can get the bdmv to play on my htpc w11's powerdvd19 fine, the bd starts, but when i fast foward, nothing happens same with rewind. when i skip to next chapter the disc restarts back to beginning. now when i play the same bdmv folder w/mpc-c everytrhing works perfectly. and yes i have burned it on bd50 re and same behavior across sony, pany, lg 4k players. same behavior. i figure if i can pass powerdvd, the hw should behave the same.

the below is gen ai-written w/more technical details, but i feel like i'm butting up against some hallucination/ai limitations where now i need some actual human expertise. the very last few iterations/cycles we were trying to explore how to manually sequester idf to allow chapters to land appropriate:
ffmpeg -i "zsjl.remux.mkv" -map 0:v:0 -c:v libx264 -crf 13.4 -preset slow -profile:v high -level:v 4.1 -x264opts "bluray-compat=1:bframes=3:b-pyramid=0:weightp=1:keyint=24:min-keyint=1:ref=4:vbv-maxrate=35000:vbv-bufsize=26250" -force_key_frames "expr:gte(t,n_forced*10),00:08:54.908,00:19:56.737,00:36:54.503,00:41:32.030,00:50:18.639,00:58:42.643,01:08:35.569,01:20:27.823,01:30:05.314,01:40:28.604,01:51:24.011,01:59:06.930,02:07:56.292,02:21:58.509,02:29:50.104,02:37:27.271,02:48:36.354,02:53:19.513,03:09:54.091,03:21:28.950,03:34:12.004,03:40:10.030,03:50:47.458,03:53:27.033" -an -sn -y "zsjl.mkv"

^that feels like it's a hammering around the issue vs. trying to resolve it. any tips for me? i think the gen-ai started to recommend multiavchd as well, i mean i suppose i ought to learn that at some point, but i feel like this should be somn simple, right? i've already successfully completed a few bd25/50s without any of these issues, but the longest they were was around 2h40m.

is there somn about the length (4hrs) that bd50 specs is balking at?


Subject: tsMuxeR 2.11 — no seeking/chapter skip on BD-50, EP_MAP fine entries = 0 (4hr film)

Hi all,

I'm trying to author a single BD-50 combining both discs of Zack Snyder's Justice League (4:02:15 runtime). Video was re-encoded with x264 CRF 13.4 for size, audio is AC3 core extracted from TrueHD+Atmos, subtitles are PGS. tsMuxeR completes successfully and the disc plays on all players, but seeking, fast-forward, rewind, and chapter skip all fail — any seek operation resets to 0:00.

Environment:

tsMuxeR 2.11.0 (git-37fa670), justdan96 fork
Source video: x264, High@4.1, 1920x1080p, 23.976fps, keyint=240, min-keyint=23, bluray-compat=1, bframes=3, b-pyramid=0
Same workflow works fine on shorter films (e.g. 2h43m) — issue appears specific to this 4hr+ runtime
tsMuxeR meta used:

MUXOPT --new-audio-pes --blu-ray --vbr --vbv-len=250
V_MPEG4/ISO/AVC, "zsjl.mkv", track=1, lang=und
A_AC3, "zsjl DELAY -18ms.thd+ac3", lang=eng, default
S_HDMV/PGS, "zsjl.sup", default=all, fps=23.976, lang=eng

CLPI analysis:
Inspected 00000.clpi directly. The EP_Map section exists (82 bytes, 1 stream registered, PID 0x4F40) but has 1 coarse entry and 0 fine entries. Fine entries are what players use for seeking. The CLPI file is only 380 bytes total — far too small for a 4hr film.

Things already tried — all produce identical result (0 fine EP entries):

--insertSEI --enableNALDecodingCache
--split-duration=7676 (splits at ~2hr mark)
--vbv-len=250 and --vbv-len=500
Removing --no-pcr-on-video-pid
Removing --custom-chapters entirely
Bare minimum meta with no options at all
Feeding raw .h264 elementary stream instead of MKV (tsMuxeR reads 0 video frames from it due to SEI NAL appearing before SPS — separate issue)
Note on keyframe/chapter alignment:
With keyint=240 at 23.976fps, IDRs occur every ~10 seconds. Only 9 of 25 chapter timestamps fall within 1 second of an IDR frame. Could tsMuxeR's fine EP entry generation be failing because it can't find IDRs near the chapter marks? Would re-encoding with keyint=24 and -force_key_frames at each chapter boundary fix this, or is that unrelated to the EP_MAP fine entry population?

Any insight appreciated — is this a known tsMuxeR limitation with long streams, and is there a recommended workaround?

Thanks

Emulgator
3rd August 2026, 13:06
--start-time=524250
Why ?
https://forum.doom9.org/showthread.php?p=1916110&highlight=start-time#post1916110

JediFonger
5th August 2026, 20:53
still not workin for me, got no clue why.

on both 2.7.0, 2.7.2 and 2.13 tsmuxers.

should i downgrade to older builds to try?

my meta file:
MUXOPT --new-audio-pes --blu-ray --vbr --vbv-len=250 --start-time 524280
V_MPEG4/ISO/AVC, "zsjl_demux\zsjl.264", lang=und, pid=0x1011
A_AC3, "zsjl DELAY -18ms.thd+ac3", lang=eng, default, pid=0x1100
S_HDMV/PGS, "zsjl.sup", default=all, fps=23.976, lang=eng, pid=0x1200


--start-time=524250
Why ?
https://forum.doom9.org/showthread.php?p=1916110&highlight=start-time#post1916110

JediFonger
7th August 2026, 23:30
case closed? the steps i used to fix it is at the tail end:

but here is what my agi told me was the "fix":
The fix was a combination of three things that all had to be right simultaneously:

1. keyint=24 instead of keyint=240
x264 needs to emit IDR frames densely enough for tsMuxeR to build the EP_Map seek index. At keyint=240 there was only one IDR every ~10 seconds — too sparse. At keyint=24 there's one every ~1 second (~14,535 IDRs total), giving players a fine seek entry every second.

2. bluray-compat=1 must be kept
This was the trickiest discovery. bluray-compat=1 adds VUI timing info (nal_hrd=vbr) to the SPS in the bitstream. tsMuxeR 2.13.3 requires that timing info in the SPS to compute PTS values for each EP entry. Without it (our "no bluray-compat" attempt), the SPS was only 41 bytes with no timing info — tsMuxeR silently produced 0 fine EP entries every time.

3. Elementary stream .264 input instead of MKV
Even with correct IDR density and correct SPS, feeding tsMuxeR an MKV container always produced 0 fine EP entries. tsMuxeR's EP_Map builder only works reliably from a raw Annex B .264 elementary stream. Using -bsf:v h264_mp4toannexb in ffmpeg outputs that directly, skipping the intermediate MKV and tsMuxeR demux step entirely.

All three had to be true at once — any one of them missing and the CLPI came out broken at 380 bytes.

1. list all trackIDs from original mkv remux:
mkvmerge --identify Zack.Snyders.Justice.League.2021.1080p.Remux.AVC.TrueHD.7.1.mkv

2. extract audio:
mkvextract "Zack.Snyders.Justice.League.2021.1080p.Remux.AVC.TrueHD.7.1.mkv tracks" 1:zsjl.thd

3. extract subtitle:
mkvextract "Zack.Snyders.Justice.League.2021.1080p.Remux.AVC.TrueHD.7.1.mkv" tracks 2:"zsjl.sup"

4. combine truehd/atmos into a single file:
eac3to "zsjl.thd" "zsjl.thd+ac3"

5. shrinkg filesize via crf (maybe other options):
ffmpeg -i "Zack.Snyders.Justice.League.2021.1080p.Remux.AVC.TrueHD.7.1.mkv" -map 0:v:0 -c:v libx264 -crf 14.5 -preset slow -profile:v high -level:v 4.1 -x264opts "bluray-compat=1:bframes=3:b-pyramid=0:weightp=1:keyint=24:min-keyint=1:ref=4:vbv-maxrate=35000:vbv-bufsize=26250" -an -sn -bsf:v h264_mp4toannexb -y "zsjl.264" 2> "zsjl_encode.log"

6. extract chapter timecoes: (mkvinfo "zsjl.mkv" | Select-String "Chapter time start:" | ForEach-Object {($_ -split ": ", 2)[1].Substring(0, 12)}) -join ","

7. using tsmuxer gui, add zsjl.264, zsjl.thd+ac3, zsjl.sup, and add timecodes in via either gui or meta file under --custom-chapters

MUXOPT --no-pcr-on-video-pid --new-audio-pes --blu-ray --vbr --custom-chapters=00:00:00.000;00:08:54.908;00:19:56.737;00:36:54.503;00:41:32.030;00:50:18.639;00:58:42.643;01:08:35.569;01:20:27.823;01:30:05.314;01:40:28.604;01:51:24.011;01:59:06.930;02:07:56.292;02:21:58.509;02:29:50.104;02:37:27.271;02:48:36.354;02:53:19.513;03:09:54.091;03:21:28.950;03:34:12.004;03:40:10.030;03:50:47.458;03:53:27.033 --vbv-len=500
V_MPEG4/ISO/AVC, "zsjl.264", lang=und
A_AC3, "zsjl.thd+ac3", lang=eng, default
S_HDMV/PGS, "zsjl.sup", default=all, fps=23.976, lang=eng