Generate QP file to force frame types

Support forum for DGDecNV
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Please re-download 231. DGIndexNV now automatically invokes chapters2qp (generates the QP file) for MKV.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

I just did a batch indexing of several Matroska files using the command line. I've not remembered to bring this up before, but the demuxing does not extract the chapter files. That means the QP files won't be there either, of course.
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

OK, gonna fix the audio overhang and then this.
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

OK, you need to do four things to get QP from MKV:

1. Put chapters2qp.exe in the same directory as DGIndexNV.exe.
2. Put mkvextract.exe in the same directory as DGIndexNV.exe.
3. Disable save chapters as XML.
4. Re-download 232 and update DGIndexNV.

Testing working over here. Please advise your results.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Still not working. I think it's because the "Chapters" checkbox is not kept active after I exit DGIndexNV. If I index and demux a Matroska file using the GUI, I always have to enable demuxing chapters. All the other files except for the video track are automatically checked and also demuxed using the command line.
dgindexnv_demux.png
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

You said you use CLI. That just looks for the -a option to demux everything, including chapters. The GUI operation is irrelevant.

Please tell me your exact process, including your CLI command line, etc. The version of mkvextract.exe too.

In my case I just did this from a CMD window:

dgindexnv -i test.mkv -o test.dgi -a -e

The chapter file and QP file were generated.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

A-ha! That -a parameter must be it then :D But there is a connection between the GUI's demux part and the CLI, that's why I never started to look for any extra CLI parameters.

If you have demuxing disabled in the GUI, the CLI won't do it either, even with the -a option. If you have it enabled, the CLI seems to automatically demux everything but the chapters (for Matroska files) and the video track without any extra parameters. That's why I thought that the GUI settings were being used and as the chapter demuxing must be checked manually with Matroska files, even more so.

I also noticed now while testing, that you have to launch the commands while in the DGIndexNV directory or the qpfile won't be created. I usually do it so that I first change to the directory in C where DGIndexNV is, then change to the different drive where the source files are and launch indexing in batch mode by start /wait "c:dgindexnv.exe" .. But don't worry about this, I think I'll just add the DGIndexNV dir to the path variable.
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Boulder wrote:
Sat Aug 28, 2021 2:26 am
A-ha! That -a parameter must be it then :D But there is a connection between the GUI's demux part and the CLI, that's why I never started to look for any extra CLI parameters.
Hmm, I don't get any demuxing when the -a option is absent. Can you double check that?
If you have demuxing disabled in the GUI, the CLI won't do it either, even with the -a option.
I have that fixed locally.
I also noticed now while testing, that you have to launch the commands while in the DGIndexNV directory or the qpfile won't be created. I usually do it so that I first change to the directory in C where DGIndexNV is, then change to the different drive where the source files are and launch indexing in batch mode by start /wait "c:dgindexnv.exe" .. But don't worry about this, I think I'll just add the DGIndexNV dir to the path variable.
That won't do any demuxing unless you give the -a option. And how do you give the -e option? Did you omit something? Opening DGIndexNV.exe without passing the CLI parameters simply opens it in GUI mode.

I can't duplicate your non-creation of the QP file.

Thank you for your reports and testing.
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Please re-download 232. It has a fix for no demuxing with -a when the INI file has Enable_Demux=0 (which should control only the GUI). That was the only interaction with the GUI I am aware of.

The other things I cannot reproduce. Can you check them again with this version please?

Just to be clear, for proper CLI batch operation your command should look like this:

DGIndexNV -i test.mkv -o test.dgi -a -e

Is that what you are doing? That start /wait line you gave will simply open DGIndexNV in GUI mode. You have to give all the options as above. The -e is needed or else you'll leave the GUI open which is problematic for batching. It's typical to also give the -h option to hide the GUI completely.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

This is the skeleton I use for batch processing, I'll now add -a to it:
for %f in (x:*.mkv) do start /wait c:DGIndexNV.exe -i "%f" -e -h -at c:template.avs -o "x:\%~nf.dgi"

This is what i got with different options and the latest build:

1. Demux enabled in GUI, -a option not set in CLI --> Demuxed all but chapters
2. Demux enabled in GUI, -a option set in CLI --> Demuxed all and created the qp file
3. Demux disabled in GUI, -a option not set in CLI --> Demuxed all but chapters
4. Demux disabled in GUI, -a option set in CLI --> Demuxed all but chapters

What I've also noticed is that the source file path length can do tricks to you. I was wondering why the qp file was not being created and it started working when I tested moving the file directly to the drive root folder.

Another thing.. if I run an indexing job without any batch mode things, the indexing finishes but the process is stuck at 100%. I have to CTRL+C to end it.
index_stuck.png
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Boulder wrote:
Sat Aug 28, 2021 10:11 am
Another thing.. if I run an indexing job without any batch mode things, the indexing finishes but the process is stuck at 100%. I have to CTRL+C to end it.
index_stuck.png
Lemme answer this quick and then get to the rest. Nothing is stuck and you don't need ctl-c. The process is asynchronous to the CMD interpreter. Just hit enter to see that the interpreter is awake waiting for your next command. Or check it in task manager.
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

