Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
24th September 2023, 14:29 | #1 | Link |
Registered User
Join Date: Mar 2021
Location: Germany
Posts: 11
|
How can i extract DVD Chapter titles using libdvdread or libdvdnav?
Hello everyone,
I am currently working on a cross-platform DVD Ripper built on top of libdvdread and libdvdnav and i have noticed that MakeMKV can extract "proper" chapter names from certain DVDs (Zentrix Volume 1 Disc 1 in this case) which are apparently stored in VIDEO_TS.IFO (see attached screenshot) but have not found a way to get them using VLC's libdvdread or libdvdnav (and opening the ISO in VLC also does not show the chapter names). If anyone has any pointer towards where i could find more info on how and where they are stored i would greatly appreciate that. Best regards, Earthnuker Last edited by Earthnuker; 24th September 2023 at 16:00. |
25th September 2023, 12:59 | #2 | Link |
Registered User
Join Date: Mar 2021
Location: Germany
Posts: 11
|
After some messing around with ifoEdit i figured it out:
Code:
- open VIDEO_TS.IFO (DVDOpenFile(handle, 0, dvd_read_domain_t::DVD_READ_INFO_FILE)) - seek to offset 0xd4 - read a 32-bit big endian unsigned integer (U32BE) - seek to that offset in blocks (offset*2048 in bytes) - skip 0xc bytes (company ID) - read number of language units as U32BE - read end_byte offset as U32BE - for each language unit - read 1 U16BE (language code) - skip 6 bytes (unknown) - for each language unit - skip 4 + 2 + 2 + 9 * 20 + 16 = 204 bytes - read num_entries as U16BE - skip 2 bytes - check if num_entries is even (if not throw error?) - divide num_entries by 2 (reserved) - for each entry: - read entry_type U32LE - skip 4 byte (unknown) - read tab (0x9) separated strings until you've reached position offset+end_byte - 0x1 for disc - 0x2 for feature title - 0x4 for chapter title - 0x46 for ??? (contians "Spruce0200MenuGPRM03ITag b68" in my case)
__________________
Hack the planet! |
25th September 2023, 23:18 | #3 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,696
|
You may go from there:
http://mpucoder.com/DVD/ifo.html
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
26th September 2023, 07:37 | #4 | Link | |
Registered User
Join Date: Mar 2021
Location: Germany
Posts: 11
|
Quote:
__________________
Hack the planet! |
|
27th September 2023, 12:45 | #5 | Link |
Matroska find' ich toll
Join Date: Apr 2008
Posts: 1,412
|
Hi Earthnuker
That is very interesting and I have never found such info while I wrote my own IFO parser. Could you imagine to share with me the DVD you had mentioned? Or if the entire DVD is to much, the IFO files would be also helpful. |
28th September 2023, 14:44 | #6 | Link | |
Registered User
Join Date: Mar 2021
Location: Germany
Posts: 11
|
Quote:
__________________
Hack the planet! |
|
30th September 2023, 20:55 | #8 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,696
|
DVD Architect Pro allows for named chapters, once I find time I can make some test projects.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
6th October 2023, 21:02 | #9 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,696
|
Well, DVD-A 7.0 does not seem to render the chapter names from its timeline window into the VIDEO_TS.IFO
I can input up to 39 characters per Chapter, even Unicode symbols (musical notes) were accepted, except the first chapter 1, this can not be named. After rendering and opening with MakeMKV only standard names are assigned : Chapter 01, Chapter 02... DVDLabPro2: One cannot enter chapter names there anyway. MakeMKV shows the same.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
6th October 2023, 21:22 | #10 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,696
|
Just downloaded Earthnuker's VIDEO_TS.IFO.
BTW, good find, Earthnuker. Did not go through all steps but the concatenation of all strings at the end indeed tells that applying the calculated offsets one should be able to parse following your procedure in post #2.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 6th October 2023 at 21:25. |
Tags |
dvd, dvd ripper |
Thread Tools | Search this Thread |
Display Modes | |
|
|