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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 22nd June 2011, 14:17   #521  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
@Dogway: FYI checking sharpness and such is meaningless at 480p (common anamorphic video size) per se, only when you see it scaled to an average viewing resolution (surprise!) using an average scaling method (bicubic/bilinear). Anyway a debugging tool would be a lot more handy to use if it provided an on-the-fly ratio correction coupled with resizing method selection.
wOxxOm is offline  
Old 22nd June 2011, 14:26   #522  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Quote:
Originally Posted by wOxxOm View Post
...coupled with resizing method selection.
https://github.com/chikuzen/ARDeformation
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline  
Old 22nd June 2011, 14:35   #523  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
@Dogway: and what? There are lots of ways I can do it manually in a script, but the proposal is to enhance AvsP out-of-the-box.
wOxxOm is offline  
Old 22nd June 2011, 16:13   #524  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Well, I can see both sides, but after looking at virtualdub's implementation, how can we make an implementation that's not so cluttered? As virtualdub shows, there are LOTS of different aspect ratios that people might want it to resize to. The only way to simplify it would be to simply not allow so many options. But then who is to say which aspect ratios are most important? We could add an option for the user to specify their own aspect ratio, but then that is adding even more complexity to a simple problem. On top of that, you have suggested that the user even be able to select which resizing filter is used.
With all of this its possible for the user to have to search through several menus looking for various items, when in the end all that had to be done was write 'LanczosResize(x,y)' at the end of the script.
At that point, you may as well have just used the resize calculator thats already present in Avsp.
I'm not really opposed to this idea, but let's think of a way to avoid complexity with it.
Zarxrax is offline  
Old 22nd June 2011, 16:34   #525  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
probably:
  • textfield in Options: Aspect ratios="4/3 16/9 2.35"
    so a user can add needed ratios by a mere typing/copypasting from wikipedia's list.
  • an example of common ratios in textfield label (below the label e.g.)
  • resize method selector could be a combobox/radiobutton list - BTW this option would be great also in case a user likes to see zoomed video the way it will be viewed in a common player and doesn't care about by-pixel fidelity of pointresize.
  • probably a checkbox [x] use for 1:1 ratio zoom as well

Last edited by wOxxOm; 22nd June 2011 at 16:46.
wOxxOm is offline  
Old 22nd June 2011, 18:40   #526  |  Link
ANGEL_SU
Registered User
 
Join Date: May 2007
Posts: 109
@wOxxOm
I will not do this, because this may cause the source code very hardly to maintain. I realize it when I implemented 'no delay zooming' before.

Insteadly, I will improve "Macro" menu. You can use file name/structure to create a submenu with check items or radio buttons. And then, you can easily accomplish this purpose by yourself.
ANGEL_SU is offline  
Old 22nd June 2011, 18:49   #527  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Thats actually a pretty good idea. If you do it through a macro, you can assign a keyboard shortcut to it, then its even easier than going through a menu.
Zarxrax is offline  
Old 23rd June 2011, 08:01   #528  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
Understood, but it won't help with ratio correction *on-the-fly without modifying avs-script*, however a nice addition anyway.

Not related to ratio, but to enhancing of the macro functionality: it'd be nice if more AvsP functions are exposed, such as those allowing to read script at arbitrary position (GetCurrentPos, WordStartPosition, WordEndPosition, GetTextRange) so that a keyboard macro like GoToFrameNumberUnderCursor would work without selecting the number first which is very cumbersome.

Last edited by wOxxOm; 23rd June 2011 at 08:05.
wOxxOm is offline  
Old 23rd June 2011, 17:53   #529  |  Link
ANGEL_SU
Registered User
 
Join Date: May 2007
Posts: 109
Quote:
Originally Posted by wOxxOm View Post
Understood, but it won't help with ratio correction *on-the-fly without modifying avs-script*, however a nice addition anyway.

Not related to ratio, but to enhancing of the macro functionality: it'd be nice if more AvsP functions are exposed, such as those allowing to read script at arbitrary position (GetCurrentPos, WordStartPosition, WordEndPosition, GetTextRange) so that a keyboard macro like GoToFrameNumberUnderCursor would work without selecting the number first which is very cumbersome.
I think macro function should not be too complicated. In fact, your requested functions are already existing somewhere. You can get the current script's handler like this:

script = avsp.GetWindow().currentScript

And then, hundreds of functions are available. See this link:
http://www.yellowbrain.com/stc/index.html

You can read 'Selection & Positioning' and 'Text setting and retrieval' firstly.

