[RESOLVED] MPLS: CLI parsing

Support forum for DGDecNV
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

[RESOLVED] MPLS: CLI parsing

Post by Zathor »

Hello,

Today I tried the first time to use a MPLS as input from CLI (using recent DGDecNV build - I tried also the latest DGDecIM with same result)

E.g. I did this:

Code: Select all

"D:\MeGUI\tools\dgindexnv\dgindexnv.exe" -i "H:\BDMV\PLAYLIST\00800.MPLS" -o "D:\TEMP\00800.dgi" -e -h
(Tried it also with -a)

The result is this dgi file:

Code: Select all

DGAVCIndexFileNV17  X32
D:\MeGUI\tools\dgindexnv\

H:\BDMV\PLAYLIST\00800.MPLS 834

DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 0
CLIP 0 0 0 0
RANGE 0 0 833 0
AUDIO 
DEPTH 8

SIZ 0 x 0 
FPS 0 / 0
CODED 0
PLAYBACK 0
0.00% FILM
ORDER -1
If I use the GUI I get a proper dgi file:

Code: Select all

DGAVCIndexFileNV17  X32
D:\MeGUI\tools\dgindexnv\

H:\BDMV\STREAM\00800.m2ts 30586030080

DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 1
PKTSIZ 192
VPID 4113
CLIP 0 0 0 8
RANGE 0 0 30586030079 0
AUDIO 1100,1101,1102,1103,1104,1105,1106,1107,1108,1109
DEPTH 8

SPS 994
PPS 1051
RPS 1166
IDR 1174
0:FRM 7 0 0 1
1:FRM 6 1 0 1
2:FRM 5 2 0 1
3:FRM 6 3 0 1
4:FRM 6 4 0 1
...
So it seems that when using the CLI the MPLS parsing is not used and instead of a list of M2TS files the MPLS will be used directly.

Any thoughts are welcome - am I doing something wrong?

-------------------------

Second related issue - if such a bad DGI file is used it will crash first AviSynth and then MeGUI completly when opening with DGSource/DGSourceIM. Could this maybe be changed so that an error is thrown?

Example:

Code: Select all

LoadPlugin("D:\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("D:\TEMP\00800.dgi",fieldop=0)
I get then an "System.AccessViolationException" / "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." (Avisynth+, r2544)

Same error happens also with DGDecIM / DGSourceIM().

Thank you very much as always for your great tools and your continuous efforts. Very much appreciated!

Kind regards,
Zathor
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

Hello Zathor!

Thanks for pointing these things out. I will fix them up and release a slipstream ASAP.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

Everything works fine for me. That file line in your DGI shows the MPLS when it should show the M2TS(s). So somehow it is not being
seen as an MPLS file. Maybe: 1) you did not decrypt the BD structure, or 2) the MPLS file is wrong or different. Still, it's strange it would work in GUI and not in CLI. DGIndexNV is coded to parse MPLS from CLI, and as I said it works for me.

Can you give me that MPLS file, please? Also, what version of DGIndexNV.exe are you using?

If needed I'll make a debug build with traces for you.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

admin wrote:
Sat Nov 25, 2017 11:01 am
Can you give me that MPLS file, please? Also, what version of DGIndexNV.exe are you using?
I am using DGIndexNV 2053.0.0.116 dated 1st of November 17 (the latest slipstream).
The GUI does work (as other tools) so I would assume that the blu-ray and MPLS is decrypted. The file can be found here:http://megui.org/00800.mpls

As it works for you I will now also try other playlists / discs.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

Ooh, I figured it out. I'm checking for filename "mpls" only because it's that way on the disk. But when you specify the extension as MPLS then that gets used during the open and my test fails.

You can put it as 'mpls' and it should work. Nevertheless, I will slipstream a fix so that the case does not matter.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Thanks, glad to know that it is such an easy thing.
While further testing with another disc I got a proper error and no index file has been created. The error box says (still using MPLS):

Code: Select all

Video Type Detect Error
Unknown Video Type
Exiting...
This is way better as with the other MPLS error as this is already handled within MeGUI (error code returned, no dgi file ==> no need to try to open a broken file with AviSynth).
But do not ask me why it behaves different for different MPLS files.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

Can you please test slipstream 117? I fixed the case sensitivity issue. I assume you have access to my binaries area. If not, let me know.

I too cannot explain why the behavior was different but hopefully it is now moot.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Thanks, yes, going to test now.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

My original test case does work now. Great work!

I do have other points which may need a dedicated thread. Tell me (or move it) when needed:
1. I noticed that there is no progress information written. It stays at 0% till it reachs 100%. I am quite sure that there was progress information in the past.
EDIT3: Just tested without MeGUI from a DOS prompt:

Code: Select all

