UniqProject / BDInfo

BDInfo from http://www.cinemasquid.com/blu-ray/tools/bdinfo
GNU Lesser General Public License v2.1
233 stars 58 forks source link

BDInfo does not create report #35

Open HolyGit12 opened 1 year ago

HolyGit12 commented 1 year ago

BDInfo does not create a report (does not save and does not show it) when the disc label contains a characters which cannot be written. This problem appears of course only when I open ISO-images.

Example: Create an ISO with ImgBurn and add as Volume Label (UDF) 'Test: 1'

The disc label contains a colon and cannot be used as filename. BDInfo will read the ISO but won't create a report.

You have to replace such characters by '-' or ' ' or eliminate them.

Hellboy00000 commented 1 year ago

I created an ISO with tsMuxwer, add a colon in disk label and work ok. What is the duration of your test file?

HolyGit12 commented 1 year ago

I tested with UHD. It was 60 GB I guess.

HolyGit12 commented 1 year ago

I also tried to generate the iso with tsMuxwer. But also for that iso no report is created.

Hellboy00000 commented 1 year ago

1) Try to extract the ISO and see if the folder work. 2) Share a sample. You can use the tool that "UniqProject" created "https://github.com/UniqProject/BDInfo/issues/24" to created the sample. Or share the "Test: 1" you created. 3) Try this. Uncheck in BDInfo settings -> Filter playlists with length (and then try the other Filter playlist)

HolyGit12 commented 1 year ago

Not sure whether we understand each other correctly. The iso works. BDInfo is scanning the files. I only cannot save a report. Not automatically and also not manually since the report form does not pop up.

I created two iso for testing. The 1st one is small. The second one the whole film https://www.dropbox.com/s/pke6tsisspsyuf9/Test%20-%202%20%28tsMuxer%29.iso?dl=0 https://www.dropbox.com/s/soieut9agomm6y0/Der%20Geist%20im%20Glas.iso?dl=0

They have the same problem with bitrate of 0 - fitting to your link. The second one has also an audio stream with a bitrate of 0 But this was not my original problem

Hellboy00000 commented 1 year ago

Ok. Yes the problem is the invalid characters. I found other 2 bug. The first is, BDInfo contain an exception code for this but never enter and the second is an invalid cross tread operation that happened few times.

I fixed the exception and the invalid characters. I upload a fixed version letter.

UniqProject commented 1 year ago

Hi guys,

just ran few tests with both ISO images. Reports work for both images, although for the full movie it must first read through the full movie to finish the basic detection. Bitrate detection works only for Dolby Digital stream though.

Hower, the files seem not to be fully BluRay compliant, because the headers for both AVC and MPEG2 streams are not detected as such in the MPEG Transport stream, and therefore the stream parsing code is not executed at all.

The stream infos listed in the list are only read from the playlists / clipinfo files.

Ran a reencode with handbrake and remuxed with TSmuxeR, both images are detected without any problem, regardless of the UDF label. However, reencoding just the video stream and remux using original audio streams from the full movie results in a similar problem. AVC and Dolby Digital streams detected, MPEG2 not.

Image 1 Initial Scan Image 1 Full Scan Image 1 Reencoded Image 2 Initial Scan Image 2 Full Scan Image 2 Reencoded

The MPEG TS parsing was written by the original author back in 2011 and only modified to support ISO images by me. It still may contain bugs, however none of commercially mastered BluRay discs I came across until now had this problem.

Will have a closer look at the code, but it has a very low priority for now.

If someone wants to submit a patch, you are very welcome to do so.

UniqProject commented 1 year ago

Ok, there were a few things wrong with those images, that I actually missed the report autosaving problem.

However, I have it fixed with a571337

UniqProject commented 1 year ago

Also, with changes in b5cd753 and 74b9e2f scanning is much faster for those images.

However, MPEG2 Audio streams are still not parsed, and as result there is also no bitrate detection for them

Hellboy00000 commented 1 year ago

Thanks UniqProject. I fixed the label with this but your method is better because only remove invalid characters.

public static string RemoveSpecialCharacters(string str) { string s = string.Empty; foreach (char c in str) { if (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c) || c == '.' || c == '_' || c == '-') { s += c; }

            if (string.IsNullOrWhiteSpace(sb))
            {
                s = "No Label or Invalid Label";
            }
        }
        return s.ToString();
    }

string reportName = string.Format( CultureInfo.InvariantCulture, "BDINFO.{0}.txt", FormMain.RemoveSpecialCharacters(BDROM.VolumeLabel));

You can try to change: reportName = ToolBox.GetSafeFileName(reportName); for ToolBox.GetSafeFileName(BDROM.VolumeLabel));

Hellboy00000 commented 1 year ago

I change this "Exception" in FormMain.cs because never used.

private void GenerateReportCompleted(object sender, RunWorkerCompletedEventArgs e) { HideNotification(); if (e.Result != null) { if (e.Result.GetType().Name == "FormReport") { ((Form)e.Result).Show(); } else if (((Exception)e.Result).Message != null) //e.Result.GetType().Name == "Exception" - changed this because never enter { string msg = string.Format( "{0}", ((Exception)e.Result).Message);

                MessageBox.Show(msg, "BDInfo Error",
                    MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        buttonViewReport.Enabled = true;
    }
UniqProject commented 1 year ago

Please try the latest beta release v0.7.6.0b and see if problem is fixed.

HolyGit12 commented 1 year ago

It seems to work and scanning is 15-30% faster (compared to 0.7.5.8b). Thanks!

But: Both versions show for some m2ts files of an image different sizes. If this is the case 0.7.6 reports 1 packet more.

While comparing the reports I saw that there were also some correct changes for chapters. But for some M2TS the chapters show a value for Avg Frame Size and for some these values are 0 bytes (for all chapters). Is this a bug or has it a reason? The ones who show values seem to be the ones with the above mentioned changes in packet size.

UniqProject commented 1 year ago

Both versions show for some m2ts files of an image different sizes. If this is the case 0.7.6 reports 1 packet more.

I haven't come across such a disk so far, so unfortunately can't tell what the problem is.

As for the rest, can you please test with the latest beta release v0.7.6.1b and see if this has fixed anything?

HolyGit12 commented 1 year ago

No problems so far. Looks good.

HolyGit12 commented 1 year ago

One small thing - can you format the bitrate of the video? You do it already for the audio and subtitles:

`Codec Bitrate Description


MPEG-H HEVC Video 30,311 kbps 2160p / 23.976 fps / 16:9 / Main 10 @ Level 5.1 @ High / 10 bits / HDR10 / BT.2020

AUDIO:

Codec Language Bitrate Description


DTS:X Master Audio English 6679 kbps 7.1 / 48 kHz / 6679 kbps / 24-bit (DTS Core: 5.1 / 48 kHz / 1509 kbps / 24-bit) DTS Audio English 256 kbps 2.0 / 48 kHz / 256 kbps / 24-bit`

The kbps for audio is in one columnn - but not the one for the video (format ##.### kbps with a leading space)

HolyGit12 commented 1 year ago

Not sure whether I was clear what I meant Can you please change

VIDEO:

Codec                   Bitrate             Description     
---------------         -------------       -----------     
MPEG-H HEVC Video       52,299 kbps         2160p / ***
* MPEG-H HEVC Video     69 kbps             1080p / ***

to

Codec                   Bitrate             Description     
---------------         -------------       -----------     
MPEG-H HEVC Video       52,299 kbps         2160p / ***
* MPEG-H HEVC Video         69 kbps         1080p / ***