Page 1 of 1

Extract chapters from MPLS file

Posted: Mon Mar 04, 2019 1:19 pm
by admin
Guest 2 wrote:
Mon Mar 04, 2019 3:08 am
On next iteration of parser, please consider chapter extraction too.
Does the chapter file info generated by DJATOM's tool match what you are looking for? Here is an example of its output:

CHAPTER00=00:00:00.000
CHAPTER00NAME=
CHAPTER01=00:01:13.824
CHAPTER01NAME=
CHAPTER02=00:02:34.863
CHAPTER02NAME=

I generated that from an MVC bluray 00000.mpls using the tool (only one I had lying around). Not sure why there are no names.

What will be done with this chapter info?

Re: Extract chapters from MPLS file

Posted: Tue Mar 05, 2019 6:11 am
by Guest 2
admin wrote:
Mon Mar 04, 2019 1:19 pm
Does the chapter file info generated by DJATOM's tool match what you are looking for? Here is an example of its output
That is a txt type of chapters and it's ok. It can be xml too. Currently I am using eac3to to extract from BD and MKVExtract for MKV containers (which DGIndexNV already deal with).
admin wrote:
Mon Mar 04, 2019 1:19 pm
What will be done with this chapter info?
To mux a mkv with chapters when creating video to be played from non BD devices :)

Re: Extract chapters from MPLS file

Posted: Tue Mar 05, 2019 12:09 pm
by admin
OK, thank you.

Re: Extract chapters from MPLS file

Posted: Mon Mar 11, 2019 7:08 pm
by admin
Help me out, guys, I'm confused. I ran DJATOM's tool on the Alien 1 rip and it generated a whole bunch of EPxx.txt files, one of which looks like this:

CHAPTER00=00:00:00.000
CHAPTER00NAME=
CHAPTER01=00:00:07.591
CHAPTER01NAME=

My questions:

1. Why are all these files generated? It's a movie so it doesn't have episodes. Why isn't
a single file used?

2. Why are the name fields blank?

3. How will these files actually be used, as in what are the tools and process?

Re: Extract chapters from MPLS file

Posted: Mon Mar 11, 2019 8:36 pm
by Guest
The name fields are blank because this is to be filled in when merging with a file (non BD), i.e. MKV
They tend not to have names in a BluRay movie that I have noticed

Merged together with video, audio, etc for file playback like MKV.
Some people name the chapters for better seeking I guess

Why does it think it is a bunch of episodes?
I don't know, authoring issues maybe

If you wish I can try a couple of discs tomorrow

Re: Extract chapters from MPLS file

Posted: Mon Mar 11, 2019 8:45 pm
by Guest
Just read the usage info for DJAtom's tool'
Since Alien is a seemless branching movie it thinks that every m2ts is a separate episode and the mpls is a sort of playall playlist

Re: Extract chapters from MPLS file

Posted: Mon Mar 11, 2019 9:36 pm
by admin
gonca wrote:
Mon Mar 11, 2019 8:45 pm
Just read the usage info for DJAtom's tool'
Since Alien is a seemless branching movie it thinks that every m2ts is a separate episode and the mpls is a sort of playall playlist
OK, thank you for the explanation. But then the tool should be smart enough to know that and operate accordingly.

Re: Extract chapters from MPLS file

Posted: Tue Mar 12, 2019 7:00 am
by Guest 2
admin wrote:
Mon Mar 11, 2019 7:08 pm
Help me out, guys, I'm confused. I ran DJATOM's tool on the Alien 1 rip and it generated a whole bunch of EPxx.txt file
Use eac3to with a GUI. One file only will be generated.

The chapters.txt or .xml is then fed to MKVToolnix GUI to replicate same chapter structure in muxed output mkv (of course this is useful when you convert a BD to x264/x265 plus multiple audio and srt). You just need to drag and drop like other files in the upper blank window space and it will be recognized as such.

Re: Extract chapters from MPLS file

Posted: Tue Mar 12, 2019 7:29 am
by admin
Got it, thank you. I will try to emulate what EAC3TO is doing.

Re: Extract chapters from MPLS file

