News:

--

Main Menu

Starting with AviSynth

Started by TCmullet, February 25, 2015, 08:49:03 PM

Previous topic - Next topic

TCmullet

I'm becoming (a bit) proficient in AviSynth, and am shifting somewhat away from Virtualdub for my AVI video processing.  Now I wish to use it Avisynth scripts as input to AviDemux like I'm already using as input to Virtualdub.  But when I read the guide to using AviSynth with AvsProxy:
http://www.avidemux.org/admWiki/doku.php?id=using:avsproxy
I find that I can't find AvsProxy out there.  Where do we get it, and how important is it to have something "current"?  (I see references to 2009, 2010, etc. which is pretty old, and the place I tried to get it failed.)

Also, it's confusing (at the above link) exactly what the startup events are suppose to be.  The link above seems to say that I should open the dummy file (with the "ADAP" text as the 1st 4 characters) as a video input file.  (It doesn't say clearly that or the contrary.  I'm guessing the file name or extension doesn't matter.)  And to further muddy my mind, AviDemux has an option under "File" to "Connect to avsproxy".  Which am I supposed to do, and how often??  I realize some guides get way behind in being updated, in favor of going forward on software improvements.  But if something fundamental about handling the GUI changes, the guide really should explicitly tell, IMHO.

Thank you in advance for your help with this thrust forward.

TCmullet

#1
On the AviSynth/Avsproxy front, I've been able to poke around dangerously, go forward and get stuck.

I found that the C:\Program Files (x86)\AviDemux 2.6 folder in my Win 7 has two files, avsproxy.exe and avsproxy_gui.exe.  So I run the latter, enter the name of my fake video file "ADAP-file-to-start-avsproxy.avi" into the AVISource tab, click Create Proxy, and it bombs with this sequence:

AvsSocket Proxy, derivated from avs2yuv by Loren Merritt Avs2YUV 0.24 ADM_1.2
Loading Avisynth.dll
Avisynth.dll loaded
Env created
Importing..

Avisynth error:
AVIFileSource: couldn't open file "C:\Program Files (x86)\Avidemux 2.6\ADAP-file-to-start-avsproxy.avi"
(C:\Users\Tom-i5\AppData\Local\Temp\avisource_fc303141.avs.line 1)
Avisynth initfailed
Err: 0

>Exit Code: -1


I'm totally lost and don't know where to go from here.  (And future travelers might get help from this experience.)

poutnik

Are you able to open video via this AVS script in Windows video players ?

Does help, if you replace AVIsource() by DirectShowSource() ?


TCmullet

#3
Yes, I can open this script in VirtualDub.  Done so hundreds of times in last several years.

Uh, I'm beginning to see where I was missing a correct understanding.  In this:
http://www.avidemux.org/admWiki/doku.php?id=using:avsproxy
I failed to grasp that "is a proxy between Avisynth and Avidemux. It will ask Avisynth frames and make them available".  I had come to believe that I would open the .avs file as an input video file to AviDemux just like I do in VirtualDub and like many players do.  But I see now that the app I feed my script to is Avsproxy, not AviDemux.

But then where does the "ADAP" file come into play??

mean

No longer needed, just use file->connect to avsproxy

TCmullet

#5
Thanks, Mean.

TCmullet

#6
I have the script coming through to AviDemux.

But the picture is damaged.  I've attached a .jpg as the first frame appears in VirtualDub (running the script), AND a .jpg of same as it appears in the AviDemux window having grabbed it from AvsProxy.  The VirtualDub one shows it correctly; the AviDemux one has color and image damage.  All frames in the video (2-hrs long) are damaged similarly when viewed through the Avsproxy/Avidemux chain.

What's causing this and how can we fix it?

mean


poutnik

Uncommon - yes, but why weird ? 896 is multiple of 16, and 504 multiple of 8.
Sure, mod 16 is preferred  for smooth encodings, but mod 8 is still very normal.

Unless you mean change in height  504 vs 506 ( in case it is not a typo ).



hinterwaeldler

#9
Quote from: TCmullet on February 26, 2015, 12:16:32 AM
But then where does the "ADAP" file come into play??
Quote from: mean on February 26, 2015, 07:00:10 AM
No longer needed, just use file->connect to avsproxy
The answer from mean is neither correct, nor incorret.
Behind the scene it's only necessary when it comes up to the processing from the command line without the GUI or when the input file is given as command line parameter.
As long as the the GUI is used to connect to avsproxy, there is no need for the ADAP fle at all, if you use the "Connect to avsproxy"
I've never tested it, but it should work, that any file that is opened start with ADAP will trigger the connection to avsproxy, at least if remember the things correctly. Due to the file information at the beginning of a video file this should never be problem at all.


Back to the determination where the problem might be.
What was the original intend of the height within your script?
The height as multiple of 8 should not matter, but try a AddBorders(0,8) at the end of your script and see if it helps.
Looking at a result of mine   i see 624x568, where the height is only a multiple of 8 too.
It was processed with avidemux 2.5.6, but so far i've never notice a difference between 2.6.8 and 2.5.6 when it comes to avisynth processing

And a short sentence to the orignal problem with avsproxy sript/avsproxy_gui:
avsproxy expects the avs script as parameter. so Should be called like this:
avsproxy.exe PATH\TO\AVS_SCRIPT.avs

      I think it was never meant to be used from GUI, so should be triggered more or less like this:

      • Press winkey + r   (start run or however it is called now)
      • Enter "cmd" and press enter (without the double quotes)
      • Switch to the path with "cd PATH", where the avsproxy.exe is placed (should be the avidemux install dir) and replace PATH with the real path of avidemux (if change of the hard disk is necessary type the first 2 characters of the hard disk. e.g.: D:)[\li]
        • Start avsproxy with "avsproxy.exe PATH\TO\AVS_SCRIPT.avs" with the real path used here[\li]
          • Open avidemux and connect to the avsproxy[\li]
          Hope I've described the things correctly, as I currently don't have access to a windows at all
          Some more information can be found here: http://avidemux.org/smuf/index.php/topic,16330.0.html

          /edit
          Just a thing that pops up in my head. Do you use relative or absolut paths within your avisynth scripts?
          In case you're using relative paths, it might be possible that you're using two different dll files causing the problem