I have my test.mkv file in one directory different from where DGIndexNV, chapters2qp, and mkvextract are:

MKV file in d:\tmp\dgdemuxgui test\
Executables in d:\don\programming\c++\dgdecnv\dgindexnv\x64\release\

Here are my commands and results for your cases 1-4. Commands are issued directly at a DOS prompt opened in d:\tmp\dgdemuxgui test\.

1. Demux enabled in INI with no -a

start /wait d:\don\programming\c++\dgdecnv\dgindexnv\x64\release\dgiIndexnv.exe -i test.mkv -e -h -o "test.dgi"

Nothing is demuxed.

2. Demux enabled in INI with -a

start /wait d:\don\programming\c++\dgdecnv\dgindexnv\x64\release\DGIndexNV.exe -i test.mkv -e -h -a -o "test.dgi"

Everything demuxed, including chapters and QP.

3. Demux disabled in INI with no -a

start /wait d:\don\programming\c++\dgdecnv\dgindexnv\x64\release\DGIndexNV.exe -i test.mkv -e -h -o "test.dgi"

Nothing is demuxed.

4. Demux disabled in INI with -a

start /wait d:\don\programming\c++\dgdecnv\dgindexnv\x64\release\DGIndexNV.exe -i test.mkv -e -h -a -o "test.dgi"

Everything demuxed, including chapters and QP.

So, this verifies my design intent. Can you try things this way? Then we can move on to trying things from a BAT file.
I was wondering why the qp file was not being created and it started working when I tested moving the file directly to the drive root folder.
Path is currently 1024 characters maximum. Are you exceeding that? Maybe the start command has an applicable limit? If the chapters file is created then the QP file should also be created, because they use the same output path.

Finally, your command has "c:DGIndexNV.exe". There is a \ missing (perhaps inconsequential -- I don't know offhand). Maybe you are not executing the DGIndexNV executable you think you are. Or maybe you have something in your PATH. Please verify somehow that you run the correct DGIndexNV together with the other two.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Ok, let's test some more :)

In my case, DGIndexNV is in directory C:\Utils\DGIndexNV. The testclips are at Q:\. So the first commands would be

c:
cd \utils\dgindexnv (this is just to make it faster to type the indexing command)
q:
dg_version.png
I've verified that the .ini file contains the Enable_Demux=1 line.

1. start /wait c:dgindexnv.exe -i tos_test.mkv -e -h -o "tos_test.dgi"
dg_case1.png
2. start /wait c:dgindexnv.exe -i tos_test.mkv -e -h -a -o "tos_test.dgi"
dg_case2.png

I've verified that the .ini file contains the Enable_Demux=0 line.

3. start /wait c:dgindexnv.exe -i tos_test.mkv -e -h -o "tos_test.dgi"
The exact same files as in case 1 appear.

4. start /wait c:dgindexnv.exe -i tos_test.mkv -e -h -a -o "tos_test.dgi"
The exact same files as in case 1 appear.


The paths for the files are less than 200 characters so that should not be an issue, I also found it strange that the chapters were there but the qp file wasn't. Can you change the command line part so that it will show what is being called? I noticed that if chapters2qp causes an error, it won't show up in the command prompt but can be seen in Event Viewer (tried to create a file without specifying the frame rate).
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Rocky wrote:
Sat Aug 28, 2021 10:29 am
Boulder wrote:
Sat Aug 28, 2021 10:11 am
Another thing.. if I run an indexing job without any batch mode things, the indexing finishes but the process is stuck at 100%. I have to CTRL+C to end it.
index_stuck.png
Lemme answer this quick and then get to the rest. Nothing is stuck and you don't need ctl-c. The process is asynchronous to the CMD interpreter. Just hit enter to see that the interpreter is awake waiting for your next command. Or check it in task manager.
Cheers, didn't know that. One more thing learnt today :D
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Let's get things working for you before talking about new features.

If you run the correct version of DGIndexNV, that is, the one on my site right now, there is NO WAY you can get files demuxed without -a from CLI. Watch out for inadvertently using an old link from your cache! Clear your browser cache and re-download 232, and then update DGIndexNV. Just because it says 232 doesn't mean it is the latest (secret society). Verify that the freshly downloaded version is the one that you invoke. Chapters without QP indicates to me that you are invoking an older version. If things don't work after doing that we can make a special load saying if it is the desired version.

You're still doing the strange c:dgindexnv.exe thing. Please use standard syntax:

c:\dgindexnv.exe

Obligatory tech support comment (gotta ask, no offense): I'm sure you must be deleting the files after each case, so you don't think they get created but you see them from the previous case.

My bet is you are simply not running the latest version.

C'mon gonca help me out. What am I missing?
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

The file in C:\Utils\DGIndexNV64 is definitely the same as the one I can download (using the private mode of Firefox so no cache involved).
dgindexexe.png
MD5 sum of the exe file is b5b4030b5f2d1337090cae989e1d845f and CRC32 is 79124212.

