Log in

View Full Version : New AviSynth tool - AvsP v1.4.0 (6/5/07)


Pages : 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17

Dreassica
23rd February 2007, 10:46
I know that, but i get a "unknown mode"error when i select it in Macros menu.

foxyshadis
23rd February 2007, 13:06
It's probably because you already have something open. You have to start from a completely clean slate, closing all files and having only a single empty tab open. It's a proof-of-concept thing, I guess, so it's not very robust.

Dreassica
23rd February 2007, 13:28
Thanks, that seemed to do the trick. Only issue i have now is that its seems to have stretched the progress/slider bar vertically with teh 4 scripts open, so i can barely see any video preview, and no way to set it back to normal manually.

unskinnyboy
23rd February 2007, 15:22
Feature Request: Support for *.dga files.

@qwerpoi, DG has released (http://forum.doom9.org/showthread.php?t=122598) DGAVCDEC to enable AVC/H.264 indexing & decoding. Can AvsP be updated to load *.dga files as AVCSource(..) instead of DirectShowSource(..)?

krisq
23rd February 2007, 15:53
Feature Request: Support for *.dga files.

@qwerpoi, DG has released (http://forum.doom9.org/showthread.php?t=122598) DGAVCDEC to enable AVC/H.264 indexing & decoding. Can AvsP be updated to load *.dga files as AVCSource(..) instead of DirectShowSource(..)?

You can already add it yourself. Look at 'Options/Extension templates...' :)

Dreassica
23rd February 2007, 16:20
One usefull feature that would be nice to have is deletframe copyframe and freezeframe commands attached to a keystroke: ie. if u press d that it will delete the frame the slider is set on at that time and c to make a duplicate of the current frame.
Just don't have a clue if that's even feasible.

unskinnyboy
23rd February 2007, 16:24
You can already add it yourself. Look at 'Options/Extension templates...' :)Perfect, works fine. Maybe in the next release, this can be added as default.

foxyshadis
23rd February 2007, 16:57
One usefull feature that would be nice to have is deletframe copyframe and freezeframe commands attached to a keystroke: ie. if u press d that it will delete the frame the slider is set on at that time and c to make a duplicate of the current frame.
Just don't have a clue if that's even feasible.

This is possible with a few macros, hmm....

avsp.InsertText('DeleteFrame(' + avsp.GetFrameNumber() + ')')

Save as '[9] DeleteFrame.py' or so, restart AvsP and use Configure Shortcuts to assign it to whatever you like. A function key will probably be easiest. Repeat with the other variations.

Dreassica
23rd February 2007, 17:31
This is possible with a few macros, hmm....

avsp.InsertText('DeleteFrame(' + avsp.GetFrameNumber() + ')')

Save as '[9] DeleteFrame.py' or so, restart AvsP and use Configure Shortcuts to assign it to whatever you like. A function key will probably be easiest. Repeat with the other variations.


Tried it, get an error when I try the keycombo I set the macro to:
"Error in Macro: Cannot concatenate 'str' and 'int' objects"

foxyshadis
23rd February 2007, 17:52
I was close, just forgot that it isn't that close to javascript. :p Try this, which I actually tested this time:

avsp.InsertText('\nDeleteFrame(%i)' % avsp.GetFrameNumber())

qwerpoi
23rd February 2007, 19:29
qwerpoi, thanks for this new version

new tranlation update
Thanks for the translation update! I'll update the links when the attatchment gets approved.

Feature Request: Support for *.dga files.

@qwerpoi, DG has released (http://forum.doom9.org/showthread.php?t=122598) DGAVCDEC to enable AVC/H.264 indexing & decoding. Can AvsP be updated to load *.dga files as AVCSource(..) instead of DirectShowSource(..)?
You can already add it yourself. Look at 'Options/Extension templates...' :)
Perfect, works fine. Maybe in the next release, this can be added as default.
Huh, I didn't know about DGAVCDEC, I'll try and have it updated in the options for the next release. As krisq already mentioned, AvsP was designed to be easily updatable in case development should ever cease (god forbid :)), but I'll certainly try and keep popular formats up to date, so thanks for pointing that out.

I saw a manual telecide option in menu, but it doesn't seem to work? It's supposed to not work or just a menu item left in by accident?
It's probably because you already have something open. You have to start from a completely clean slate, closing all files and having only a single empty tab open. It's a proof-of-concept thing, I guess, so it's not very robust.
foxyshadis is right, basically anything in the Macros menu are not meant to be full-flegded features of AvsP. Their purpose is to provide examples as to how to make a functional macro, the fact that you may find a macro useful by itself is just a bonus :). The way I wrote the "Manual Telecide" macro is particularly sensitive, it requires the source script to be in the first tab and the "current", "next", and "previous" scripts to be in the subsequent tabs to work properly.

