Log in

View Full Version : Cropping produces color artefacts @29,97fps!?


Dust Signs
10th September 2006, 15:44
Hi,

I'm currently experimenting a bit with AviSynth for my term paper, mainly reading raw sources, cropping and resizing them for later encoding.
But today, I experienced a very strange problem: I'm using the following script to read a 1080i file:

#Load plugin to be able to read raw sources
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\rawsource.dll")
#Load file (raw source)
RawSource("P:\TU_München_Vids\1080i\1080i2997_mobcal_ter.yuv", 1920, 1080, "I420")
#Resize
Lanczos4Resize(720, 486)
#Autocrop borders
#AutoCrop(0) #Problem is here (see text)
#Set framerate
AssumeFPS(29.97)

The problem is the cropping. If I don't crop, everything is perfect. But if I crop (via AutoCrop() or Crop()), there are a lot of color artefacts in the movie. I attached a picture so you can see what I mean (the blue bar is from the the AVSEdit preview). In this case cropping is not really necessary, but other movies with 29,97fps with borders produce the same artefacts, movies with 25fps work perfectly.
Is there any explaination for that? How can I fix this problem? Cropping before encoding would be nice ;)

Dust Signs

unskinnyboy
10th September 2006, 18:04
First crop, then resize. And when you do resize, resize to MoD16 or at least MoD8. 486 is not even MoD4. That way you won't mess up the chroma like now.

Dust Signs
10th September 2006, 18:10
I wanted to do that, but if I do, I do not know exactly what size the clip will be. I want to have approximately 720xsomething without changing the aspect ratio.

Dust Signs

unskinnyboy
10th September 2006, 18:41
Crop 4 (or maybe 6?) pixels from the left and resize to 720x400 or 720x416. AR should be OK with one of them. Try it.

Dust Signs
10th September 2006, 18:48
Crop 4 (or maybe 6?) pixels from the left and resize to 720x400 or 720x416. AR should be OK with one of them. Try it.

Works perfectly with AutoCrop and 720x416, thank you very much :)

Dust Signs