Open Daniel-Abrecht opened 3 years ago
The following seams to work, kind of:
diff --git a/bluray_copy.c b/bluray_copy.c
index 07a18d1..4329b0a 100644
--- a/bluray_copy.c
+++ b/bluray_copy.c
@@ -294,7 +294,7 @@ int main(int argc, char **argv) {
}
// Init bluray_title struct
- retval = bluray_title_init(bd, &bluray_title, bluray_title.ix, angle_ix);
+ retval = bluray_title_init(bd, &bluray_title, bluray_title.ix, angle_ix, opt_playlist_number ? arg_playlist_number : -1);
// Quit if title / playlist couldn't be opened
if(retval) {
diff --git a/bluray_info.c b/bluray_info.c
index 01c088b..5cc46af 100644
--- a/bluray_info.c
+++ b/bluray_info.c
@@ -379,7 +379,7 @@ int main(int argc, char **argv) {
for(ix = d_first_ix; d_title_counter < d_num_titles; ix++, d_title_counter++) {
- retval = bluray_title_init(bd, &bluray_title, ix, angle_ix);
+ retval = bluray_title_init(bd, &bluray_title, ix, angle_ix, d_playlist_number ? arg_playlist_number : -1);
// Skip if there was a problem getting it
if(retval)
diff --git a/bluray_open.c b/bluray_open.c
index 26f4e8b..7fc068e 100644
--- a/bluray_open.c
+++ b/bluray_open.c
@@ -82,7 +82,7 @@ int bluray_info_init(struct bluray *bd, struct bluray_info *bluray_info) {
/**
* Initialize and populate a bluray_title struct
*/
-int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint32_t title_ix, uint8_t angle_ix) {
+int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint32_t title_ix, uint8_t angle_ix, int64_t playlist) {
// Initialize to safe values
bluray_title->ix = title_ix;
@@ -115,7 +115,11 @@ int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint
// Quit if couldn't get title info
BLURAY_TITLE_INFO *bd_title = NULL;
- bd_title = bd_get_title_info(bd, title_ix, angle_ix);
+ if(playlist >= 0){
+ bd_title = bd_get_playlist_info(bd, playlist, angle_ix);
+ }else{
+ bd_title = bd_get_title_info(bd, title_ix, angle_ix);
+ }
if(bd_title == NULL)
return 3;
diff --git a/bluray_open.h b/bluray_open.h
index 6932271..3eb10ef 100644
--- a/bluray_open.h
+++ b/bluray_open.h
@@ -70,6 +70,6 @@ struct bluray_chapter {
int bluray_info_init(struct bluray *bd, struct bluray_info *bluray_info);
-int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint32_t title_ix, uint8_t angle_ix);
+int bluray_title_init(struct bluray *bd, struct bluray_title *bluray_title, uint32_t title_ix, uint8_t angle_ix, int64_t playlist);
#endif
With this patch, the title number still seams wrong (not sure what it's even supposed to be here), but at least all the other data seams correct:
$ ./bluray_info /BD_MADEINABYSS1D1/ -p 17 -x
Disc title: 'Made in Abyss -- Staffel 1 - Disk 1', Volume name: '', Main title: 007, AACS: no, BD-J: no, BD+: no
Title: 001, Playlist: 0017, Length: 00:23:45.591, Chapters: 004, Video streams: 01, Audio streams: 02, Subtitles: 02, Angles: 01, Filesize: 00068 MBs
Video: 01, Format: 1080p, Aspect ratio: 16:9, FPS: 23.97, Codec: h264
Audio: 01, Language: deu, Codec: dtshd-ma, Format: stereo, Rate: 48
Audio: 02, Language: jpn, Codec: dtshd-ma, Format: stereo, Rate: 48
Subtitle: 01, Language: deu
Subtitle: 02, Language: deu
Chapter: 001, Start: 00:00:00.000, Length: 00:01:58.744
Chapter: 002, Start: 00:01:58.744, Length: 00:11:02.245
Chapter: 003, Start: 00:13:00.989, Length: 00:08:53.366
Chapter: 004, Start: 00:21:54.355, Length: 00:01:51.236
I saw this with the BluRay
Made in Abyss - Staffel 1.Vol.1 Limited Collector's Edition
, (the Germen version). There has been a playlist which I can use withffmpeg
andffprobe
, but for whichbluray_info
fails. (ffmpeg uses libbluray too.)To find the right playlist of a bluray, I have a small script which uses
vlc
,strace
andgrep
such that it outputs any playlist vlc opens immediatly:This way, I determined that after selecting to play the whole movie in the bluray menu in
vlc
, the playlists 11, 12, 13, 14, 15, 16 and 17 get played one after the other. The problem is, I can't select playlist 17 withbluray_info
, it selects title 1 playlist 1 instead.Here is what I found so far:
ffprobe
doesn't list playlist 17 as a usable playlist, but selecting it works correctly (same with ffmpeg):Here is what I get with
bluray_info
:Another interesting thing I found is, that if I select a specific episode in the bluray menu in vlc, then it returns to the menu after playing it, and it uses different playlists in that case (playlist 4 instead of 11, playlist 10 instead of 17, and so on). The interesting thing about this is, playlist 4 and 11 for example, are listed in bluray_info and ffprobe. playlist 10 is listed too (and can be selected bluray_info). But while playlist 4 and 11 slightly differ, playlist 10 and 17 (the last episode, so both return to the menu) are identical. I compared the 2 mpls files using the
diff
utility, they have the same content.For completeness sake, here is the bluray_info output for playlist 10:
It would be great if bluray_info could be made to output the info for the correct playlist in these circumstances, or if it could at least check that the information it outputs are for the correct playlist.