Log in

View Full Version : Avisynth 2.5.8/2.6 distorted error message


zyrill
18th January 2010, 14:29
Hi!

Since using Win7 64bit I get these strange distorted error messages when an Avisynth-script is erroneous and I was hoping somebody would be able to help me (see att.).

I rummaged around the forums but couldn't find any clues as to what this behaviour could be due to. Also, Avisynth in itself seems to work because I can load a clip and play it back. However sometimes I make errors in my scripts and without the error-messages it's a pain to debug.

Thanks in advance,

zy

wonkey_monkey
19th January 2010, 00:44
There is no function named "MVAnalyse"

I don't know why the video's been skewed like that - something failing to account for video pitch/wastage?

David

zyrill
19th January 2010, 01:59
davidhorman, how did you come by this clairvoyance trait you have just so convincingly shown? :) I mean, how did you account for the skew and make the error-message readable?

You say something is failing to account for video pitch/wastage - might I maybe provide more information so as to find a solution? And how would I check for that, anyway?

zy

wonkey_monkey
19th January 2010, 02:47
davidhorman, how did you come by this clairvoyance trait you have just so convincingly shown? :) I mean, how did you account for the skew and make the error-message readable?

Photoshop's "skew" :)

You say something is failing to account for video pitch/wastage - might I maybe provide more information so as to find a solution? And how would I check for that, anyway?

That's really just an ill-informed guess. What did you grab that screenshot from? I don't know how AviSynth generates its internal errors, but it could be down to a player not correctly handling video with a width (or pitch) that is not a multiple of 4. Each row of that image has to be shifted by 5 pixels to align it.

Loading your script with VirtualDub should present a readable error, since VirtualDub can return it in the form of an error popup.

David

LaTo
19th January 2010, 07:36
Since using Win7 64bit I get these strange distorted error messages when an Avisynth-script is erroneous and I was hoping somebody would be able to help me (see att.).

I have the same problem when I have an avisynth's error with Haali Renderer (in MPC)

zyrill
19th January 2010, 10:18
Avisynth does indeed show the error correctly. I wonder whether it's a bug in the player I use (http://www.koolplaya.de/ - it's a minimalistic [just over 100k] DirectShow player) or if Avisynth's DirectShow output is erroneous.

Hearing of LaTo's experience with MPC I'd say it's not a player-related issue, but then I don't know anything about DirectShow.

IanB
19th January 2010, 22:54
Your attached image is 629x357, I assume this is the actual captured size of the displayed window.

Many player components have trouble with image widths that are not a multiple of 4 (some even 8 or 16).

Not sure how your script errors out with such a strange size image. The normal error rendering code mostly chooses wide, short window sizes like 492x56. These being the result from GDI Text drawing Width and Height calls and then rounded up to a width that is a multiple of 4 and a height that is a multiple of 2. These rendered error text clips are exactly 10 seconds long (240 frames), RGB32 and 24 fps.

Can you please post your full (uncorrected) script for further analysis.
_________________

VirtualDub is the tool of choice for debugging recalcitrant scripts, it supports the Avisynth script error interface and pops up a normal message box with the error text. Since Win2K and later you can copy the text to the clipboard by clicking on the message box to select it then pressing Control-C.

zyrill
20th January 2010, 12:09
IanB, I just made sure and checked again: the original format is actually 628x56 (a multiple of 4) and the clip is ten seconds long with a framerate of 24 fps.

Now, this is a different script which shows the same behaviour (as I said: all errors are displayed this way) and is much simpler:
sDirectShowSource("B.1080p.mkv")

Nothing fancy, really... just a typo (the s in from of Direct...). I attached a screenshot of above script with correct size. It looks like the screenshot in the first post, just with 628x56 px and different error-message, obviously.

I just had a look at the filters used in rendering the script: it's actually only "Haali Video Renderer" and now I smell a rat... Unfortunately, I seem to be unable to connect to the remote graph to interchange the Haali filter with some other to check whether it is the culprit.

IanB
20th January 2010, 13:37
@zyrill,

Yes for the script provided, the rendered error text is 628x56, exactly as expected, strange :confused:

Okay, lets test a real scripts with 628x56 RGB32 output i.e.ColorBars(628, 56) # Try also 624, 632 & 640 widths628 being mod 4, 632 being mod 8, 624 being mod 16 and 640 being mod 128. The ColorBars clip will play for 1 hour, so you should have plenty of time to do any remote graph sniffing.

And for completeness, probably should check RGB24 and YUY2 as well i.e.ColorBars(628, 56) # Try also 624, 632 & 640 widths
ConvertToRGB24() # or ConvertToYUY2()

zyrill
20th January 2010, 14:36
Well, that's interesting!

I still couldn't connect to the remote graphs, somehow neither Graphedit nor Graphstudio seem to be able to show the remote graphs - no idea what's wrong there.

What I did do was render the script directly in Graphedit: for 624 the Haali-Renderer works ok, for 628 it doesn't so I tried the Video-Renderer. That one works, but inserts a colorspace converter filter in between the source and the renderer.

Simple script (Haali):
I tried the various scripts (see attachments) and here's the gist:
624 (mod 16) and 640 (mod 128) work as intended
628 (mod 4) and 632 (mod 8) do not work (skew)

With colourspace-conversion (Haali):
All script sizes work if I enable ConvertToRGB24(), only mod 16 and mod 128 work if I enable ConvertToYUY2()

IanB
20th January 2010, 22:12
Looks like there is some miscreant SSE+ code. Both distorted case are rounding the pitch up to the next multiple of 16.

Haali does not usually make this sort of coding mistake, so probably there is something else in play from W7. You need to report this problem to Haali asap.
____________________

As a work around, you can do your own error processing, i.e.Try {

# ... your script goes here

}
Catch(Errtext) {
MessageClip(Errtext)
ConvertToRGB24() # W7 render chokes with RGB32 so ...
}

zyrill
21st January 2010, 10:53
I've dispatched a mail to Haali, I'm sure he'll be along to check on the matter presently.

zyrill
26th January 2010, 18:15
Well, no luck, I tried the mail-address on the homepage and the dev-mailing-list. No answer - does anybody have an idea where and how I might reach Haali?

IanB
26th January 2010, 23:05
Yes, he comes and goes, also try a PM. Be patient, eventually he will respond.