Last edited by ANGEL_SU; 23rd June 2011 at 18:05.
ANGEL_SU is offline  
Old 24th June 2011, 19:29   #530  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
insanely awesome, thanks... but avsp class has no GetWindow function - will it be added in future?
wOxxOm is offline  
Old 25th June 2011, 04:27   #531  |  Link
ANGEL_SU
Registered User
 
Join Date: May 2007
Posts: 109
Quote:
Originally Posted by wOxxOm View Post
... but avsp class has no GetWindow function - will it be added in future?
Sorry, i make a mistake. You can't call avsp.GetWindow() in macros, because it is only exposed for tools.

A tool script is very similar to a macro, except that you need to put .py file in 'tools' folder and define an entry function named avsp_run(). And then, write you code underneath this function.

e.g. a GoToFrameNumberUnderCursor.py will be like:
Code:
def avsp_run():
    script = avsp.GetWindow().currentScript
    cursorpos = script.GetCurrentPos()
    startpos = script.WordStartPosition(cursorpos, True)
    endpos = script.WordEndPosition(cursorpos, True)
    frametext = script.GetTextRange(startpos, endpos)
    avsp.ShowVideoFrame(int(frametext))
Anyway, in next version, GetWindow() will be available in macros.
ANGEL_SU is offline  
Old 25th June 2011, 08:08   #532  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
wow, thanks, a whole world of possibilities is already here! It indeed seems like there's no need to extend avsp macros class except for GetWindow().

p.s. at long last I've made PasteVideoCursorXY.py that pastes relative mouse coordinates into script :3 IMO this one and pasteColorAtCursor might be incorporated into AvsP.

Last edited by wOxxOm; 26th June 2011 at 00:16.
wOxxOm is offline  
Old 29th June 2011, 17:49   #533  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Really really big update here, but I'll just list the major points:

Version 2.2.0
- Reorganized several menus and changed some default settings to improve usability.
- Tabs can be repositioned and renamed.
- Scripts can be encoded without saving.
- Improvements to macros.
- When moving cursor on the preview, show pixel information even if the preview isn't focused.
- Frame number textbox can accept mm:ss format, and you can input -1 to go to the last frame.
- User sliders can have their values rescaled.
- MANY minor bugfixes and improvements

Info on the macro enhancements can be seen in the new examples and in the macros_readme.txt.

User slider values rescaling works by adding a + or - character to the sliders label.
Tweak([<"hue +", -180, 180, -180>]) > This will rescale the slider to use a value of 0 to 100 rather than -180 to 180.
Tweak([<"hue -", -180, 180, -180>]) > This will rescale the slider to use a value of -100 to 100 rather than -180 to 180.
This currently only works for user sliders inserted directly into the script (Edit>Insert>Insert user Slider)
Zarxrax is offline  
Old 29th June 2011, 18:43   #534  |  Link
Youka
Registered User
 
Youka's Avatar
 
Join Date: Mar 2011
Location: Germany
Posts: 64
One request:
I've done a filter, that can throw an error during frame filtering (in 'GetFrame' function). In MPC i'll see the error message, in AvsPMod, like in AvsP, i'm getting this error window:
Quote:
Traceback (most recent call last):
File "AvsP.pyo", line 7380, in OnMenuVideoRefresh
File "AvsP.pyo", line 11075, in ShowVideoFrame
File "AvsP.pyo", line 11662, in PaintAVIFrame
File "pyavs.pyo", line 343, in DrawFrame
File "pyavs.pyo", line 321, in _GetFrame
File "avisynth.pyo", line 332, in GetReadPtr
ValueError: NULL pointer access
Possible to fix that?
Youka is offline  
Old 29th June 2011, 21:07   #535  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
-Also I though about context highlighting, for example:
mask=mmask()
Here mask is a variable, there is no reason to be highlighted. The same when used as parameters. This can be paired with the last request from this post

-Also changing tab name, changes script name¿?

-when using autocomplete just before a function, the loaded function substitutes the older one.

-when frame skippin or jumping, video doesn't update upon script changes (until you hit f5, it keeps processing the old version of your script) (on v.2.1.7.1)
Im aware this is fixed in 2.2.0 ticking "Refresh preview automatically" but that produces you can't click on video preview anymore if you don't want to render preview, in this way you can't also navigate inside the preview when in zoom mode, or click over to focus video, or simply closing the context menu, etc, it should be a separate option...

-avspmod at launch complains about SSIM.0.25.dll. What's the problem with this? the points? aren't they alphanumeric?

