Log in

View Full Version : Using two different crops in the same video?


mizumi
6th November 2009, 08:41
Hi!

I want to use two (well, three) different crops in the same video. I wonder if there is any script for that.

I'm converting a series from dvd to xvid and want the opening and the ending to be together with the episode but the crop the opening and the ending need is different from the one the episode itself needs, so I wondered if there you can write an script or something in avisynth to say from this minute to this one crop is xxx, from this minute to this minute, crop is yyy.

As far as I know is better to convert from opening, episode and ending all together from DVD to xvid than converting them separately and then trying to join then as an avi. Most of the times, when you try to join different avi you need to reconvert them, isn't it?

That's my quest. Does anyone have any tips?
:thanks:

MatLz
6th November 2009, 10:42
Hi!source=mpeg2source("source.d2v")

episode=trim(source,first episode's frame,last episode's frame)
opening=trim(source,0,first episode's frame-1)
ending=trim(source,last episode's frame+1,0)

resize(opening,W,H,a,b,c,d)+resize(episode,W,H,e,f,g,h)+resize(ending,W,H,i,j,k,l)But if there are too much differences of cropping beetween clips (letterboxing or else), be carefull with the aspect ratio!!!

For more suggestions, post three pics of the three parts.

thewebchat
6th November 2009, 21:26
Depending on your choice of codec, you could encode each area separately and then concatenate the streams for a Variable Resolution encode. This is probably a Bad Idea (TM).

MatLz
7th November 2009, 02:23
Depending on your choice of codec, you could encode each area separately and then concatenate the streams for a Variable Resolution encode. This is probably a Bad Idea (TM).

The bitrate's repartition will not be good...

Blue_MiSfit
7th November 2009, 02:32
Indeed. I'd generate a single timeline with things letterboxed as necessary to conform with the final output resolution and aspect ratio.

This is something an NLE like Final Cut / Adobe Premiere / Sony Vegas is much better suited for than AviSynth.

In your case however, I think you should just not worry, and encode the whole stupid thing at DVD resolution 720x480 (assuming NTSC on my end of course :p)

Best of luck :)

~MiSfit

PS - x264 will give you much higher quality results than Xvid. To each his own - of course - but x264 will beat Xvid in visual quality at any bitrate - period.

thewebchat
7th November 2009, 05:19
The bitrate's repartition will not be good...

This depends. You could encode a letterboxed version, find the average rate for the sections with Resolution B, and then re-encode those sections using the average rate.