Log in

View Full Version : interlaced video question


supernater
24th December 2008, 22:07
Hi there,

I am compressing some anime to a very small file (50 mb) using MeGUI. I am compressing as follows...

24 kbps audio using Nero AAC HEPS
324 kbps video usingx264 using the x264: Unrestricted 2pass Anime_Toons HQ profile on MeGUI

Video,
640x480 partially interlaced video
19:49 in duration

I know some of you are going to say that this is way too low of a bitrate, but the quality has been fine by my eye. I also throw in some FFT3D to sharpen the image and I lower the framerate to 23.976 fps (works better on XBMC than 29 fps)

I'm kind of new to avisynth MeGUI, so I have a question...

My script is as follows....


DGDecode_mpeg2source("E:\Share\set1 disk2\001 video.d2v",info=3)
ColorMatrix(hints=true,interlaced=true)
tfm(order=1).tdecimate(mode=1,hybrid=1)
crop( 8, 4, -8, 0)

LanczosResize(640,480) # Lanczos (Sharp)
FFT3DFilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.4, plane=4)
ConvertFPS(23.976)


My question is....

FFT3D has an option for interlaced film (which this is). Do I have to set it as interlaced=true? Since the deinterlaced settings are in the script before FFT3DFilter is, isn't the frame deinterlaced by the time it gets to the FFT3DFilter part of the script? Or am I misunderstanding how avisynth works.

By the way, I just wanted to say thank you for making MeGUI and the codecs. It is such a wonderful application. My friends scoffed at the notion of 50 MB compression per 20 minute episode until I showed them the results. At first I told them it was 175 MB in size, then after we watched some of it, I showed them it was really 50 MB, they immediatly demanded to know how I had done it, heh heh heh. They hadn't even heard of MeGUI until I showed them. Where do I donate to support this application and avisynth?

Blue_MiSfit
25th December 2008, 02:01
So, your video is hybrid, correct?

If so, you should run fft3dfilter in interlaced mode.

Also, I would suggest not using fft3dfilter to sharpen. There are better options, particularly for anime (warpsharp?). That being said, fft3dfilter / fft3dgpu is a great denoiser.

~MiSfit

kemuri-_9
25th December 2008, 02:42
the
tfm(order=1).tdecimate(mode=1,hybrid=1)
line causes the video to be deinterlaced and then force decimated to ~24fps

after this line, the clip becomes progressive.
so all filters should be given proper parameters for progressive input.

supernater
25th December 2008, 03:05
the
tfm(order=1).tdecimate(mode=1,hybrid=1)
line causes the video to be deinterlaced and then force decimated to ~24fps

after this line, the clip becomes progressive.
so all filters should be given proper parameters for progressive input.

It sounds like you and Blue_MiSfit disagree. Blue_MiSfit said that I should run fft3dfilter in interlaced mode so I'm confused about what I should do. So far it's a tie, one vote for putting it in interlaced mode and one vote for non-interlaced mode. Can anyone play tiebreaker or help clarify? Thanks.

Blue_MiSfit
25th December 2008, 03:17
My mistake. TDecimate in this mode will output a pure progressive clip - in which case it's not necessary or ideal to run filters in interlaced mode.

~MiSfit

supernater
25th December 2008, 03:51
My mistake. TDecimate in this mode will output a pure progressive clip - in which case it's not necessary or ideal to run filters in interlaced mode.

~MiSfit

Okay, got it, that makes sense to me. So avisynth processes the the deinterlacing before the denoising in the script example I posted? I my script is basically doing deinterlacing -> denoising? In other words it's making a progressive frame before the denoising?

kemuri-_9
25th December 2008, 04:02
My mistake. TDecimate in this mode will output a pure progressive clip - in which case it's not necessary or ideal to run filters in interlaced mode.

~MiSfit

tfm is the one doing the deinterlacing in this case and outputs the progressive frames to tdecimate.

so after the tfm() call, the video is progressive for the remainder of this script.

it doesn't particularly matter what mode tdecimate is in, since tdecimate handles the framerate manipulation aspect.

Blue_MiSfit
26th December 2008, 11:37
Agreed.

Can't TFM return combed frames in some cases?

I would imagine it doesn't matter in any case.

~MiSfit

kemuri-_9
26th December 2008, 16:35
Agreed.

Can't TFM return combed frames in some cases?

I would imagine it doesn't matter in any case.

~MiSfit

TFM w/ PP >= 2 will deinterlace the frames in some way:
if clip2 is provided then taking frames from that supposedly deinterlaced clip,
if not provided, then deinterlacing in some way itself.

PP=1 is to hint the stream for combed frames to pass to a deinterlacer, so it doesn't deinterlace itself.
PP=0 causes it do absolutely nothing - doesn't even look for combed frames.

the default is PP=6

so yes, tfm can return combed frames, but his script doesn't have tfm perform in that way.