Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th June 2009, 05:26   #1  |  Link
pijetro
Registered User
 
Join Date: Aug 2002
Location: Hamilton, Ontario
Posts: 16
Recommended resize filter> HDV to SD

Greetings from an old fellow....

I need to revert back to AVISynth, and am looking for a resizing filter..

The source footage is off my HDV camera, that was saved out as a VFW MPEG I Frame interlaced codec..That would be 1440x1080 with a 1.33 Aspect ratio...
I'm using a Matrox RT.X2 card, and the downconverts are unnacceptable.

My current hardware and software tools don't allow for a clean downconvert, and am in the process of testing out several methods of downscaling for 720x480...

Currently, i'm using a simple LanczosResize(), and am delighted with the results compared to anything i'm using currently...

Unfortunately, my 2xDual core Opterons are chugging very slowly. Only .42x realtime.
I just need a clean serve to CCE....I'm not interested in any further filtering.

Question:
Is there a faster resizing filter?
Is there a more accurate resizing filter?
Am i unnessarily squeezing pixels for a different aspect ratio?
Does my script need to contain colour change between 709 and 601?

Thanks so much...
pijetro is offline   Reply With Quote
Old 15th June 2009, 06:30   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
is the HDV footage progressive or interlaced?
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 15th June 2009, 11:20   #3  |  Link
pijetro
Registered User
 
Join Date: Aug 2002
Location: Hamilton, Ontario
Posts: 16
It's interlaced....

And so is the VFW codec that it was rendered to...
I believe it's TFF....

At this stage, i'm not interested in any sort of deinterlacing..If that was my intent, i would have shot the footage progressive..

Surprisingly, the Search function on the forums yields little of the same issues that i'm having...

Any thoughts??
pijetro is offline   Reply With Quote
Old 15th June 2009, 17:36   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,396
Quote:
Originally Posted by pijetro View Post
It's interlaced....
There's a reason scharfis_brain asked if your footage was progressive or interlaced and that's because earlier you had said:
Quote:
Currently, i'm using a simple LanczosResize()
Doing that to interlaced sources is absolutely the worst possible thing you can do and will utterly ruin it. The resize filter you use is not nearly as important here as doing an interlace aware resize. That is, you might do something like:

Yadif(Mode=1,Order=1)#if TFF
LanczosResize(720,480)
SeparateFields()
SelectEvery(4,0,3)#if TFF
Weave()

And encode as TFF. For some of the finer points I'll bow to anything scharfis_brain has to say on the subject. There are lots of variations on this, though.
Quote:
I just need a clean serve to CCE
If you're running multiple passes in CCE, it might be much faster in the long run to make a lossless AVI first (I use Lagarith) and then feed that into CCE using AVISource. You'll run the slow downsizing script once, and all the CCE passes much more quickly.
Quote:
Does my script need to contain colour change between 709 and 601?
Yes.
manono is offline   Reply With Quote
Old 15th June 2009, 19:43   #5  |  Link
pijetro
Registered User
 
Join Date: Aug 2002
Location: Hamilton, Ontario
Posts: 16
Matrox uses a proprietary codec that renders very quickly. Especially when effects or colour correction is concerned. Subjectively, it looks fine to me, considering i'm taping in HDV under difficult circumstances..For now, i will stick with the export, but consider Lagarith in the near future.

So what you're saying, is that LanczosResize() requires interlace awareness...I didn't know that. I thought that separating fields was required only when doing spatial filtering..
Thank you..

But if that's the case, why does LanscozResize() come before SeparateFields()??


I've read, and re-read AviSynth documentation, and i just can't get my head around SeparateFields().SelectEvery()function...

I'm sorry....

