Questions about the effects of Avisynth scripts

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Re: Questions about the effects of Avisynth scripts

Postby jediphoenix » Fri Mar 19, 2010 8:24 pm

Thanks - sorry to be a bother, I don't mean to make all you guys repeat the same stuff over and over.
One last thing, I promise. :oops:


I have ONE of my 848x480 clips that needs to be cropped slightly off the top. Since I wish to do the LanczosResize(960,480) Crop(120,0,-120,0) option from above, and since it needs to be in multiples of 16, is it possible to do LanczosResize(960,496) Crop(120, 16, -120, -0)? This would give me 720x480 and get rid of that black bar on top that needs to be cropped, but I'm just curious if I'm thinking this through correctly or am totally off base with the multiples of 16 thing.
jediphoenix
 
Joined: 15 Oct 2004

Re: Questions about the effects of Avisynth scripts

Postby Scintilla » Fri Mar 19, 2010 8:31 pm

I've been hesitant to say anything so far about the prospect of cropping a black bar off the top and/or vertically resizing, because it's a tricky thing. You generally don't want to resize your image vertically in the prep stage unless you are ABSOLUTELY SURE that there is no combing whatsoever in your footage (all interlacing has been removed), and even then it probably isn't optimal due to the way the original image was encoded on the DVD in fields.

In fact, I'm finding in my current project that my Code Geass R1s have a slight black bar across the top, and I'm doing my best to simply ignore it. I'll probably end up cropping 4 pixels off the top of the finished product and then replacing it with a black border of 4 pixels to get it back to 480 lines, so as to make everything easier later on down the line.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:
User avatar
Scintilla
(for EXTREME)
 
Joined: 31 Mar 2003
Location: New Jersey
Status: Quo

Re: Questions about the effects of Avisynth scripts

Postby Qyot27 » Fri Mar 19, 2010 11:30 pm

jediphoenix wrote:I have ONE of my 848x480 clips that needs to be cropped slightly off the top. Since I wish to do the LanczosResize(960,480) Crop(120,0,-120,0) option from above, and since it needs to be in multiples of 16, is it possible to do LanczosResize(960,496) Crop(120, 16, -120, -0)? This would give me 720x480 and get rid of that black bar on top that needs to be cropped, but I'm just curious if I'm thinking this through correctly or am totally off base with the multiples of 16 thing.

480 is a multiple of 16 (16x30=480). If you crop something slightly from 480, then just resize back to 480. For example:

Crop(120,2,-120,0).Lanczos4Resize(720,480)

The Crop would take it down to 478, the resize goes back to 480. If you took it up to 496, then the proper width would be approximately 992 (I think).

Basically, mod16 only requires the resolution to be a multiple of 16. It only gets more complex if you want to letterbox something, because you can save more bitrate on the compression step if the borders themselves fully occupy their own macroblocks (a macroblock can indeed be of varying sizes, especially with newer video compression formats, but the most established size is 16px x 16px, so if both borders and real video are multiples of 16, then the encoding app doesn't have to work as hard with the separation between the two). It's not necessary to make sure everything adheres to multiples of 16, it's just a good habit to get into and provides a more optimal encode.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Previous

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 0 guests