[RESOLVED] cannot use template from command line

Support forum for DGDecNV
Post Reply
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

[RESOLVED] cannot use template from command line

Post by dee »

for example, I have a lot of MPGs and a batch file in the same directory:

Code: Select all

@echo off
del template.avs
echo v=DGSource("__vid__",deinterlace=1,crop_t=76,crop_b=72,crop_l=8,crop_r=8,resize_w = 720,resize_h = 400)>> template.avs
echo a=NicMPASource("__aud__",1)>> template.avs
echo AudioDub(v,a)>> template.avs
echo DelayAudio(__del__)>> template.avs

SET DGINDEX="E:\WinApp\VideoTools\DGIndexNV\DGIndexNV.exe" 
for %%f in (*.mpg) do %DGINDEX% -i %%f -o %%~nf.dgi -at template.avs -e -a
del template.avs
Everything was fine with previous version of DGIndexNV.exe, but build 2041 doesn't see generated template.avs.
I don't want to place template into DGIndexNV directory and use dynamically created one. How can I setup new build properly?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

Please try giving the full path name for your template.avs in the -at option.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

No, still nothing. AVS is not created. Looks like this command line option is totally ignored.

Of cousre, AVS is created when DGIndexNV.ini contains settings:
AVS_Template_File=template.avs
AVS_Enable_Template=1

but this is not usable if I want to work via command lines...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

It's working fine for me. The only thing I can think of is that the AVS already exists. It won't be overwritten if it exists.

Please also try it from the command line directly and without -e and -a.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

another one test on another PC at office.
I have a dir c:\video with only 2 files: test.mpg and template.avs with single line: DGSource("__vid__")
dgindexnv is in D:\WinApp\Video\DGIndexNV\

following commands do not create AVS
1. D:\WinApp\Video\DGIndexNV\DGIndexNV.exe -i test.mpg -o test.dgi -at template.avs
2. D:\WinApp\Video\DGIndexNV\DGIndexNV.exe -i test.mpg -o test.dgi -at template.avs -a -e
3. D:\WinApp\Video\DGIndexNV\DGIndexNV.exe -i test.mpg -o test.dgi -at C:\Video\template.avs
4. D:\WinApp\Video\DGIndexNV\DGIndexNV.exe -i test.mpg -o test.dgi -at C:\Video\template.avs -a -e

old dgindex 1.5.8 works fine
old build of dgindexnv works fine (well, it workED. I deleted it and installed new build... fatal mistake :-)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

It all works fine for me.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

well... what can I say... only "it not work at all for me"...
can you please give me a link to previous working build (2039 AFAIR)? It was on your site on 29.05.11
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

It's still there:

http://rationalqm.us/dgdecnv/dgdecnv2039.zip

@all

Is anyone else experiencing this?

I know there are several 3rd-party tools that rely on this so it's surprising I have a report about this from only one person, and as I said, it all works fine for me.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

thanks!

BTW, 2041 works in my tests only with "AVS_Template_Folder=C:\Video" in INI file. When AVS_Template_Folder setting is empty, no AVS is generated.

BTW2: 2039 works fine under the absolutely the same conditions as I wrote before! I mean
D:\WinApp\Video\DGIndexNV2039\DGIndexNV.exe -i test.mpg -o test.dgi -at template.avs -a -e
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

dee wrote:BTW, 2041 works in my tests only with "AVS_Template_Folder=C:\Video" in INI file. When AVS_Template_Folder setting is empty, no AVS is generated.
BTW! :?

Again, I cannot duplicate that. Perhaps your INI file is messed up. Please delete it and let DGIndexNV make it again. Also, please post a screenshot of the AVS template file dialog when the problem is happening.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

No luck. Both without INI at all and with fresh recreated INI...

WOW!!! eureka! "AVS_Template_Folder=." works! :-) It's better than nothing :-)

about dialog: whatever is selected in this dialog the command line must override these settings. Otherwise, we lose a point of command line. If I have option "-at template.avs" I suppose that this template will be used in spite of dialog settings.
And also, from my point of view, if I run dgindex in some directory X it would be logical to check the presense of template.avs in following order:
1. current folder X
2. AVS_Template_Folder
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

Please remember that I am not an idiot, and I know what a CLI must do, so your bolding is a bit over the top. Nevertheless, I think I may know what's going on here and that we can both be right. :lol:

I'll investigate the idea and release a possible fix this evening to go along with the pulldown fix from another thread.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

I have slipstreamed a fix into 2041. Just re-download it and update DGIndexNV, DGDecodeNV (for an unrelated pulldown fix), and DGIndexNVManual.html.

Here are the rules:

Specify the filename of the Avisynth template to be used. This can be just a filename (e.g., template.avs), in which case the template file will be looked for in the same directory as DGIndexNV.exe. It can also be a full path that fully specifies the path and filename (e.g., c:\templates\template.avs). Leave the filename null to specify no template (i.e., give -at alone with no argument). Also note that overwrite is disabled, so if the target script already exists, it will not be overwritten. Delete it first.
DAE avatar
dee
Posts: 7
Joined: Sat Jan 14, 2012 4:02 pm

Re: cannot use template from command line

Post by dee »

It works fine again with all 3 variants:

Code: Select all

-at template.avs
-at .\template.avs
-at c:\video\template.avs
Thanks a lot !!! :)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: cannot use template from command line

Post by admin »

You're welcome and thank you for pointing out the issue.
Post Reply