-avspmod still has a very unstable performing when taking out plugins. It just doesn't want to launch with next message:
Code:
[Sun Jul 10 14:38:23 2011]
Traceback (most recent call last):
  File "run.py", line 6, in <module>
  File "F:\AvsPmod\src\AvsP.py", line 13810, in main
  File "wx\_core.pyo", line 7981, in __init__
  File "wx\_core.pyo", line 7555, in _BootstrapApp
  File "F:\AvsPmod\src\AvsP.py", line 13800, in OnInit
  File "F:\AvsPmod\src\AvsP.py", line 4143, in __init__
  File "F:\AvsPmod\src\AvsP.py", line 4857, in defineFilterInfo
TypeError: 'set' object does not support item deletion
However if I ticked back the check in the function of the function definition of these plugins, I could then take them out, and avpsmod could launch.

-crop editor doesn't allow input of more of 3 values.

-new feature: "Update avspmod". Useful for reloading plugins when you are taking them out/in, cleaning cache, or just for fixing the program UI drawing when it gets bugged due to any filter (without loosing actual project session)

-encoding creates a new script in my source folder

-Add to the video context menu, "copy avisynth error to clipboard"

-Can't go to time based input frame when video isn't cached.

-Can't go to frame from input frame box after having an avisynth error. It forces me to clean cache, really annoying and unconvenient when you are previewing synced tabs, a range of frames or just have a very slow script. (Actually this is another side effect of the 6th issue listed in this post)

-Customizeable yuv to rgb procedure (for when saving images or video preview, to take advantage of the newer filters) (You have converttorgb32, ResampleHQ, Dither, etc)

-Drag&Drop video preview to a tab to work over a cached source.

-Option to save image as "name of source"(+framenumber)

-When releasing video from cache, or losing focus on avspmod, frame input box refreshes (you lose whatever you wrote down there)

-Everytime you add a new version of the plugin, or replace them by an old one, even with the same filename, autocompletion keywords get reseted for that plugin.
Easy example: uncheck an autocompletion entry for a given plugin. Exit avspmod, move out plugin, start avspmod, exit avspmod, put back plugin, start avspmod, autocompletion resetted

-Ability to lock a tab (in order to avoid video preview update when misclicking)

-By default the preset input for autocompletion list (Tab hotkey) is overriden by Indent Selection (Also Tab hotkey) therefore it can be said it is a hidden feature. To enable it, change the Indent Selection hotkey/shorcut.

-Shortcuts are not stored in options.dat

-Options.dat cannot be imported succesfully until you manually edit the new avspmod version inside the file.

-new bug since the 15-12-11 update (and thus v.2.2.1 on). Open crop editor triggers the next error message:
Code:
Traceback (most recent call last):
  File "F:\AvsPmod\src\AvsP.py", line 4497, in OnIdle
  File "F:\AvsPmod\src\AvsP.py", line 8558, in OnMouseMotionVideoWindow
AttributeError: 'NoneType' object has no attribute 'LeftIsDown'

Last edited by Dogway; 16th January 2012 at 21:09.
Dogway is offline  
Old 29th June 2011, 21:46   #536  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Thanks a lot for the update, repositioning tabs is something I meant to request
SubJunk is offline  
Old 29th June 2011, 22:56   #537  |  Link
wOxxOm
Oz of the zOo
 
Join Date: May 2005
Posts: 208
Quote:
Originally Posted by Zarxrax View Post
- When moving cursor on the preview, show pixel information even if the preview isn't focused.
might be handy if the info is kept after pressing pane switch hotkey / typing - probably just add Line/Col at the start of custom statuses and make this combined statusbar shown permanently.

just found out that avs definition importer doesn't like comments /* */ inside function header

Last edited by wOxxOm; 29th June 2011 at 23:07.
wOxxOm is offline  
Old 29th June 2011, 23:18   #538  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Seems like maybe this update changed the preview caching, it seems like the preview pane gets cached after the second time now instead of the first, e.g. I preview one tab, go to another one, then go back to the first one and it reloads, but after that second load it doesn't do it again.
SubJunk is offline  
Old 30th June 2011, 02:24   #539  |  Link
Caroliano
Registered User
 
Join Date: Feb 2005
Location: São Paulo, Brazil
Posts: 392
Feature request: implement something like AVSMeter in tools menu. Maybe a button somewhere down in the player. Maybe even a keyboard shortcut! And negative fps metering!

I often want to know how slow is my script, and how the changes I do affect the speed. Inside AvsP, I can only feel it imprecisely by FFing the video preview.

Quote:
Originally Posted by SubJunk View Post
Thanks a lot for the update, repositioning tabs is something I meant to request
I wanted to say the same!

Caroliano is offline  
Old 30th June 2011, 13:34   #540  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Caroliano: there is an avs plugin that can be used for this purpose: http://home.pages.at/kassandro/AvsTimer/AvsTimer.htm
Zarxrax is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 19:56.


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