"D:\MeGUI\tools\dgindexnv\dgindexnv.exe" -i "H:\BDMV\PLAYLIST\00800.mpls" -o "D:\TEMP\00800.dgi" -e -h -a
It returns the prompt and is not wrining therefore any progress information (or it may be but then not to the calling instance).

2. I get a green "bad license" screen when opeing the DGI file with AviSynth. My license.txt should be valid, also I have just created a new license for my machine ID - but it was the same as already in the list.
EDIT2: Just tested with the old version - it does work there as expected. So it has to be an issue with the new slipstream.
EDIT4: And with another file I get the error message again (still using the old version). I am lost...

3. The file which I tried second (the one with the proper error message) simply stalled. dgindexnv.exe process is there, but no progress at all even after 4min waiting - also no dgi file. I started it a second time and it did work. So hard to debug I fear. I will try to find a way how to reproduce this. If I cannot reproduce it, best thing is to ignore this point ;)

4. Also I noticed for the first test case for the first time a message which audio (PAT/PMT or detected type) type to choose. Is there a way somehow (e.g. with the ini file or better with an CLI option) to hide this window when using CLI? Btw I do get this message also when -a is not specified.

Sorry for all these points :bow:

EDIT: if the points above are not related it would be great to have it also changed in DGDecIM. Thanks!
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

1. I'll look into it. It writes only sporadically so if it has already reached 100% that's all you will see (e.g., a short file). But there may be a problem, let me check. It seemed to be working for me but I will try it again with your command line. If nothing is printed then something is wrong.

2. Latest versions require license.txt together with DGDecodeNV.dll if it is not together with DGIndexNV.exe. It's item 2 in the Readme.

3. I'd like to fix that if it is really a problem, so please keep me informed.

4. In the INI set ResponseOnAudioMismatch to anything but 0 (0 is Prompt). You can do it through the GUI Settings menu too. If you prefer
a different way, let me know.

I'll port fixes to DGDecIM when we get the NV stuff squared away.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

1. The MPLS structure has a size of 30GB and I am not using an SSD. So indexing takes ~10min without any progress.
I tested it now also with a MKV file (~20GB in size) and I also do not get a progress. DGDecIM does show progress with both files.