Thanks, that seemed to do the trick. Only issue i have now is that its seems to have stretched the progress/slider bar vertically with teh 4 scripts open, so i can barely see any video preview, and no way to set it back to normal manually.
Not sure what you mean here. You should be able to resize any subwindow; what's blocking the video preview?

One usefull feature that would be nice to have is deletframe copyframe and freezeframe commands attached to a keystroke: ie. if u press d that it will delete the frame the slider is set on at that time and c to make a duplicate of the current frame.
Just don't have a clue if that's even feasible.

I was close, just forgot that it isn't that close to javascript. :p Try this, which I actually tested this time:

avsp.InsertText('\nDeleteFrame(%i)' % avsp.GetFrameNumber())
The macro foxyshadis provided will work, but you don't need it if you're just trying to use the "Manual Telecide" macro. If you get everything up and running (ie, you have your telecide script in the first tab and the macro has generated the "current", "next" and "previous" scripts in the subsequent tabs), then you don't need to do any further scripting, the macro will make changes to the "telecide_override.txt" which will be reflected in the first script. The way this works is if you find a frame in the first tab you want to override, select the tab which contains the good frame and run the macro again. It will automatically update the "telecide_override.txt", switch back to the first tab, and refresh the video. You should see a message like "[forcing n]" on the video. It becomes clear that it's best to assign a keyboard shortcut to the macro, since you'll be running it frequently. Anyway, if you already knew all this, I apologize for the redundant explanation. If a lot of people really use this macro, I guess it would be worthwhile to write up a tutorial with screenshots on the website, since it really is pretty difficult to learn how to use the first time.

Dreassica
23rd February 2007, 19:44
Maybe using tfm instead of telecide would be wortwhile too. I tried my hand at the mnual telecide thing, and indeed it became rather tiresome after a while having to switch tabs and go to Manual Telecide in Macro menu to apply a certain match. eespecially for someone used to Yatta's press s to switch between c n p matches and it updating video on the fly.

Dreassica
23rd February 2007, 19:50
Not sure what you mean here. You should be able to resize any subwindow; what's blocking the video preview?


Don't know. I had it the first time i used it, but apparently the issue didn't re-appear from teh next session onwards.

digitalone
25th February 2007, 14:27
hey guys, AvsP was working perfectly till now and suddenly it has started giving me this error: "Error loading the script" when i try to preview my script. it was all working fine before i opened certain scripts in avsp and changed their extension to .avsi for autoload. now none of my scripts work while previewing.

Edit: sorted it out...some dlls got corrupted..

rig99
27th February 2007, 07:27
Is it possible to give the previewer more time to show the clip when using a macro? I have a macro that creates a script that needs to know height and width so it uses avsp.GetVideoHeight and GetVideoWidth. The problem is that after the macro is done and shows the preview, I see the preview shows an avisynth error clip and GetVideoWidth and GetVideoHeight report the width and height of that error clip instead of my clip.

There is nothing wrong with the script at all. The only time it shows the error clip is when the macro is finished running. In fact, pushing f5 right after the macro is done shows the correct clip (but with wrong resolution because the width and height were taken from the error clip).

qwerpoi
27th February 2007, 08:11
Is it possible to give the previewer more time to show the clip when using a macro? I have a macro that creates a script that needs to know height and width so it uses avsp.GetVideoHeight and GetVideoWidth. The problem is that after the macro is done and shows the preview, I see the preview shows an avisynth error clip and GetVideoWidth and GetVideoHeight report the width and height of that error clip instead of my clip.

There is nothing wrong with the script at all. The only time it shows the error clip is when the macro is finished running. In fact, pushing f5 right after the macro is done shows the correct clip (but with wrong resolution because the width and height were taken from the error clip).
Could you post your macro here? It would help when trying to fix your issue. Also, let me know some basic info about the kind of video you are using (d2v, large avi file, etc). If your macro's too long, try and post a smaller version which demostrates the problem.

foxyshadis
27th February 2007, 17:37
You could check out the home page - http://avisynth.org/qwerpoi/ - which could probably be included in the download as well. There's good info there, especially the video introduction.

The macro issue sounds like the macro is creating a partially formed script with a syntax error or three, causing the error. The actual request doesn't make sense if you think about it - if the script needs parameters from the rendered video to finish filling in the script, but the video needs the finished script to render itself, who wins? You'd need to construct a minimal working script, like source or source+deint only, grab the parameters, and then finish it or wipe and start fresh (with the handy-dandy new variables) once the render completes.

rig99
27th February 2007, 18:35
I fixed my problem by using the script itself to get width and height instead of using avsp.GetVideoWidth and Height. Now the scripts are created properly and all is good. It still shows the error clip though. I am curious why this error clip is shown. Heres the macro

from __future__ import division
import subprocess
import os



