Log in

View Full Version : AvsPmod 2.5.1


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21] 22 23 24 25 26

StainlessS
25th September 2013, 16:26
@BiOSsCZ, Check your script or your added macros for an odd character. Could also post script here.
EDIT: I think I've also seen similar 'bad character range' errors in this thread if an odd character is used in a dll filename, eg '-'.
Filename nodes should only be Alpha Numeric, underscore '_' and dot for extension.

@jtan2000, 'avs_delete_script_environment' added in avisynth v2.6a4+ I think, perhaps you are using an earlier version ie v2.6a3 or earlier.

(JFYI, v2.6a4 and earlier, no longer supported v2.6 versions).

steptoe
29th September 2013, 09:12
Has anybody written avsp plugin functions for the filters despot and also descratch

I've tried to create them myself to add to the wiki database but there are quite a few parameters I'm getting lost in creating the sliders


http://avisynth.org.ru/despot/despot.html

http://avisynth.org.ru/descratch/descratch.html

Many thanks

sl1pkn07
29th September 2013, 23:15
latest git make segfault for me (archlinux 64bits)

http://sl1pkn07.no-ip.com/paste/view/14c07bdb

greetings

manma
14th October 2013, 05:53
Can't seem to launch without a segfault either. I'm on Ubuntu 13.10.

vdcrim
15th October 2013, 17:58
Can't seem to launch without a segfault either. I'm on Ubuntu 13.10.
Works here with Ubuntu 13.10 beta 2 and wxPython 2.9.5, but I'm not particularly surprised as wxPython on *nix seems a bit buggy (both 2.8 and 2.9).

In case you're also considering Wine, I'll let you know that the preview works but it still crashes for me on autocomplete as of Wine 1.7.

ultim
15th October 2013, 22:58
Hi vdcrim, I was wondering if I could ask you a small modification to AvsPmod to fully support Avisynth+. I'd really do these myself, but I don't know any phyton.

In the latest build I've publiushed today, I've added back the $PluginFunctions$ and $InternalFunctions$ variables based on the new plugin system. A small modification to AvsPmod would be needed, because Avisynth+ supports specifying plugin directories inside .avs scripts, so it cannot export $PluginFunctions$ without having run a script. $InternalFunctions$ is not affected and will work just like with traditional Avisynth. But $PluginFunctions$ is exported only when autoloading finally happens, and autoloading happens on demand when a script calls a not-yet-known function. So I've come up with the following way, that supports both classic Avisynth and Avisynth+.

1. After having loaded a script and executed a frame, call AutoloadPlugins() using Invoke. AutoloadPlugins() will do nothing if autoloading already happened, e.g. when the script already caused Avs to load plugins. But a script might only use internal functions, in which case you need to force loading plugins using AutoloadPlugins(), to make $PluginFunctions$ available. After the script has run at least once, there is no harm in calling AutoloadPlugins multiple times, so just call it in every case and you'll have $PluginFunctions$.
2. Also call AutoloadPlugins() on startup. This is so that the user can have a list of plugin functions even when he has no script yet.
3. After each call to AutoloadPlugins(), load/parse $PluginFunctions$ (and also the Plugin!..!Param vars if you make use of them). Their format has not changed.
4. Each time before loading a a script, Avisynth's script environment should be closed and recreated, so that different versions of the same script cannot interfere with each other's plugin search paths. I think AvsPmod is already doing this, so there might be nothing to do here.

The only thing to watch out for is that AutoloadPlugins() only exists in Avisynth+, not in classic Avisynth. So before calling it, check for its availability (avs_function_exists), to prevent classic Avisynth throwing exceptions at you.

It'd be great if you could make these modifications, and thank you.

vdcrim
16th October 2013, 01:47
Changes done. For now $PluginFunctions$ is retrieved only on start-up (definitions of functions added by calling AddAutoloadDir, LoadPlugin etc. are not added to the database).

