Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Advanced Video Processing > Avisynth Error


Posted by: uhhuhhim Feb 6 2011, 08:26 PM
Hey everyone,

I'm not sure if this is the appropriate forum for this questions, so mods please feel free to move it, but:

I'm fairly new to AVISynth and what it does. I mostly use it to open non-AVI files for editing like most people would, but I've encountered the following error twice and want to what the general solution is:

"AviSynth open failure:
AviSynth error: YV12 images for output must have a width divisible by 4
(use crop)!"

What needs to be added to the code [DirectShowSource("nameoffile.mp4")] to resolve the error above if it's encountered?

Posted by: ale5000 Feb 6 2011, 08:30 PM
If you use Avisynth just to open non-AVI files then you could try to switch to input plugins: http://forums.virtualdub.org/index.php?act=ST&f=7&t=12664
It is easier and you could also use Direct Stream Copy in this way.

I suggest the Quicktime input plugin for .mp4 files.

Posted by: uhhuhhim Feb 6 2011, 08:37 PM
QUOTE (ale5000 @ Feb 6 2011, 08:30 PM)
If you use Avisynth just to open non-AVI files then you could try to switch to input plugins: http://forums.virtualdub.org/index.php?act=ST&f=7&t=12664
It is easier and you could also use Direct Stream Copy in this way.

Well, I really don't know much about plugins in general, but I was just wondering what the error itself meant?

The original file had dimensions of 718x364. I don't understand the error, what would the dimension need to be changed to in order for the error to disappear?

Edit: I also checked out the plugins list you linked and clicked on Quicktime (http://www.tateu.net/software/). Which program would I click on in the list, the one for AVISynth or VirtualDub?

Posted by: dloneranger Feb 6 2011, 08:56 PM
1)
QUOTE
The original file had dimensions of 718x364. I don't understand the error, what would the dimension need to be changed to in order for the error to disappear?


It's self explanatory

The message says images can only be outputted at sizes that are multiples of 4
Your size is 718x364

718/4 = 179.5 This is obviously not divisible by 4, so it shows a message telling you that

You want to crop it to 179*4 = 716

The command in avisynth for that is
Crop(0,0,716,364)

2)
QUOTE
Edit: I also checked out the plugins list you linked and clicked on Quicktime (http://www.tateu.net/software/). Which program would I click on in the list, the one for AVISynth or VirtualDub?


If you want avisynth to be able to decode quicktime, then you'd pick the quicktime one
If you want virtualdub to be able to decode quicktime, then you'd pick the virtualdub one

Posted by: uhhuhhim Feb 6 2011, 09:21 PM
QUOTE (dloneranger @ Feb 6 2011, 08:56 PM)

You want to crop it to 179*4 = 716

The command in avisynth for that is
Crop(0,0,716,364)


I would enter that as line 2 of the script file, right?

QUOTE
If you want virtualdub to be able to decode virtualdub , then you'd pick the virtualdub one


That's what I thought, but: What is the difference between the install zip and the source zip? I don't get it.

Posted by: dloneranger Feb 6 2011, 09:40 PM
QUOTE
I would enter that as line 2 of the script file, right?

Yes

QUOTE
That's what I thought, but: What is the difference between the install zip and the source zip? I don't get it.


The install is the program or plugin etc
Source code is the code the author wrote that a compiler turns into the finished files

You only ever download the sourcecode if you want to compile it
It's one of those "if you dont' know what it is, you don't want it" things

Posted by: uhhuhhim Feb 6 2011, 10:40 PM
QUOTE (dloneranger @ Feb 6 2011, 09:40 PM)
Yes


Ok.

QUOTE
The install is the program or plugin etc
Source code is the code the author wrote that a compiler turns into the finished files

You only ever download the sourcecode if you want to compile it
It's one of those "if you dont' know what it is, you don't want it" things


Ok. Thanks for being so patient with my questions. I'm gonna try the crop command in my .avs file and if that doesn't work, I'll try downloading and installing the plugin. I'll come back here if I have a problem smile.gif

Edit: The Crop(0,0,716,364) command worked perfectly, dloneranger. I just have a small question: What do the zeroes in the command represent?

Posted by: ale5000 Feb 6 2011, 11:19 PM
The video have four sides, four values to crop from four sides biggrin.gif

Posted by: Gral Feb 7 2011, 12:08 AM
You can use
ConvertToRGB()
instead - if you don't want crop.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)