Log in

View Full Version : How to get rid of this pesky "interlaced" flag


Vetal
13th December 2010, 16:40
I have an input video out of my camcorder: 1920x1080x60i:

Aspect : 1920 x 1080 (1.778) at 29.970 fps

I want to make it 960x540x60p (1/4 original) by:
a) Taking even/odd frames in sequence (1920x1080x60i => 1920x540x60p)
b) Downscaling the width to 960x540x60p to keep 1:1 AR


I used this .avs script for a while:

___
. . .
#clip = ComplementParity(clip)
clip = AssumeTFF(clip)
clip = SeparateFields(clip)
clip = Lanczos4Resize(clip, 960, 540)
. . .
___

Everything was working fine, until one routine x264 upgrade with meGui. x264 detects it as an interlaced now. Here is a warning:

_____
avs [warning]: detected fieldbased (separated) input, weaving to frames
avs [info]: 960x1088i 1:1 @ 5000000/166833 fps (cfr)
_____


Avs editor shows proper video (960x540x59.94p), so x264 is a culprit. It is producing following result now:

Aspect : 960 x 1088 (0.882) at 29.970 fps

I tried different x264 keys with no luck, such as:

--fake-interlaced
--bff
--no-interlaced
--tff


My full command line is:

"C:\Program Files (x86)\megui\tools\x264\x264.exe" --bff --crf %1 --sar %2 --keyint 594 --profile high --level 5.1 --preset medium --thread-input --deblock -1:-1 --bframes 3 --b-adapt 2 --b-bias 0 --scenecut 40 --ref 5 --aq-mode 1 --aq-strength 1.0 --merange 16 --me umh --subme 6 --partitions all --trellis 2 --psy-rd 1.0:0 --output %4 %3

Any ideas?

P.S. Not sure if it should be in .avs forum, will try to post it there as well

nm
13th December 2010, 17:06
Add AssumeFrameBased() to the end of your script. But this approach will give you heavily bobbing video. Use the Bob filter instead to shift the fields in place. That will leave shimmering, but you'll need slower filters to get rid of that. Yadif is better and pretty fast if you are in hurry with the encode(?)

Vetal
13th December 2010, 17:38
Add AssumeFrameBased() to the end of your script. But this approach will give you heavily bobbing video. Use the Bob filter instead to shift the fields in place. That will leave shimmering, but you'll need slower filters to get rid of that. Yadif is better and pretty fast if you are in hurry with the encode(?)

Thank you for the fast answer! Going to try it today after work.

Bob part is a new and interesting for me, because I assumed SeparateFields was sufficient enough due to the fact I did not upscale back to FullHD height (1080)

Printed some info for myself to refresh the deinterlacing topics. Everything was working for a couple of years, since I moved from DV+SmartDeinterlace to FullHD+SeparateFields. Now I have to get back to details again.

Just found some useful info that might be useful for other readers like me:


http://lurkertech.com/lg/fields/
http://www.100fps.com/

nm
14th December 2010, 00:51
Thank you for the fast answer! Going to try it today after work.

Bob part is a new and interesting for me, because I assumed SeparateFields was sufficient enough due to the fact I did not upscale back to FullHD height (1080)

Make some test scripts and play them frame by frame to see the difference. It's pretty obvious.

Bob filter shifts the fields to align them properly, which is necessary even at the half height. SeparateFields alone works well enough only if you drop the other field completely (60i->30p).

If you have a fast CPU, you could use QTGMC to avoid shimmering and other artifacts. But it will be very slow compared to yadif and other simpler bobbers.