As far as the encode speeds go, i've never experienced a second of third pass being any faster..I must be doing something wrong..
Thanks for pushing me in the right direction..When i get home, i'll dig deeper...
pijetro is offline   Reply With Quote
Old 15th June 2009, 20:13   #6  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
yadif(mode=1) makes interlaced to full rate progressive (59.94 fps!) (this is de-interlacing)
lanczosresize() resizes this progressive 59.94 fps video
separatefields().selectevery(4,0,3).weave() makes interlaced video out of 59.94fps progressive video. (it is called re-interlacing)


and if you might ask: yes it is necessary to deinterlace -> do the actual process -> reinterlace, if you want to treat interlaced footage correctly.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.

Last edited by scharfis_brain; 15th June 2009 at 20:17.
scharfis_brain is offline   Reply With Quote
Old 16th June 2009, 18:43   #7  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,418
Quote:
Originally Posted by pijetro View Post
So what you're saying, is that LanczosResize() requires interlace awareness...I didn't know that. I thought that separating fields was required only when doing spatial filtering..
But resizing is a form of spatial filtering.
If you don't deinterlace before resizing, the pixels from the two different fields will get mixed up with each other during the resize.
Quote:
But if that's the case, why does LanscozResize() come before SeparateFields()??
The original separating is done inside yadif, and hence before the resize. As scharfi says, the separatefields().selectevery(4,0,3).weave() sequence does the re-interlacing after the resize. It's not really separating the actual fields of the video, it's actually reconstructing them by pulling apart the progressive frames.
Gavino is offline   Reply With Quote
Old 17th June 2009, 04:53   #8  |  Link
pijetro
Registered User
 
Join Date: Aug 2002
Location: Hamilton, Ontario
Posts: 16
Good news!!!

and not so good....


Firstly....Thank you so much. The downconvert quality is SUPERB..Watching it through VDub had me sold immediately, and watching the final encode had me breathing a sigh of relief...

But....
I had to growing pains with manono's script...
Vdub finally accepted the following..

Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\C\yadif.dll")#doesn't autoload as per readme
avisource("D:\Surla Wedding\Surla Wedding CD1.avi")
converttoyuy2()#Won't load without it
Yadif(Mode=1,Order=1)#if TFF
LanczosResize(720,480)
SeparateFields()
SelectEvery(4,0,3)#if TFF
Weave()
#BT709ToBT601() Won't work since it's not YV12

Unless i put in convertoYUY2(), i get an Avisynth open failure: "Video must be YUV"..
Strange, i assumed it was? What else could it be? It's an MPEG2 I Frame codec that's recognized as VFW..

The confusion set in when i tried a BT709ToBT601()..
The readme states that YV12 input is required, but when i do a convertoyv12, i get an error stating that the decompressor couldn't be found, and Vdub requires VFW...

Which leads me to believe that the codec saved out is not in 709 colourspace..

My issue
Speed....
A 4fps playback is waaay slow...Perhaps that's the price to pay for proper processing.

I'd like to acknowledge the power of the Yadif() plugin..
It's simply amazing that i can get 59.94FPS progressive footage output from an interlaced source..
For years, i was under the impression that interlaced footage simply had filtering done on separate AandB fields, and weaved back together...But now i'm starting to see the light..

I had gotten better speed with this script i found:

avisource("D:\Surla Wedding\Surla Wedding CD1.avi")
assumetff().Bob(height=480)
LanczosResize(720,480)
assumetff().separateFields()
SelectEvery(4,0,3) #TFF source - use (4,1,2) for BFF
Weave()

But i'm there's a trade off for quality compared to the first script..
pijetro is offline   Reply With Quote
Old 17th June 2009, 05:51   #9  |  Link
pijetro
Registered User
 
Join Date: Aug 2002
Location: Hamilton, Ontario
Posts: 16
Edit

After using the info() command, i realized that all along, the colourspace was RGB32...
That should answer some of my questions..
pijetro is offline   Reply With Quote
Old 17th June 2009, 06:49   #10  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,642
if you convert colour before a deintleracer ensure to se converttoxxx(interlaced=true)
if you do not so, your colour becomes messed up.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.