Log in

View Full Version : Thoroughly confused by converting 4:3 interlaced to 16:9 anamorphic


chrisneal
7th April 2010, 05:37
Hi all.

Wow, I really thought I could figure this out from the various stickies in this thread, but so far, I have not been able to get it right :( Very frustrating!

I have two pieces of footage that I'm working with:

a DV avi file that was shot in 4:3, 720x480, with a PAR of 0.9091
a DV avi file that was shot in 16:9, 720x480 with a PAR of 1.2121

I would like to convert the 4:3 to 16:9 so they "match".

I am using Avisynth and VirtualDubMod to achieve this conversion. I grabbed the script from the sticky, and it worked wonderfully, but it gave me a PAR of 1 :S

Here is the original script:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\convolution3d.dll")
DirectShowSource("C:\test.avi")
Crop(0,60,0,-60)
SeparateFields()
BicubicResize(720,240)
ConverttoYUY2()
# This kept giving me a 'script not found error'
# ReInterpolate411()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()

This gave me a file that was 720x240 with a PAR of 1.

Ok, so I started trying to figure out different crops and resizes to get what I wanted:

Crop(0,60,0,-60)
BicubicResize(720,480)
Gave me: 720x480, PAR of .9091

Crop(0,8,0,-8)
BicubicResize(720,480)
Gave me: 720x480, PAR of .9091

Crop(0,120,0,-120)
BicubicResize(720,480)
Gave me: 720x480 PAR of .9091

GAH! Can someone please help me out here? What do I need to crop/resize to in order to get a 720x480, 16x9, 1.2121?

I have a serious case of tired head from thinking about this :)

When I overlay the two avis on top of each other in Adobe Premiere CS4, the converted video is the desired height, but it appears to be too short (see attachment).

I am seriously stumped.
Thank you very much for your time.
Chris

Blue_MiSfit
7th April 2010, 09:22
Post a sample, please. Mediafire, megaupload etc are all good places to use.

In brief, all you really need is a crop and a resize. I'll post some more details soon.

2Bdecided
7th April 2010, 12:34
AVIsynth neither knows nor cares what the PAR is.

However, cropping 60 from top and bottom and resizing to full height is giving you the correct pixels. Just tell your NLE what the PAR is.


Far more importantly, your footage is probably interlaced, and you haven't taken any account of this. If it is interlaced, try something like this:


AVIsource("C:\test.avi", pixel_type="yv12") # get Cedocida to load DV -AVIs properly into AVIsynth

w=width(last)
h=height(last)

crop(0,60,0,-60) # Be careful to preserve interlacing and YV12 chroma here - non-mod(4) crop values will break it

# deinterlace (pick one of the following):
#TempGaussMC_Alpha3() # very slow, very good quality
TempGaussMC_beta1u(1,1,0,0,0,0,edimode="--",SVthin=0.0,pelsearch=1) # OK speed, OK quality
#bob() # fast, poor quality

# increase vertical resolution:
nnedi(field=0,dh=true)

# resize:
spline36resize(w,h)

# re-interlace:
separatefields.selectevery(4,0,3).weave


(haven't actually checked this, but it's probably right).

Cheers,
David.

chrisneal
7th April 2010, 14:00
Thanks to both of you for the replies. I'm at work atm, but when I get back in front of the PC tonight, I'll do both of these things:


Post some samples
Try 2BDecided's script.


Interesting though, I didn't realize you could tell the NLE (Premiere CS4 for me in this case) what the PAR was. I thought it told me. Have to look in to how to do that one. :)

Thanks again guys.
Appreciate the input very much.
chris

2Bdecided
7th April 2010, 15:39
"I would like to convert the 4:3 to 16:9 so they "match"."

Exactly how you do this depends on what you mean by "match"! My script keeps the centre 16x9 part of the original 4x3 frame by cropping away the top and bottom and effectively "zooming" what's left.

You could equally decide to pad each side with black bars (pillarboxing) to keep all the picture but making it 16x9.

I bet your NLE can do either if you ask it to. IIRC Vegas can, but when zooming and cropping I always use AVIsynth instead because it's higher quality. (Vegas pillarboxing is fine.)

I've never used CS4, but it would be surprising if it couldn't do this.

Cheers,
David.

chrisneal
7th April 2010, 15:44
Thanks again David :)

By "match", I mean I would like the two videos to fill the same portion of the screen? I don't mind some cropping, but since the 16:9 video has no borders, I'd like the converted 4:3 video to have no borders in 16:9. (see the screenshot in original post for how the two look when overlayed right now)

Does that help? :S

I'm "ignoring" work this morning and continuing to look at this :) So far, I haven't found a way to specify in Premiere what a *clip's* PAR is....only how to specify the PAR of the exported media....maybe I'm just not seeing it yet though?

chrisneal
7th April 2010, 15:54
Found this: http://help.adobe.com/en_US/PremierePro/4.0/WS03BF7479-8C7B-4522-8C75-210AD102524Ea.html

So perhaps my resized 4:3 clip was ok all along, and all I needed to do was change the PAR in Premiere? ...and handle interlaced...wish I was at home to try it out :S

chrisneal
8th April 2010, 00:18
Ok, at home, trying your script. I *should* be able to debug this, but....

Can't get TempGaussMC_Alpha3() to be found. Downloaded the avs script, put it in the plugins directory. No dice. Downloaded the avsi file, put it in the plugins directory, no dice... :S

chrisneal
8th April 2010, 00:40
...but, changing the PAR in Premiere fixed the problem. lol. All that work and I was basically there all the time :)

Sooo, if anyone could offer a suggestion on how to get the TempGaussMC script working properly, I can get the interlacing taken care of, and call this done!

Thanks so much for everyone's help.

2Bdecided
9th April 2010, 11:03
Have you got the right version as an .avsi in your plugins folder?

Have you got all the functions that TGMC depends on in your plugins folder? See this thread...
http://forum.doom9.org/showpost.php?p=1138514&postcount=13
...or better still this page...
http://avisynth.org/mediawiki/TempGaussMC

Dropping your AVS file onto VirtualDub should give you a helpful error message telling you what can't be found. It's not just saying "no dice" ;)

Cheers,
David.