Posted: Tue Mar 12, 2019 8:53 am
by DJATOM
Yeah, my script tuned for my usecase (anime blurays with 2-3 episodes per volume), and I rarely make anime movies, so I didn't run on that scenario (seemless branching, etc). If eac3to produces desired output, indeed it's better to use that approach.

Re: Extract chapters from MPLS file

Posted: Tue Mar 12, 2019 10:23 pm
by admin
Understood, DJ. Your code is very useful to me and I'll extend it to support branching. Thank you.

Re: Extract chapters from MPLS file

Posted: Tue Mar 19, 2019 4:39 pm
by admin
I have DGIndexNV extracting chapters now that match EAC3TO for Guest 2's Aliens rip. In order not to complicate the UI, a chapters file is automatically created when an MPLS is opened.

Before giving a test version, I want to ask DJATOM if he can provide or refer me to a bluray that has multiple episodes such that his parser is applicable. I can then ensure that it will also be supported.

Hats off to Jarrett Vance, whose Chapter Grabber code showed how to do it.

https://code.google.com/archive/p/chapt ... ult/source

Re: Extract chapters from MPLS file

Posted: Thu Mar 21, 2019 1:05 pm
by admin
Thanks to DJATOM for providing a Japanese-style rip suitable for his parsing tool. :salute:

I slipstreamed a first step supporting normal chapters as output by EAC3TO. I hope to support DJATOM's case in a future version. It will require UI changes, whereas this first step does not.

Re: Extract chapters from MPLS file

Posted: Thu Mar 21, 2019 1:30 pm
by Guest 2
admin wrote:
Tue Mar 19, 2019 4:39 pm
I have DGIndexNV extracting chapters now that match EAC3TO for Guest 2's Aliens rip. In order not to complicate the UI, a chapters file is automatically created when an MPLS is opened.
Thanks @admin!

Don't you think it's better to save chapters when saving DGI? We could give path and save only when interested and not anytime you open a mpls.

Re: Extract chapters from MPLS file

Posted: Thu Mar 21, 2019 1:42 pm
by admin
It might be better but I don't think it's worth the effort. I already parse the MPLS on open, so that's a fine time to write the chapters file. Maybe it will change when I implement DJATOM's use case.

Re: Extract chapters from MPLS file

Posted: Mon Apr 01, 2019 7:24 pm
by admin
After some thought I decided to generate it as Guest 2 suggested, i.e., when the project is saved. The chapters file is generated in the same directory as the DGI file. This will be in the next slipstream.

The main reason is that (I think) when a bluray is decrypted with anydvd the playlist directory is not writable, so the chapter file generation would fail.

Re: Extract chapters from MPLS file

Posted: Fri Aug 30, 2019 11:50 pm
by dmcs
When I indexed an .mpls file via CLI, the chapter file generated at the end of the process looks like this:

CHAPTER01=00:00:00.000
CHAPTER01NAME=
CHAPTER03=00:05:59.359
CHAPTER03NAME=
CHAPTER05=00:09:51.633
CHAPTER05NAME=
CHAPTER07=00:15:51.742
CHAPTER07NAME=
CHAPTER09=00:18:36.449
CHAPTER09NAME=
CHAPTER11=00:23:19.523
CHAPTER11NAME=
CHAPTER13=00:27:44.705
CHAPTER13NAME=

Is this normal?

Re: Extract chapters from MPLS file

Posted: Sat Aug 31, 2019 6:06 am
by admin
Can you tell me what you think is wrong? And is it different from when you demux via the GUI?

Re: Extract chapters from MPLS file

Posted: Sat Aug 31, 2019 1:49 pm
by dmcs
admin wrote:
Sat Aug 31, 2019 6:06 am
Can you tell me what you think is wrong? And is it different from when you demux via the GUI?
Demux via GUI and CLI gave the same output.
Anw, I thought the chapter file template needs to go from 0 -> 1 -> 2 etc. Turns out, it doesn't matter.

Re: Extract chapters from MPLS file

Posted: Sat Aug 31, 2019 2:43 pm
by admin
OK, thank you dmcs, let me look into that, even if it doesn't matter.