The "C:" thing is standard, it's probably been there since the 80s.. as I have switched to directory C:\Utils\DGIndexNV in the command prompt session, I can use "C:" as a shortcut for the whole path concerning the drive C.

Q:\>cd c:
C:\Utils\DGIndexNV64

Nevertheless, I tested without using the shortcut but same results.

And yes, I'm deleting those old files before running a new test :) And as you can see, I do get the chapter and qp file in case 2 where demuxing is enabled in the ini file and I use -a. The other cases do not produce a chapter file, thus the qp file won't be there either. The case where the qp file is missing but the chapters are there seems to concern the path length.
User avatar
Curly
Moose Approved
Posts: 139
Joined: Sun Mar 15, 2020 11:05 am

Generate QP file to force frame types

Post by Curly »

Did you clear your browser cache? Show the directory with the downloaded
RAR file.
User avatar
gonca
DG Approved/Curly Approved/Moose Approved
Posts: 1102
Joined: Sun Apr 08, 2012 6:12 pm

Generate QP file to force frame types

Post by gonca »

Well, I decided to give the latest DGDecNV a test
CMD line
DGIndexNV -i "W:\THE OMEN PART 3.mkv" -o "W:\THE OMEN PART 3.dgi" -a -e
Results
results.png
qp file generated

Edit
Tested with

Code: Select all

Enable_Demux=0
and

Code: Select all

Enable_Demux=1
set in GUI configuration
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Curly wrote:
Sat Aug 28, 2021 4:44 pm
Did you clear your browser cache? Show the directory with the downloaded
RAR file.
I launched the private mode of Firefox so it operates without any cookies or caches from the regular mode.
dgindex_download.png
dgindex_download2.png
dgindex_download3.png
One more round of testing to doublecheck. Running from the DGIndexNV directory: DGIndexNV.exe -i q:\tos_test.mkv -e -h -o q:\demux\test.dgi and with or without -a.

1. Enable_Demux=1, no -a : demuxes tracks but not the chapters and of course, no qp file. OK
2. Enable_Demux=1, -a included : demuxes all tracks and produces chapters and the qp file. OK
3. Enable_Demux=0, no -a : demuxes tracks but not the chapters and of course, no qp file. Not OK, shouldn't demux anything
4. Enable_Demux=0, -a included : the same as the previous one. Not OK, should demux all like case 2.

I'll also try to find out where the path length triggers the failure to create the qp file. I know two different cases from the same directory so it should be easy to test where it starts to happen.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Code: Select all

DGIndexNV.exe -i q:\--------------------------------------------------------------------------------------------------------------------------------------------------------------------.mkv -e -h -a -o q:\demux\filename.dgi
does not create the qp file.

Code: Select all

DGIndexNV.exe -i q:\-------------------------------------------------------------------------------------------------------------------------------------------------------------------.mkv -e -h -a -o q:\demux\filename.dgi
does.

I don't know if it's the path length of the chapter file name which actually triggers the problem but seems to be easily reproduced here. Win10 is supposed to support very long path names, but I think that it's quite restricted by default and I have not done any tricks to enable the feature. We just ran into a similar issue at work some time ago and couldn't switch to Win10-long pathnames as several legacy systems would possibly have run into problems later :lol:
User avatar
gonca
DG Approved/Curly Approved/Moose Approved
Posts: 1102
Joined: Sun Apr 08, 2012 6:12 pm

Generate QP file to force frame types

Post by gonca »

Demux=1 in ini file with "no -a" in CMD results in no files demuxed
"-a -e" or "-e -a" in CMD line makes no difference
Running CMD directly from DGDecNV folder
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

OK, guys, I found it.

Boulder, in settings, disable Optimize for HDD. That's Optimize_For_HDD=0 in your INI.

I'll fix things for that case.
DAE avatar
Boulder
Moose Approved
Posts: 89
Joined: Fri Jul 29, 2011 7:22 am

Generate QP file to force frame types

Post by Boulder »

Rocky wrote:
Sun Aug 29, 2021 6:48 am
OK, guys, I found it.

Boulder, in settings, disable Optimize for HDD. That's Optimize_For_HDD=0 in your INI.

I'll fix things for that case.
Wonderful! I was probably closing in on the issue myself as renaming the ini file and starting with a fresh one got different results and that option is one that was changed.
User avatar
gonca
DG Approved/Curly Approved/Moose Approved
Posts: 1102
Joined: Sun Apr 08, 2012 6:12 pm

Generate QP file to force frame types

Post by gonca »

That figures, I don't have any HDDs in my working chain
Never used that setting
User avatar
Rocky
Moose Approved
Posts: 1877
Joined: Fri Sep 06, 2019 12:57 pm

Generate QP file to force frame types

Post by Rocky »

Please re-download 232 and re-test. If this is acting as intended with 'Optimize for HDD' then we can address the other things that were brought up.

I marked the thread unresolved. Will mark resolved again when Boulder is fully satisfied. 8-)
Post Reply