###### USER OPTIONS ##############################################
bepipe = r'C:\video\bepipe\bepipe.exe'
twolame = r'C:\video\twolame\twolame.exe'
outputpath = r'D:\tmp\prep ntsc dvd'
subtitlelog = r'true'
logfile = r'false'
# How many pixels wide for border on each side so tv wont cut picture off
overscan = 16
audiobitrate = 128
###### END USER OPTIONS ##########################################

audiosamplerate = 48000
dirName = avsp.GetDirectory()
TLIM = 0
LIM = 0

if dirName:
for fileName in os.listdir(dirName):
(fileBase, fileExt) = os.path.splitext(fileName)

if fileExt <> '.avi':
continue
else:
avsp.NewTab()


avsp.InsertText(
'#user defined #############################################################\n'
'video = "' + dirName + '\\' + fileName + '"\n'
'overscan = ' + str(overscan) + '\n'
'ShowInfoSub = ' + subtitlelog + '\n'
'#LogInfo saves a log file as <video>.log, in directory with original clip \n'
'LogInfo = ' + logfile + '\n'
'#end user defined ########################################################\n'
'\n'
'#needed functions ########################################################\n'
'function ToNTSC(clip a)\n'
'{\n'
' a = (Framerate(a)==25) ? Eval("""\n'
' global subinfo = subinfo + "ToNTSC(): was pal, changed to ntsc" + chr(10)\n'
' AssumeFPS(a,23.976,sync_audio=true)\n'
' return ResampleAudio(last,48000)\n'
' """) : Eval("""\n'
' global subinfo = subinfo + "ToNTSC(): already ntsc" + chr(10)\n'
' return a\n'
' """)\n'
' return a\n'
'}\n'
'function ToStereo(clip a)\n'
'{\n'
' a = (Audiochannels(a)==6) ? Eval("""\n'
' global subinfo = subinfo + "ToStereo(): was 6 channel, changed to stereo" + chr(10)\n'
' flr = GetChannel(a, 1, 2)\n'
' fcc = GetChannel(a, 3, 3)\n'
' lrc = MixAudio(flr, fcc, 0.3254, 0.2301)\n'
' bl = GetChannel(a, 5)\n'
' br = GetChannel(a, 6)\n'
' sl = MixAudio(bl, br, 0.2818, 0.1627)\n'
' sr = MixAudio(bl, br, -0.1627, -0.2818)\n'
' blr = MergeChannels(sl, sr)\n'
' MixAudio(lrc, blr, 1.0, 1.0)\n'
' """) : Eval("""\n'
' global subinfo = subinfo + "ToStereo(): already stereo" + chr(10)\n'
' return a\n'
' """)\n'
' return a\n'
'}\n'
'function StereoNTSCLog(clip a, string video, string s)\n'
'{\n'
' filename = RevStr(MidStr(RevStr(video), 1, FindStr(RevStr(video), "\") - 1))\n'
' path = RevStr(MidStr(RevStr(video), FindStr(RevStr(video), "\")))\n'
' return WriteFileEnd(a, path + filename + ".log", "s", append=false)\n'
'}\n'
'function ResizeNTSC(clip a, int overscan)\n'
'{\n'
' arW = Width(a)\n'
' arH = Height(a)\n'
' ofr = Framerate(a)\n'
' fc = Framecount(a)\n'
' stretchFactor = 640.0 / arW\n'
' prW = Int(stretchFactor * arW)\n'
' prH = Int(stretchFactor * arH)\n'
' prW = (prW%2<>0) ? prW-1 : prW\n'
' prH = (prH%2<>0) ? prH-1 : prH\n'
' cutLR = Int((640 - prW) / 2) + overscan\n'
' cutTB = Int((480 - prH) / 2)\n'
' a = LanczosResize(a, 720 - (2*overscan), prH)\n'
' a = AddBorders(a, cutLR, cutTB, cutLR, cutTB)\n'
' return a\n'
'}\n'
'\n'
'#end needed functions ###############################################################\n'
'\n'
'global subinfo = ""\n'
'myclip = AVISource(video)\n'
'myclip = EnsureVBRMP3Sync(myclip)\n'
'\n'
'myclip = ToNTSC(myclip)\n'
'myclip = ToStereo(myclip)\n'
'myclip = ResizeNTSC(myclip, overscan)\n'
'\n'
'myclip = LogInfo ? StereoNTSCLog(myclip, video, subinfo) : myclip\n'
'myclip = ShowInfoSub ? subtitle(myclip, subinfo) : myclip\n'
'return myclip\n'
'\n'
)

LIM = avsp.GetVideoFramecount()/23.976/60
TLIM = TLIM + LIM

avsp.InsertText(
'#this clip length in min: ' + str(LIM) + '\n' +
'#total: ' + str(TLIM)
)


if not os.path.exists(outputpath):
os.makedirs(outputpath)