Here's a new library.zip (http://www.mediafire.com/download/rgkd1xijrxhvaq0/library.zip) for anyone interested (overwrite the one on the lib subdirectory). It should also fix the crash reported in #1003 (http://forum.doom9.org/showpost.php?p=1645251&postcount=1003)

Edit: small update for AviSynth+ 2013.10.16

ultim
16th October 2013, 18:00
Changes done. For now $PluginFunctions$ is retrieved only on start-up (definitions of functions added by calling AddAutoloadDir, LoadPlugin etc. are not added to the database).

Here's a new library.zip (http://www.mediafire.com/download/rgkd1xijrxhvaq0/library.zip) for anyone interested (overwrite the one on the lib subdirectory). It should also fix the crash reported in #1003 (http://forum.doom9.org/showpost.php?p=1645251&postcount=1003)

Thank you for the awesome quick update!

sl1pkn07
25th October 2013, 17:48
hi

i have installed 2 versions of wxpython (2.8 and 2.9) in my linux (ver 2.9 have surfix in name to avoid collisions with 2.8 version)

howto launch avspmod with selected one or other?

greetings

vdcrim
25th October 2013, 18:09
Paste this at the top of avsp.py:
import wxversion
wxversion.select('2.8')

sl1pkn07
25th October 2013, 18:32
thanks man

i tested avspmod with both version, still segfaulting like http://forum.doom9.org/showpost.php?p=1646058&postcount=1006

