Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th February 2014, 13:57   #1  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Getting the input file name (not the avs file)

I have an <input> line in an avisynth megui script that adds these 2 lines for my mpeg2 files

LoadPlugin("xxxxxxxxx\DGDecode.dll")
DGDecode_mpeg2source("xxxxxxx\video.d2v")

Later in my script I use tfm with d2v

tfm(d2v="xxxxxxx\video.d2v")

I want to automate this. If I could get the full name of the input file "xxxxxxx\video.d2v" and pass it to tfm automatically, it would be great.

I did a search and all I found was functions to get the current avs script name not the input file.

If its not possible to return the name of the currently opened input file, any other way I cant automate this process in megui?
Atlantis is offline   Reply With Quote
Old 12th February 2014, 14:53   #2  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: USA
Posts: 676
Those are likely internal variables specific to MeGUI, so you'd have to find a way to get it to tell you, identify/read the memory address, or something like that.

When you specify a file to open, or create an AVS scripte / index a file etc, MeGUI knowns the filename since it is loading the file, and then it swaps it with the <xxx> placeholders in its template format.
osgZach is offline   Reply With Quote
Old 12th February 2014, 15:07   #3  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Forget MeGUI for a second. Let's imagine we are not using MeGUI. Can you get the filename of an opened file in an avs script? Or once you open a file in an avs script, its name is lost?
Atlantis is offline   Reply With Quote
Old 12th February 2014, 15:11   #4  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by Atlantis View Post
Forget MeGUI for a second. Let's imagine we are not using MeGUI. Can you get the filename of an opened file in an avs script? Or once you open a file in an avs script, its name is lost?
http://forum.doom9.org/showthread.php?t=170042
tl;dr - you can't.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 12th February 2014, 15:25   #5  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Ok, thanks. Then I should try MeGUI side to do something I guess.
Atlantis is offline   Reply With Quote
Old 12th February 2014, 16:46   #6  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
You could do it with AviSynthesizer (create a template) but it can't be incorporated into MeGUI's script creating as such. You'd need to manually copy and paste. If only MeGUI's script creator could create templates which were a little more clever and use the file name as a variable as AviSynthesizer does. Maybe you could put in a request in the MeGUI thread? MeGUI obviously uses the name of the index file in the script anyway, it just needs to let you use it specifically (or even the source file's name too) elsewhere in a script.
You could at least put this in a MeGUI template:

tfm(d2v=".d2v")

Then copy and paste the name of the file from the input section of the script.

Did you try any of the scripts I posted in your QTGMC/TFM thread? If you did I'm curious as to whether it fixed the combing without blurring as much as the other methods you tried.

Last edited by hello_hello; 12th February 2014 at 16:49.
hello_hello is offline   Reply With Quote
Old 12th February 2014, 17:21   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Suggest this mod rather than original Avisynthesizer (which has problems)
http://forum.doom9.org/showthread.ph...avisynthesizer

EDIT:
Atlantis, I saw your post on MeGUI AutoEncode, if you might be using Avisynthesizer_MOD, then you may also be
interested in MeGUI AutoEncode Batcher, see here:
http://forum.doom9.org/showthread.ph...Encode+Batcher
there is also a DGIndex Batcher which can be used to create AVS files from within DGIndex (using DGIndex template), here:
http://forum.doom9.org/showthread.ph...07#post1543507
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th February 2014 at 17:57.
StainlessS is offline   Reply With Quote
Old 12th February 2014, 21:20   #8  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Thanks for the Avisynthesizer suggestion. It helps alot. There is one problem. Can't you select several video files and sendto Avisynthesizer? I did it but it only creates one avs file.

Since it's about automation, it would help a lot if you could do that on several files.

In my steps I still have to generate a second avs from the first avs because of cropping. I want to check the cropping in MeGUI by eye for each file so there is no surprise later.

I tried DGIndex Batcher but it doesn't create the files in the source directory. It asks for a folder. And the AutoEncode Batcher I am not sure if it will help me. I have my videos each in its own folder with extracted audio, subtitle and chapters. Not sure if AutoEncode batcher can do all that.

I will report about my script in the original topic later. I have been very happy with it. It's bullet proof and I'm sure what comes out is correct. When you have 250 files for a series, it is not realistic, possible to inspect frame by frame each episode and apply different scripts.
Atlantis is offline   Reply With Quote
Old 13th February 2014, 16:08   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
[QUOTE=StainlessS;1667698]Suggest this mod rather than original Avisynthesizer (which has problems)
http://forum.doom9.org/showthread.ph...avisynthesizer

I replaced the original with your mod version. Thanks!

The RoboSplice template..... There's an avis file I should be putting in the plugins directory? I guess I'm too silly to find it.
hello_hello is offline   Reply With Quote
Old 13th February 2014, 16:13   #10  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by Atlantis View Post
Thanks for the Avisynthesizer suggestion. It helps alot. There is one problem. Can't you select several video files and sendto Avisynthesizer? I did it but it only creates one avs file.

Since it's about automation, it would help a lot if you could do that on several files.
When you do that it combines the individual files into a single script/encode. I don't think there's a way to send multiple files to Avisynthesizer in order to create multiple, individual scripts. I've not really needed that myself.

Quote:
Originally Posted by Atlantis View Post
I will report about my script in the original topic later. I have been very happy with it. It's bullet proof and I'm sure what comes out is correct. When you have 250 files for a series, it is not realistic, possible to inspect frame by frame each episode and apply different scripts.
The second script I posted should de-interlace every frame after IVTC. I'd be interested to see how different the result is from the way you're doing it. Anyway.... that's a topic for the other thread.
hello_hello is offline   Reply With Quote
Old 13th February 2014, 16:38   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by hello_hello View Post
I don't think there's a way to send multiple files to Avisynthesizer in order to create multiple, individual scripts.
Yep, dats wot I tink two.
I think it puts up a warning when ___FILE___ line not [] enclosed, saying additional filenames will be skipped.

I was thinking that I might try to have it create multiple avs files
if template ___FILE___ line not [] enclosed, but dont know if I understand the code well enough to do that (I'm not a windows progger).

The "RoboSplice.avsi" files are not included anywhere, I was just explaining why I added the ___FILECNT__ thing.
I'll post the avsi's in Avisynthesizer_MOD thread, but they still aint anywhere near finished (I do use them but only on AVI's)

EDIT: Have now added Batch Mode
Code:
20 Feb 2014, Added Batch AVS creation mode.
 If template has a repeating section {enclosed in square brackets eg [AviSource("___FILE___")]} then will
 use the standard mode, creating a single file with multiple sources concatenated.
 If template DOES NOT have a repeating section {not enclosed in square backets eg AviSource("___FILE___")}
 then will create multiple AVS files, one for each source file.
here:-
http://forum.doom9.org/showthread.php?t=166820
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 20th February 2014 at 21:00.
StainlessS is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.