avsp.SaveScriptAs(outputpath + '\\' + fileBase + '.avs')
avsp.ShowVideoFrame(avsp.GetVideoFramecount()//2)

batchfile = open(outputpath + '\\' + fileBase + '.bat', 'w')
batchfile.write('"' + bepipe + '"' +
' --script ' + '"Import(^' + outputpath + '\\' + fileBase + '.avs' + '^)"' +
' | ' + '"' + twolame + '"' + ' -s ' + str(audiosamplerate) + ' -r -N 2 -b ' + str(audiobitrate) + ' - ' +
'"' + outputpath + '\\' + fileBase + '.mp2"'
)

Spuds
28th February 2007, 15:45
I'm having a strange crashing issue with the 1.3.6 release. It only happens on startup of the program when the _last_session_.ses file is present.

If I delete that file the program starts normally and exits normally of course creating that file as well. When I go to restart I see a small window flash, it has some lines of text in it, and it then quickly disappears and nothing else happens.

The window comes and goes so quick that I can't capture what it says or its title to help further.

qwerpoi
28th February 2007, 19:05
I'm having a strange crashing issue with the 1.3.6 release. It only happens on startup of the program when the _last_session_.ses file is present.

If I delete that file the program starts normally and exits normally of course creating that file as well. When I go to restart I see a small window flash, it has some lines of text in it, and it then quickly disappears and nothing else happens.

The window comes and goes so quick that I can't capture what it says or its title to help further.
Thanks for letting me know. If you could upload the _last_session_.ses file somewhere, it would help me debug the problem. It's actually just a text file, so if you want you could post the contents here.

rig99
28th February 2007, 23:08
I have a feature suggestion. It would be great to have some type of function to get user input in macros. I looked into how to do it with python but I was pretty lost when it started talking about tk/wxpython. This feature would be very helpful.

steve77
28th February 2007, 23:21
Fantastic tool for editing AVS files... I love the sliderbars too!

Thanks so much :D

Steve

To think I was doing this by hand before...

qwerpoi
1st March 2007, 03:58
I have a feature suggestion. It would be great to have some type of function to get user input in macros. I looked into how to do it with python but I was pretty lost when it started talking about tk/wxpython. This feature would be very helpful.
You can use the function avsp.GetTextEntry(), check out the "Encoding example 2" macro to see it in action. If you just need a single entry, the syntax is pretty simple, you can use something like avsp.GetTextEntry('Enter your name:'). Keep in mind that the returned values are always strings, so it's your responsibility to convert them into integers or whatever you need (which is easy enough with Python).

And just so you know, the macro information on the website is a bit out of date, the "macros_readme.txt" is more accurate. I am in the process of updating the website to catch up with all the recent changes, should be ready by the next release.

Fantastic tool for editing AVS files... I love the sliderbars too!

Thanks so much :D

Steve

To think I was doing this by hand before...
You're welcome, glad you find it handy!

Spuds
1st March 2007, 04:21
Thanks for letting me know. If you could upload the _last_session_.ses file somewhere, it would help me debug the problem. It's actually just a text file, so if you want you could post the contents here.

Here is an example save session file that takes it down, hope you can reproduce it on your system. If not let me know what I do to capture that screen for you or provide more details.

http://rapidshare.com/files/18803628/_last_session_.zip.html

rig99
1st March 2007, 04:55
You can use the function avsp.GetTextEntry(),

:stupid: I feel like such a boob. Must have overlooked it. Thanks.

qwerpoi
1st March 2007, 09:47
:stupid: I feel like such a boob. Must have overlooked it. Thanks.
Not a problem, glad I could help.

Here is an example save session file that takes it down, hope you can reproduce it on your system. If not let me know what I do to capture that screen for you or provide more details.

http://rapidshare.com/files/18803628/_last_session_.zip.html
Unforutunately I didn't get the error on my computer. The only thing I noticed is that in the script, for some reason there is a unicode apostrophe (line 187, col 108). That shouldn't cause any problems (unless possibly you're using the win98 version?), but try and get rid of it and see if there's still an issue. Also try and close all tabs and restart AvsP and see if you still get the error. I'll be able to do tests on a different pc tomorrow, but in the meantime let me know if any of that does anything.

Spuds
1st March 2007, 20:12
Awesome call, looks like your assumption was correct. I removed that line and it it no longer abends while starting.

I then went to the end of the offending line and began to backspace over the text and found two things that the program did not like while running. Here it showed the error as I backspaced over the character, the two error screens are:

wxPython:stdout/strerr
Traceback (most recent call last):
File "AvsP.py", line 1059, in OnKeyUp
UnicodeDecodeError: 'ascii' codec can't decode byte 0x99 in position 0: ordinal not in range(128)


wxPython:stdout/strerr
Traceback (most recent call last):
File "AvsP.py", line 1059, in OnKeyUp
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)

The error was a comment line that was a cut/paste into the program from a readme or html file. Also this was not the win98 version, I'm running windows XP MCE.

qwerpoi
2nd March 2007, 02:47
Awesome call, looks like your assumption was correct. I removed that line and it it no longer abends while starting.

I then went to the end of the offending line and began to backspace over the text and found two things that the program did not like while running. Here it showed the error as I backspaced over the character, the two error screens are:


The error was a comment line that was a cut/paste into the program from a readme or html file. Also this was not the win98 version, I'm running windows XP MCE.
Aha, thanks for pointing it out. The exact bug took me a while to catch because it doesn't occur unless you customize your AviSynth functions (!), it's basically an invalid ascii/unicode comparison. I'll have it fixed by the next release, which hopefully should be sometime over the weekend.

I fixed my problem by using the script itself to get width and height instead of using avsp.GetVideoWidth and Height. Now the scripts are created properly and all is good. It still shows the error clip though. I am curious why this error clip is shown.
I took a detailed look at the macro, foxyshadis was right, in your case it's most appropriate to get the video height and width from AviSynth as you did (although it is possible with avsp.GetVideoWidth(), you would have to create the script twice). Can you tell me what error clip you are seeing? I tried your macro on a directory of avi files on my computer, seems to work fine. One thing I noticed was that the script your macro creates crashes AviSynth (not AvsP) occasionally, it looks like it's due to the fact that the cutTB variable in the ResizeNTSC function was negative on some of my AVIs.

Other than that, I have to say that the macro looks pretty cool, it's nice to see someone utilizing some advanced Python with AvsP :).

rig99
2nd March 2007, 07:35
Can you tell me what error clip you are seeing? I tried your macro on a directory of avi files on my computer, seems to work fine. One thing I noticed was that the script your macro creates crashes AviSynth (not AvsP) occasionally, it looks like it's due to the fact that the cutTB variable in the ResizeNTSC function was negative on some of my AVIs.

The error clip says
Error initializing audio stream decompression:
The requested conversion is not possible.
Check to make sure you have the required codec.
(d:\dvd\lkj\preview.avs, line 68)

On line 68 I have "myclip = AVISource(video)" where video is path to the video.

Also, if it is not too much trouble could you tell me the resolutions of the videos you get the crashes on? I'd like to knock that out before I encounter it trying to prep my dvds.

Thanks, I really appreciate you making this program. It will really make the prep work for dvd authoring much easier.

qwerpoi
2nd March 2007, 08:14
The error clip says
Error initializing audio stream decompression:
The requested conversion is not possible.
Check to make sure you have the required codec.
(d:\dvd\lkj\preview.avs, line 68)

On line 68 I have "myclip = AVISource(video)" where video is path to the video.

Also, if it is not too much trouble could you tell me the resolutions of the videos you get the crashes on? I'd like to knock that out before I encounter it trying to prep my dvds.

Thanks, I really appreciate you making this program. It will really make the prep work for dvd authoring much easier.
The problem videos had a resolution of 352 by 288, which resulted in a cutTB value of -21 (the tested videos were video game speed runs I downloaded, in case you were wondering what the hell's up with that resolution :)).

One thing you could try with the macro is slowing it down yourself by adding time.sleep(1.0) at the end of the for loop (you'll need to add import time at the top). I'm not sure if that will solve the problem though. You probably already know this, but if you don't specifically need to view each video, you could run the whole thing without loading the scripts into AvsP like in the "Batch example" macro. That may not be what you want, but it might be a usable workaround for the moment.

foxyshadis
2nd March 2007, 08:31
The error clip says
Error initializing audio stream decompression:
The requested conversion is not possible.
Check to make sure you have the required codec.
(d:\dvd\lkj\preview.avs, line 68)

On line 68 I have "myclip = AVISource(video)" where video is path to the video.

So the video fails to open one time, but opens okay the second time, without messing with codecs or anything? That's weird, usually if it won't open at once, it won't open at all; it's the AVIStreamSource and System Exceptions that tend to be ephermal.

foxyshadis
5th March 2007, 05:40
There seems to be a little problem with the image saving; trying to save a 256x256 will instantly crash the program. :p

qwerpoi
5th March 2007, 07:26
There seems to be a little problem with the image saving; trying to save a 256x256 will instantly crash the program. :p
I tried saving a frame from the script "Version().BicubicResize(256, 256)", didn't have any problems. I also tested some avi files, rgb, yv12, etc. Does this crash occur for you on all videos, or just some specific videos? Does the crash also occur if you tried the same thing with vdub?

foxyshadis
5th March 2007, 08:05
Hmm, it only seems to happen in RGB mode, now that I'm testing further. Not all the time, but the smaller it is the more often it seems to crash. I can't get it to reliably happen, though, and there's a good chance the underlying problem is avisynth's; it's doing that annoying disappearing crash every so often while changing around how I crop Version(). I guess I'll have to make a debug avisynth.dll again.

Feature request: Ability to turn off asking about saving tabs. It's nice that it does it, but when you like having 10 unsaved (or unnamed) tabs open, it gets a little overbearing. I love temporary scripts, I don't know how I ever got on without them. >.>

Oh yeah, another thing I was wondering about was single instance, if it's possible. A global mutex (or the budget version, exclusive open file lock) would prevent it from running in multi-session systems, but then again you could add the session ID to the test.

ps, I replicated the crash outside AvsP, it's a memory corruption thing, sorry for the bad report.

Minor bug: In the default function definitions, ConvertToBackYUY2 should be ConvertBackToYUY2. =p

jubilex
7th March 2007, 07:16
Okay, the fact that the window resizes to the appropriate size implies that the avs script is being loaded. If not even the simplest of scripts display anything (try a script like "Version()", or try doing a preview of no text at all), there may be a refresh issue (I'm stretching, I know). Try posting a screenshot of the entire program so I can see the script and the video preview, and also make sure you don't overlook any error messages (they might pop up in a separate window).


Was this problem ever solved? I am having the same thing happen to me -- no video preview at all, but the preview pane is sized correctly, slider works, etc. Works fine when I use external preview. Version() and avisynth errors DO display in the preview pane. And like the other guy, the preview USED to work for me (and still does on another machine). Not sure when or why it stopped working.

qwerpoi
7th March 2007, 09:53
Feature request: Ability to turn off asking about saving tabs. It's nice that it does it, but when you like having 10 unsaved (or unnamed) tabs open, it gets a little overbearing. I love temporary scripts, I don't know how I ever got on without them. >.>
No problemo, it'll be in the next release (coming very soon...).

Oh yeah, another thing I was wondering about was single instance, if it's possible. A global mutex (or the budget version, exclusive open file lock) would prevent it from running in multi-session systems, but then again you could add the session ID to the test.
It's possible, but when I tried implementing it a while ago I needed to import the socket library in python, which added about a megabyte to the program size. I'll look into it some more. In reality I don't know much about mutex and socket stuff, so any help here is appreciated :o .

Minor bug: In the default function definitions, ConvertToBackYUY2 should be ConvertBackToYUY2. =p
Whoops :p . It'll be fixed in the next release.

Was this problem ever solved? I am having the same thing happen to me -- no video preview at all, but the preview pane is sized correctly, slider works, etc. Works fine when I use external preview. Version() and avisynth errors DO display in the preview pane. And like the other guy, the preview USED to work for me (and still does on another machine). Not sure when or why it stopped working.
This is pretty difficult to understand, I can't imagine why it would work one day and not the next. I'll be releasing a new version sometime today or tomorrow, the display code's changed a bit, so be sure to try it out and let me know if the problem's still there.

jubilex
7th March 2007, 17:04
Just solved it (finally). I believe the thing that fixed it was setting the Raw Video in FFDShow to All Supported. No idea how that would have gotten switched off (assuming I had it on before, which I'm pretty sure I did), but preview is working now.

Thanks for a fantastic program.

qwerpoi
7th March 2007, 20:36
New version 1.3.7, get it from the download page (http://avisynth.org/qwerpoi/Download.html) or from the mirror (http://savefile.com/files/536560). Windows 98 users should download from here (win98) (http://savefile.com/files/536571). The download's a little bigger this time (5.1 MB), but only because I included an offline copy of the website as documentation. Here's the (huge) changelog:
* make up/down/left/right video shortcuts editable (suggested by Alain2, avid_avs_user)

* removed modifier restrictions for keyboard shortcuts (suggested by avid_avs_user)

* allow language translation for Ctrl, Alt, Shift (suggested by Henrikx)

* added menu items for trim selection start/end (suggested by avid_avs_user)

* added ability to export/import individual filter presets (suggested by krisq)

* added pixel position and color information to status bar (suggested by nibbles, jmac698)

* added macro to get filter info from avisynth (needs Avisynth 2.5.7+) (contributed by tsp)

* added ability to label user slider separators (suggested by R3Z)

* added ability to free all script videos from memory (suggested by foxyshadis)

* use the source filename as default in the file save dialog (suggested by Zarxrax)

* updated extension-based templates with .dga files and AVCSource() (suggested by unskinnyboy)

* added option to not prompt to unsaved scripts on program exit (suggested by foxyshadis)

* added several help menu items linking to website documentation

* improved subwindow layout management

* improved calltip displaying during window focus/motion

* minor changes to the display code

+ fixed issues with syntax highlighting default style (thanks Alain2)

+ fixed bug with unicode characters in script (thanks Spuds)

+ added workaround for top-level variables in macros (thanks tsp)

+ fixed minor bug when switching from zoom fit to regular zoom

+ fixed several subwindow positioning issues

This release probably has more subtle improvements compared to the last one, but they're very important changes in my eyes. The most important change is that the window layout management has been greatly improved. The video and slider windows are now positioned on a tab per tab basis, the slider window is automatically hidden if the script has no sliders, I squashed some annoying bugs which caused strange window layout when the program changed size, etc, etc. Just try it out, you'll see things run smoother with respect to managing windows.

Another major change is that I reworked the entire way the program registers keyboard shortcuts. This doesn't mean much to most users, but now you can finally edit the prev/next frame/sec/min shortcuts. This also means that language translators can finally translate the Ctrl/Alt/Shift names (bet you thought I forgot about that :)). I also removed the shortcut modifier restrictions, you can now assign anything you want as a keyboard shortcut - just don't come complaining to me when you find out you can't enter the letter "a" in a script anymore :p .

There's also a new macro contributed by tsp, the "Update Function Definitions" macro. This is very cool - if you're running AviSynth 2.5.7 or above, try running the macro. You'll find that every single plugin you haven't added to AvsP's function definition list (which controls syntax highlighting, autocompletion, and calltips) will now magically be there, along with the function arguments. Amazing! Basically the macro is pulling the information directly out of AviSynth, powerful stuff. It's been discussed before, but this macro doesn't depend on additional dlls and isn't version specific (although as I mentioned you'll need a recent version). Actually, I plan to fully integrate this into the program once everything is streamlined, in theory it's possible you'll never have to manually update filter names and arguments in AvsP again. Again, big thanks to tsp for the contribution.

On a related note, you can now export your filter customizations to a file, which you can give to someone else to import. It's a little different then simply giving someone your filters.dat file, here you can choose specific filters to export, they can choose specific filters to import, they can choose to only update but not overwrite, etc. This is useful if you've set up a lot of presets for filters, which is currently the best way for storing user sliders per filter, and you want to share them with others. Anyway, you can read more about it here (http://avisynth.org/qwerpoi/Text.html#export-import-filter-customizations).

There's some new info on the status bar now, when the video is focused you can move the mouse over regions of the video to see the pixel xy coordinates and color. The color format shown is defaulted to hexadecimal, but you can change the format to rgb or yuv in "Options -> Program settings..." under the "Video 1" tab. The pixel coordinates and colors should be accurate regardless of the video preview zoom or scrolled position. Note that I realize this isn't quite optimal as a full-blown color picker, I'm still considering the best way to put a feature like that together.

Some other smaller stuff that needs discussion. You can now stop AvsP from prompting to save files on program exit (it's not needed since AvsP automatically saves all scripts as a session on exit), go to "Options -> Program settings..." and uncheck "Prompt to save scripts on program exit". Another feature requested a while ago - when you save a new script, AvsP will try and guess the filename of the first source and use that as the default directory and name in the Save As.. dialog. For example, if you make a new tab and enter "AviSource("C:\movies\test.avi")", then when you save the file the dialog box starts in the directory "C:\movies" and the initial filename is "test.avs". The detection is not extremely sophisticated, basically AvsP finds all the strings in the script, and uses the first string that's both an existing file and has a source file extension (as defined by the extension-based templates). Finally, you can now have labels for user slider separators, looks nicer than I thought it would, check out the screenshot and read more here (http://avisynth.org/qwerpoi/UserSliders.html#user-slider-separators).

Other than that, you'll notice that I updated the website finally, and as I mentioned before an offline version is now included with the download (in the "help" directory). The help menu in AvsP now links to some of these pages, it will open the online urls if it can't find the offline version. I changed the home page to include the changelog, and added an about page (with some testomonials from this thread :)). I still need to update the flash tutorial, though. If you notice any other inconsistencies or things which need explanation, let me know. Anyway, be sure to report back with any new bugs or feature requests.

Terranigma
7th March 2007, 20:39
Thanks for making the best avisynth gui text editor even better :devil:
Downloading now.

Interesting..
added ability to free all script videos from memory (suggested by foxyshadis)
That's very nice/useful right there. This should speed things up after say, previewing a script that consumes a lot of memory such as mvdegrain2 with a blksize of 4, fft3d, mcbob, eedi2, or Didée's motion compensated denoising script. :)

Fizick
7th March 2007, 23:09
qwerpoi,
1. can you provide old 1.3.6 version of _translation.py file ?
2. how I can add link to Russian readme.txt without replacing english file?

Terranigma
8th March 2007, 00:07
qwerpoi,
1. can you provide old 1.3.6 version of _translation.py file ?

you can download version 1.3.6 (which includes your requested file) here (http://www.avisynth.org/qwerpoi/AvsP_v1.3.6.zip)

Spuds
8th March 2007, 01:53
Just finished the downloading and initial test ... First the Update Function Definitions macro is too sweet ! Is there a way to set the initial doc path/url for the function help file or could it remember the last path searched ?

On the unicode characters error I have good and bad news. The good is I don't get the error when I back over them after loading the script, the bad is the program still abends when I load the script - exit - restart, I can see the python pop up for a split second but can't capture it to tell you what it says.

qwerpoi
8th March 2007, 03:06
Just solved it (finally). I believe the thing that fixed it was setting the Raw Video in FFDShow to All Supported. No idea how that would have gotten switched off (assuming I had it on before, which I'm pretty sure I did), but preview is working now.

Thanks for a fantastic program.
Thanks for finding that out. I'll try and compile an FAQ for the website, this will definitely be on it.

That's very nice/useful right there. This should speed things up after say, previewing a script that consumes a lot of memory such as mvdegrain2 with a blksize of 4, fft3d, mcbob, eedi2, or Didée's motion compensated denoising script. :)
Heh, you should thank foxyshadis for that, it's a kind of strange feature request, one I wouldn't have thought up myself, but as you mention it certainly can be useful.

qwerpoi,
1. can you provide old 1.3.6 version of _translation.py file ?
2. how I can add link to Russian readme.txt without replacing english file?
1. Sure, download from here (http://avisynth.org/qwerpoi/__translation_v1.3.6.py) (right click and save as).

2. Actually, I took the link to the readme.txt in the Help menu out of this version, since it's pretty out of date compared to the website docs, sorry. But the issue's still there with the new links to the website docs, so I'll try and make those paths configurable in the next release. Actually, if anyone is interested in translating the website, let me know, I can give you the raw text source to translate, which I can then convert to html. However, it's a really huge amount of text so I wouldn't recommend it unless you've got a lot of time on your hands :).

Just finished the downloading and initial test ... First the Update Function Definitions macro is too sweet ! Is there a way to set the initial doc path/url for the function help file or could it remember the last path searched ?
Good point, in the next version I'll have it default to the avisynth program directory, and possibly have it remember the last path searched as well.

On the unicode characters error I have good and bad news. The good is I don't get the error when I back over them after loading the script, the bad is the program still abends when I load the script - exit - restart, I can see the python pop up for a split second but can't capture it to tell you what it says.
Hum, that's disappointing news. I've never gotten the error popup on startup, could you be more descriptive with what's happening? Does the error close AvsP on startup? One thing to make sure of is that you don't use a session file from the new version with an old version, that's likely to cause an error. Does anyone else notice this issue?

Terranigma
8th March 2007, 03:30
Does anyone else notice this issue?
Yes, it closes AvsP on startup. Now I haven't encountered this problem with 1.3.7 just yet, but I did encounter it with 1.3.6 and 1.3.5. I could'nt pinpoint exactly why it was erroneously crashing. It would, however, sometimes say something about the avisynth script containing unicode characters.

Eggroll
8th March 2007, 04:54
Just recently discovered avsP and starting to seize the potential of this application in script editing.

I was wondering if there was a possiblity to store (and access) global variables in a macro so another macro could use a global variable stored in a previous macro?

It could take the form of a key/value dictionary in avsp object that would allow different macros to access the same dictionary and fiddle with previously saved values.

Thanks in advance, keep on the good work.

Spuds
8th March 2007, 05:08
Finally got a capture of that allusive startup error window !! As Terranigma noted is closes AvsP on startup.

http://img80.imageshack.us/img80/6562/capturepz7.jpg

krisq
8th March 2007, 10:40
Excellent work qwerpoi, as always :).
Something cool came to my mind lately. When you make a preset like

LeakKernelDeint (order=0, threshold=6, sharp=true, map=false)

it would be nice if we could do something like

LeakKernelDeint (order=%C, threshold=6, sharp=true, map=false)

where %C is the cursor so that way we could immediatley edit this value without scrolling to it. What do you think?

Henrikx
8th March 2007, 10:55
@qwerpoi

:thanks:

Update German Translation 1.3.7

khs81
8th March 2007, 13:37
Hi!
At first, I want to thank qwerpoi for the nice job.
:thanks:
Second: we prepared an italian translation for the tool (for the version 1.3.6). You can find it here (http://people.ee.ethz.ch/~rporetti/AvsP_Trad/AvsP_1.3.6_translationITA.zip)

foxyshadis
8th March 2007, 13:44
Excellent work qwerpoi, as always :).
Something cool came to my mind lately. When you make a preset like

LeakKernelDeint (order=0, threshold=6, sharp=true, map=false)

it would be nice if we could do something like

LeakKernelDeint (order=%C, threshold=6, sharp=true, map=false)

where %C is the cursor so that way we could immediatley edit this value without scrolling to it. What do you think?

Could be done by shifting to macros, but certainly not half as convenient. Thanks for mentioning it, I didn't even realize AvsP had presets. Guess I'm skimming the changelogs a little too fast!