2. I do have all files in one directory :(
Also again with DGDecIM no problem.

3/4: Thanks!
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

OK, thanks, that's very strange. Going out for a few hours and I'll resume when I get back.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

What OS are you on?
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

No need to rush. I will run a few additional tests and also take a break. I noticed at least the issue regarding the progress is on my end. I run several tests in parallel and the HD was too slow so that it seems it took a few minutes to get the first progress. I will run some tests later when no other activity is on the drives. I am sorry for the problems this may have caused :oops:

The bad license however is still there :-(
Maybe a more specific error message would help a bit? Nothing which would help with an illegal use, but maybe something like: "bad license: c:\tools\dgindexnv\license.txt not found" or "bad license: no proper license code available" if the file is available but empty / with wrong values.

I am on W10 1709 Professional x64.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

I'll consider that.

But it should be fine. Make absolutely sure you have the new DGDecodeNV.dll and you are not picking up some old version from the plugin dir or something.

Really stepping out now. :-)
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Progress:
I made now two tests while no other activity was on the disks. Both tests with my original MPLS test case (but now with lower case) (with and without -a):
DGIndexNV: indexing took ~10min, no progress information written
DGIndexIM: indexing took ~10min, progress information written after ~10sec

Second test done with a MKV file:
DGIndexNV: indexing took ~1min, progress information written after ~2-3sec
DGIndexIM: indexing took ~1min, progress information written after ~2-3sec

License:
I am using a portable AviSynth which is not installed = no plugin dir with autoload available.
DGIndexNV.exe, DGDecodeNV.dll and license.txt are available in the same folder and do have a date from today.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

That's very strange because a) downloaded DLL works fine for me, and 2) the only thing that changed for DGDecodeNV.dll was gui.rc that gives the slipstream number.

I'm going to prepare a debug build for you but it has to be private between us so I will use PM to communicate from now on.

Please triple-check that you are not doing something unusual. And can I see your script?

Anybody else having problems with DGDecodeNV.dll in slipstream 117?

We'll address the progress stuff after we get this sorted out.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

I will triple-check it tomorrow. I will also install AviSynth to check if this has something to do with it. My script is really simple:

Code: Select all

LoadPlugin("D:\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("D:\TEMP\00800.dgi",fieldop=0)
Also I will try older versions of dgindexnv to maybe see where the problem starts. After my downgrade to the slipstream before the one from today it worked once and since then it does also not work. I fear that there may be an stupid issue on my end, but I already double checked that license.txt is the same (made a copy) in the dginddexnv and dgindexim folder and that all files are there.
Triple-check to be done after sleep.
DAE avatar
Guest

Re: MPLS: CLI parsing

Post by Guest »

Anybody else having problems with DGDecodeNV.dll in slipstream 117?
Just tried it on a mpls and its working fine
64 bit version
Progress being shown on the command prompt window, up to 90% now
dgi file looks normal

Edit
Just completed
Edit 2
Reran test and had DGIndexNV create an AVS file
Played fine in VDub
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

"Bad license":
I think I found the root cause or at least a way to reproduce it. If I run MeGUI in Visual Studio debug mode, it will show a bad license. If I run the same MeGUI debug build directly (so not with Visual Studio) I do not get the bad license message and video is shown fine. If this is an intended "tampering protection" it is fine, if it is not intended it would be great if it can be removed so that I can test things with MeGUI in that mode as I have to use Visual Studio for debugging purposes.

I tried various older builds of dgdecodenv (always including a recreate of the dgi file with the proper dgindexnv). Result is that b2052 (dated 4th of december 16) did work with visual studio and since b2053 (dated 10th of march 17) it does not work. I do not have any other slipstreams between those dates available to test.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

"Stalled process":
It happened once again. This time I saw in the task manager that there is below the dgindexnv process also a related "audio detection mismatch" process. But I was not able to find that window (double click in task manager usually brings the window to the front) so it seems that it was hidden. I have now to check if MeGUI hides that window (it should not as I have already seen it several times in the past). Workaround is to implement the "ResponseOnAudioMismatch" in the ini. ==> only a to-do on my side but FYI as well
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Progress report:
Root cause found (sort of at least). If there is no dgindexnv.ini available I always get the progress report. If the default ini is available (only started dgindexnv.exe once and close it without changes) I do not get a progress report for any of my test files.

It seems to be related to "StrictAVC=0" - as soon as I remove that line I do get a progress.
EDIT: StrictAVC=1 is also not working

Btw. if the INI file is empty the process will crash and also dgindexnv.exe cannot be started:
0xC0000409 STATUS_STACK_BUFFER_OVERRUN (-1073740791)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MPLS: CLI parsing

Post by admin »

Bad license: Yes, there is code to detect a debugger (used as an anti-crack method). If it is causing problems you can't work around then let me know and I can provide a special build for you without that check.

Stall: I have never seen a popup-window get hidden or covered so am thinking it is something MEGUI-related. In any case, the INI change should avoid it.

Progress: I checked the handling of StrictAVC and it looks irrelevant to progress reporting. Can you delete your INI file, then open and close DGIndexNV? That should re-create a default INI file. Use that one. If the issue still happens we can go from there. Please test both without MEGUI and through MEGUI. I had no problems getting progress with the INI file present, nor did gonca.
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Bad license & stall: thanks for you help, in my eyes both issues can be closed.

Progress:
I used this command line for all the tests without MeGUI (= in a cmd prompt):

Code: Select all

"D:\MeGUI\tools\dgindexnv\dgindexnv.exe" -i "D:\test.mkv" -o "D:\test.dgi" -h
1. I deleted the dgindex.nv.ini, command started
Result: progress shown
And... dgindexnv.ini created at 100% automatically

2. command started again with the dgindexnv.ini created before
Result: no progress

3. I deleted dgindexnv.ini again, started dgindexnv.exe, waited ~5sec, closed it. dgindexnv.ini now available, command started again
Result: no progress

4. I removed the line "StrictAVC=0" in the ini, command started again
Result: progress shown
And ... StrictAVC=0 available again in the ini

5. run command again
Result: no progress
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Re: MPLS: CLI parsing

Post by Zathor »

Here is my full ini:

Code: Select all

Version=
Window_Position=870,284
Info_Window_Position=100,100
Process_Priority=2
Playback_Speed=3
AVS_Template_Folder=
AVS_Template_File=template.avs
AVS_Template_File_Index=0
AVS_Enable_Template=1
AVS_Overwrite=0
Full_Path_In_Files=1
MRUList[0]=D:\test.mkv
MRUList[1]=
MRUList[2]=
MRUList[3]=
Enable_Info_Log=1
Loop_Playback=0
AVC_Extension=264
MPG_Extension=m2v
VC1_Extension=vc1
HEVC_Extension=265
Deinterlace=0
UsePF=0
AlwaysCrop=1
UseD3D=0
Snapped=0
ResponseOnAudioMismatch=0
Enable_Audio_Demux=1
CUDA_Device=255
Decode_Modes=0,0,0,0
Full_Info=1
Bare_Demux=0
Disable_Encrypted_Audio_Warning=0
Fine_Cropping=0
Force_Zoom=0
StrictAVC=0

Post Reply