:(


greetings

lansing
26th October 2013, 21:08
Hi, I've switch to the Avisynth+ version and I'm getting error messages loading scripts.

I'm using Windows 7 64bit and I'd put the 32bit avisynth.dll in to sysWOW64 folder.
I got "Error parsing plugin string at position 0:" on avspmod startup, and when I try to load a video, I'll get this error message:

Traceback (most recent call last):
File "avsp.pyo", line 5448, in OnIdle
File "avsp.pyo", line 13786, in ShowVideoFrame
File "avsp.pyo", line 14298, in UpdateScriptAVI
File "pyavs.pyo", line 682, in __init__
File "pyavs.pyo", line 155, in __init__
File "avisynth.pyo", line 244, in GetVar
avisynth.AvisynthError: NotFound

vdcrim
26th October 2013, 22:02
Read a few posts above.

Keiyakusha
14th November 2013, 17:06
vdcrim
There seem to be some kind of bug with high zoom with odd numbers like 9x, 11x or more. Part of the image from the right side (haven't checked bottom) gets cut off even if you move the slider is all the way to the right.
Also small feature request. Maybe you can add some kind of (optional) border around the video frame so that it will be easier to see where the video ends and where the GUI begins. Some equivalent to Addborders(8,8,8,8). The reason for that is with some video/system colors combinations it's not really obvious whether you look at video or at the windows form (unless you'll make zoom high enough for the pixels to be huge.
The reason I want it in avsp instead of using mentioned addborders is that personally i'll have this feature turned on always, also addborders gives not very accurate results possibly due to it being included into yuv-rgb conversion by avspmod.

vdcrim
14th November 2013, 17:37
There seem to be some kind of bug with high zoom with odd numbers like 9x, 11x or more. Part of the image from the right side (haven't checked bottom) gets cut off even if you move the slider is all the way to the right.
Can you give me a source resolution for which it happens? I can't reproduce it.

Also small feature request. Maybe you can add some kind of (optional) border around the video frame so that it will be easier to see where the video ends and where the GUI begins. Some equivalent to Addborders(8,8,8,8). The reason for that is with some video/system colors combinations it's not really obvious whether you look at video or at the windows form (unless you'll make zoom high enough for the pixels to be huge.
Currently there's a 5 px border, that as you said follows the current theme, but I can add a setting for choosing a custom color. Try this demo (http://www.mediafire.com/download/4iqp3it5i25uaf7/library_black_background.zip) (rename to library.zip and place it in the lib subdirectory) with background hard-coded to black.

Keiyakusha
14th November 2013, 18:07
Can you give me a source resolution for which it happens? I can't reproduce it.
720x480. Here try this. (https://dl.dropboxusercontent.com/u/110558786/Temp1/avspmod_test.png)
If I open avspmod, drag-n-drop the image, toggle video preview (embedded mode), set soom to 11x, move slider all the way to the right -> I don't see the "rainbow" at all. With 9x I only see it starting from blue color.


Can you give me a source resolution for which it happens? I can't reproduce it.

Currently there's a 5 px border, that as you said follows the current theme, but I can add a setting for choosing a custom color. Try this demo (http://www.mediafire.com/download/4iqp3it5i25uaf7/library_black_background.zip) (rename to library.zip and place it in the lib subdirectory) with background hard-coded to black.
I believe even border width depends on the windows theme. Thanks I'll try a bit later.

vdcrim
14th November 2013, 18:49
Here try this
Thanks. Apparently a bug on the gui framework that AvsP uses, but it's fixed on their going stable anytime now development series that the next AvsPmod release will probably use.

Keiyakusha
14th November 2013, 22:50
vdcrim
So I checked black background demo. While this is indeed what I had in mind, I think it might be beneficial to have some more neutral color. I at first I thought about option to change background color, but now I think maybe something like this (https://dl.dropboxusercontent.com/u/110558786/Seiga/86C1A534.png) is possible? (this is nothing more than photoshoped image, unfortunately). Of course if you think it looks any good. Personally I think it does looks nice.

vdcrim
14th November 2013, 23:39
So I checked black background demo. While this is indeed what I had in mind, I think it might be beneficial to have some more neutral color...
Yep, that's what I called it a demo :D. Here's the latest development library.zip (http://www.mediafire.com/download/rgkd1xijrxhvaq0/library.zip) with a new option in program settings -> video.
...but now I think maybe something like this is possible?I also think a pattern looks better, but it seems is not accepted as a clearing brush.

wOxxOm
14th November 2013, 23:43
That black background mod is quite cool for a change.
And it'd be awesome to be able to change the bg color via context menu à la photoshop (http://puu.sh/5iuIL/1dfe3debdd.png).

vdcrim
15th November 2013, 02:32
it'd be awesome to be able to change the bg color via context menu à la photoshop.
Link above updated, adding a video -> background color submenu and with the new option in program settings removed.

Keiyakusha
15th November 2013, 13:45
vdcrim
Hey, thanks for the update!

Also I seem to found some other issue. Here (https://dl.dropboxusercontent.com/u/110558786/Temp1/000946.7z), open this with Imagereader(). This is just a single YUV frame.
Now look at the 2 pixels from the left - they have some yellow and blue colors (https://dl.dropboxusercontent.com/u/110558786/Temp1/35FE9D5F.png).. b-but this frame does not have chroma information! Looks like it only affects left side of the image.

TurboPascal7
15th November 2013, 14:12
This is not an avspmod bug, at least I'm unable to reproduce it with avs+ (it's here with normal a5). No idea what fixed it though since I'm pretty sure ultim didn't modify YUV -> RGB24 conversion.

Keiyakusha
15th November 2013, 14:15
It doesn't happens if i open it in virtualdub for example.
Edit: or if i add converttorgb32() at the end. So this have to be something with avspmod.

TurboPascal7
15th November 2013, 14:20
It's related to ConvertToRGB24 in some way, which avspmod calls internally for YUV frames. This color bug won't appear if you convert the video manually to RGB32 for example. So it's a bug in avisynth and not avspmod.

vdcrim
15th November 2013, 14:24
It happens here with v2.6.0 alpha 5, but not with v2.5.8 or avisynth+.

Keiyakusha
15th November 2013, 14:27
Yeah true. It does happens with ConvertToRGB24 but not 32. So the possible fix is to use rgb32? I was always told that rgb32 conversion always should be preferred to rgb24 cause it's faster. Though its not some critical issue, I just found it interesting. Later I'll check previous v2.6.0 alpha releases and roll-back to that if some of them don't have this bug.

wOxxOm
15th November 2013, 15:46
I was always told that rgb32 conversion always should be preferred to rgb24 cause it's faster.AFAIK this is the reason why truecolor display modes are 32-bit rgb (on windows at least).Though its not some critical issue, I just found it interesting. Later I'll check previous v2.6.0 alpha releases and roll-back to that if some of them don't have this bug.
I think it won't harm AvsPmod to use ConvertToRGB32 instead of ConvertToRGB24 in pyavs.py.
At least no problems surfaced during my quick test, it even fixed the yellow-and-blue-colors-on-avs-2.6 bug mentioned above.

vdcrim
15th November 2013, 16:30
I was always told that rgb32 conversion always should be preferred to rgb24 cause it's faster.

AFAIK this is the reason why truecolor display modes are 32-bit rgb (on windows at least).

I think it won't harm AvsPmod to use ConvertToRGB32 instead of ConvertToRGB24 in pyavs.py.
At least no problems surfaced during my quick test, it even fixed the yellow-and-blue-colors-on-avs-2.6 bug mentioned above.
Interesting. I'll change it to ConvertToRGB32 then. It converted to RGB24 because DrawDib doesn't support transparency anyway.

LigH
15th November 2013, 16:31
32 bit modes should be faster due to the 32 bit alignment in memory and CPU register operations; and it's not only in Windows, Linux drivers will prefer 32 bit modes too (but there are tools which only report the visible 24 bit, so you may accidently enforce 24 bit modes if you select a video mode from a control).

DIB functions will probably ignore the "alpha" byte; more elaborate user interfaces may use it as opacity factor with an available background...

mastrboy
16th November 2013, 17:05
Hoping for some macro/python help for a macro function I'm trying to get make for avspmod:

The functionality I'm after is a input box where i can input a frame number and avspmod will navigate to the corresponding frame but, the frame before a a 29.970 -> 23.976 fps decimation.
The thing I need help with is the math of the function to calculate the frame number. (If it ends up being a decimated frame, it should go to the closest neighboring frame)

The explaination might be a little lacking so I'll provide an example of what I'm trying to achieve:
- I input frame 6 and click OK, avspmod should navigate to frame 12.

Keiyakusha
16th November 2013, 19:06
mastrboy
Not sure if I understand. You enter frame 6 that corresponds to 23.976 fps, but your opened video is 29.970 and you want to see the frame you have in mind?
I guess it's x*1.25 where x is your input. But if your input frame is from the source decimated by lets say TDecimate, your results maybe off by a few frames here or there.

For example frame 123 in 23.976 fps is a frame 154 in 29.970

mastrboy
16th November 2013, 22:04
If I understood your post right, what I'm looking for is the opposite.

Consider this script:
Sourcefilter(videofile)
TFM()
Tdecimate()

Now, the source would be hard/soft pulldown 29.970 fps
But after Tdecimate, it would be 23.976

I'm trying to write a python macro that lets me input a frame number which should calculate the source frame after decimation and point go to the nearest/same frame in the avspmod timeline.

Considering my awful explanation about my "problem", let's try another example:
Source = 29.970 fps

script in avisynth =
Sourcefilter(videofile)
TFM()
Tdecimate()

After decimation and encoding file, is now 23.976 fps.

Looking at the log file from TFM after running tfm(output=test.log), let's say frame 26 and 99 was deinterlaced because their combing threshold exceed 80 (TFM defaults MI value).
Now, I want to check out how that frame turned out, but after decimation frame 26 and 99 isn't frame 26 and 99 anymore, they are located at a different number, and that number is what I'm trying to calculate...

wOxxOm
17th November 2013, 06:21
mastrboy, multiply by 0.8 then.

But there's another cool way of checking those frames actually:

generate tfm log (you already have that)
import tfm log via macros->Import bookmarks
run the following macro (name it bookmarks 30 to 24 fps.py for example):
bookmarks = avsp.GetBookmarkList(True)
avsp.ClearBookmarks()
avsp.SetBookmark([(b*0.8, t) for b, t in bookmarks])
And here's a macro for VFR-decimated video that uses tdecimate's mkv-timecodes log:
import sys, re, bisect, collections, math

def get_timecodes( file ):
with open(file) as f:
txt = f.read()
if not txt.startswith('# timecode format v1'):
return None
basefps = float(re.sub('^.+?Assume ([0-9.]+).*?$',r'\1',txt,1,re.S))
f2prev = 0
t = 0.0
Timecodes = collections.namedtuple('Timecodes',['frame','time','fps'])
tc = Timecodes([],[],[])
for L in txt.splitlines():
s = L.split(',')
if L and L[0].isdigit() and len(s)==3:
f1,f2,fps = int(s[0]), int(s[1])+1, float(s[2])
if f1 != f2prev:
tc.frame.append(f2prev)
tc.time.append(t)
tc.fps.append(basefps)
t += (f1-f2prev)/basefps
tc.frame.append(f1)
tc.time.append(t)
tc.fps.append(fps)
t += (f2-f1)/fps
f2prev = f2
tc.frame.append(f2)
tc.time.append(t)
tc.fps.append(0)
return tc


def frame_apply_VFR( frame, framefps, timecodes ):
t = frame / framefps
i = bisect.bisect( timecodes.time, t )
f1,t1,fps = timecodes.frame[i-1], timecodes.time[i-1], timecodes.fps[i-1]
f = f1 + math.floor((t-t1)*fps)
return f


############################################
f = avsp.GetFilename('Open timecode file', filefilter='Timecode format v1 (*.txt, *.log)|*.txt;*.log|All files (*.*)|*.*')
if f:
timecodes = get_timecodes(f)
fps = avsp.GetVideoFramerate()
fcount = avsp.GetVideoFramecount()
bookmarks = avsp.GetBookmarkList(True)
avsp.ClearBookmarks()
avsp.SetBookmark([(frame_apply_VFR(b,fps,timecodes),t) for b,t in bookmarks if 0<=b<fcount])

just press F2 or Shift-F2 to navigate
You will even see MI value in statusbar, just make sure there's %BM in options->video->customize statusbar.

mastrboy
17th November 2013, 13:58
Thanks wOxxOm.

That was a way better solution :)

BiOSsCZ
17th November 2013, 17:10
Exception WindowsError: 'exception: access violation writing 0x14CA1A04' in <bound method PClip.__del__ of <avisynth.PClip instance at 0x037E2F58>> ignored
Traceback (most recent call last):
File "avsp.pyo", line 9043, in OnMenuVideoRefresh
File "avsp.pyo", line 13855, in ShowVideoFrame
File "avisynth.pyo", line 462, in GetFrame
WindowsError: exception: access violation reading 0x00000000

What is bad?
Please help.

Mystery Keeper
18th November 2013, 05:38
Can we have an x64 build to work with VapourSynth x64?
Tried to build on my own. Here's the log:
E:\vs-sources\AvsPmod>E:\SDK\python27-x64\python-2.7.5.amd64\python build.py

Creating translation file...
*** avsp.py:76: Seen unexpected token "s"
*** avsp.py:6090: Seen unexpected token "+"
*** avsp.py:7648: Seen unexpected token "name"
*** avsp.py:7665: Seen unexpected token "root"
*** avsp.py:7670: Seen unexpected token "root"
*** avsp.py:7675: Seen unexpected token "root"
*** avsp.py:7680: Seen unexpected token "root"
*** avsp.py:7684: Seen unexpected token "root"
*** avsp.py:10068: Seen unexpected token "global_vars"
*** wxp.py:107: Seen unexpected token "s"
*** pyavs.py:40: Seen unexpected token "s"
*** pyavs.py:507: Seen unexpected token "."
*** pyavs_avifile.py:50: Seen unexpected token "s"
Couldn't find 'gdiplus.dll'

Press enter to continue

Mystery Keeper
18th November 2013, 06:06
Found the library and build AvsPmod. Trying to run.
"The application was unable to start correctly (0xc000007b)."

TurboPascal7
18th November 2013, 06:14
x86 platform is hardcoded in setup.py so you can't correctly build it without any source modification. I'd suggest you to wait for vdcrim to provide a binary.

vdcrim
18th November 2013, 15:58
Exception WindowsError: 'exception: access violation writing 0x14CA1A04' in <bound method PClip.__del__ of <avisynth.PClip instance at 0x037E2F58>> ignored
Traceback (most recent call last):
File "avsp.pyo", line 9043, in OnMenuVideoRefresh
File "avsp.pyo", line 13855, in ShowVideoFrame
File "avisynth.pyo", line 462, in GetFrame
WindowsError: exception: access violation reading 0x00000000

What is bad?
Please help.
Probably a plugin fault, try to get which one is it and then post where you grab it from and your AviSynth version.


Can we have an x64 build to work with VapourSynth x64?
AvsPmod doesn't currently support VapourSynth, it just does the trick of silently evaluating .vpy files with AviSource (or VSImport on the current git). So some work in order to support AviSynth+ x86-64 must be done first.

bxyhxyh
3rd December 2013, 15:36
I think ESC button should hide dropdown list or function arguments information text which appears when typing functions.
But instead doing that, it runs script. It is little bit annoying.

vdcrim
3rd December 2013, 15:59
I think ESC button should hide dropdown list or function arguments information text which appears when typing functions.
But instead doing that, it runs script. It is little bit annoying.
Go to options -> keyboard shortcuts -> advanced and check escape. I'll make it the default.

merrick
18th December 2013, 17:32
latest git make segfault for me (archlinux 64bits)

http://sl1pkn07.no-ip.com/paste/view/14c07bdb

greetings

I'm getting the same issue (Arch x64, python 2.7.6, wxpython 2.8.12.1).

I stepped through the code a bit with pdb: log here (http://pastebin.com/raw.php?i=DPFzFiPr). I don't really know python or have enough familiarity with the code to identify why it's segfaulting, but I thought it would at least help if I could point out where it was occurring.

Can anyone make sense of this?

sl1pkn07
8th January 2014, 04:42
more gdb, now with wxpython 3.0.0.0

http://sl1pkn07.no-ip.com/paste/view/921f8360

lansing
19th January 2014, 20:19
is there an option to display rgb value of the current cursor pixel in the status bar on the bottom?

poisondeathray
19th January 2014, 20:31
is there an option to display rgb value of the current cursor pixel in the status bar on the bottom?

options => program settings => video 1 tab => customize video status bar , choose %RGB instead of %HEX

see this post and screenshot
http://forum.doom9.org/showthread.php?p=1606575#post1606575

lansing
19th January 2014, 21:43
options => program settings => video 1 tab => customize video status bar , choose %RGB instead of %HEX

see this post and screenshot
http://forum.doom9.org/showthread.php?p=1606575#post1606575

thanks

whugemann
28th February 2014, 13:22
Last week I tutored a seminar on AVIsynth. On some computers it was impossible to drag 'n drop a video file into AvsPmod. Instead of inserting some text like "AviSource("filename")" it just did nothing.

I have never met this behaviour on one of my computers and I couldn't figure out the reason. Any ideas?

BTW: AvsPmod always inserts the full path to the video file when dragging 'n dropping, even when the video resides in the same folder as the AVS script. This needlessly produces an error when the folder which holds the video and the AVS script is moved to a new location. Couldn't AVSmod insert just the file neame in such a case?

wOxxOm
28th February 2014, 13:30
Instead of inserting some text like "AviSource("filename")" it just did nothing.Could be some quirky mouse software running in tray, or maybe those PCs had win95...

Couldn't AVSmod insert just the file neame in such a case?

Since I almost never use full paths I'd agree on that, but most probably some people will get annoyed. Maybe it should be an option or require Shift key being held while dragging?

wOxxOm
28th February 2014, 18:13
...just the file name instead of full path, use [***] in the template.Huh, nice to know. But it's not immediately usable in case of new scripts (e.g. you drag'n'drop a video onto avspmod's titlebar or tabbar), so I guess avspmod should set working dir of new scripts to the first file being drag'n'dropped - at least if [***] template was used for the file.