justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
865 stars 147 forks source link

Ability to split by chapter #408

Open dikonov opened 3 years ago

dikonov commented 3 years ago

There are several almost useless split options, but no option to split output by chapter boundaries. Please, add!

Maybe, it is even possible to extract some meaningful human names for individual titles and chapters on a BD...

jcdr428 commented 3 years ago

@dikonov +1 splitting by chapter is a good idea. Most of the distributors use images rather than text for chapter names, IMHO extracting these names would be difficult.

dikonov commented 3 years ago

Even if it turns to be impossible to get the names, splitting by nameless numbered chapters would still be useful.

lighterowl commented 3 years ago

@jcdr428 It looks like the Blu-Ray structures themselves don't have any information about chapter names. I can't see any code in libbluray which would allow retrieving names. Similarly, mkvtoolnix (which has its own Blu-Ray parsing code as far as I remember) doesn't transfer chapter names when remuxing from BD to MKV. If you have any information about where to find names in the structures, please share, otherwise I'll just carry on without implementing support for names.

jcdr428 commented 3 years ago

Hi @xavery, some distributors such as Criterion or Masters of Cinemas include the chapter names in text files inside the JAR folder -see e.g. eng_us.txt from "Rosemary's Baby", resulting in the following menu: menu_rosemarys_baby_blu-ray_m01 menu_rosemarys_baby_blu-ray_m02 menu_rosemarys_baby_blu-ray_m03 menu_rosemarys_baby_blu-ray_m04

The way Criterion builds his menus via xml/txt files is interesting: much simpler than the BD-Java used by most large distributors; this would need a bit of analysis and work, but tsMuxer could create the same kind of menus by getting the chapter names from the web ditto ChapterGrabber, and even an image for each chapter from the video. This would be a really nice addition, maybe for v3.xx ;)