View Full Version : Weird Crop bug in AviSynth 2.5
madoka
15th March 2003, 02:13
Sometimes, the Crop() command produces a 4 pixel wide black bar on the right edge of the video. My source is in YV12 color space, and I've made sure that the output size are divisible by 4. But if I follow the command with a color space change, or a resize, the bar disappears.
No other commands precedes Crop(), except for mpeg2source(). I'm using the AviSynth 2.5.1.
Kurosu
15th March 2003, 02:30
Just a suggestion to make you wait for a better answer: are the coordinates mod2, too? ie, does the crop look like:
crop(2*x',2*y',2*width',2*height')
madoka
15th March 2003, 05:03
Originally posted by Kurosu
Just a suggestion to make you wait for a better answer: are the coordinates mod2, too? ie, does the crop look like:
crop(2*x',2*y',2*width',2*height')
Yes. For example, in a particular source I'm experiencing this problem, I had Crop(12, 4, 692, 476). All parameters are divisible by 4.
sh0dan
16th March 2003, 01:56
If you are using XviD as decompressor (input decompressor for AviSynth) it might do a bad conversion, when decompressing video for the preview display in VDub.
Is the error also present, when you use "Fast Recompress" and compress to XviD for instance?
Is the error present if you use "converttoyuy2()" after the crop?
If not, it is not an AviSynth error.
madoka
16th March 2003, 02:33
Originally posted by sh0dan
If you are using XviD as decompressor (input decompressor for AviSynth) it might do a bad conversion, when decompressing video for the preview display in VDub.
Is the error also present, when you use "Fast Recompress" and compress to XviD for instance?
Is the error present if you use "converttoyuy2()" after the crop?
If not, it is not an AviSynth error.
I see the black bar when I use VirtualDub to playback the input; I'll check if it's still present when I actually encode. Also, I'm not using XviD at all, so I don't think it's an issue. Finally, as I stated initially, if I follow the Crop() command with any color conversion (except ConvertToYV12(), which is a nop), then the black bar goes away.
madoka
16th March 2003, 02:41
Okay, I just did a quick test by dumping about 50 frames into uncompressed AVI (using VirtualDub), with different processing modes. The black bar is present on all the test output clips.
Chez_Wimpy
16th March 2003, 07:42
Same here... I had this happen the other day (and thought it might have been my fault). I played with the resolution to some extent, but kept getting a black bar on the side. Eventually I included a Crop() command as the final line in the script, after than the encode worked fine. I can probably reproduce the original script here tomorrow if anyone is curious.
-CTB
sh0dan
16th March 2003, 12:34
It doesn't sound like it's an AviSynth error, but rather a decompressor error. Check File/File Information in Vdub, and report back the codec used, and the scripts.
As mentioned many places - preview in vdub CANNOT be trusted, if your source is not at laest divideable with 8 in width!
madoka
16th March 2003, 20:01
Originally posted by sh0dan
It doesn't sound like it's an AviSynth error, but rather a decompressor error. Check File/File Information in Vdub, and report back the codec used, and the scripts.
It says "DivX Pro 5.0.3 Codec". If it's an error on the decompressor's part, would using ffdshow instead help?
As mentioned many places - preview in vdub CANNOT be trusted, if your source is not at laest divideable with 8 in width!
But the black bar is still present in the actual output clips, when I play them back with Windows Media Player.
esby
16th March 2003, 20:34
Maybe you should try with divx5.02,
i have experienced cropping problem when decoding with 5.03.
But it was with the previous version,
but i think this may persist because it's not really avs fault...
esby
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.