Log in

View Full Version : deinterlacing, is this normal?


Cheech
4th June 2006, 04:18
In my latest attempt at a sharp encode of a 1080i source, I decided to use mvbob after I saw a quote that it was the "best" deinterlacer around. I tried it out, but it works about the same as SmoothDeinterlace.

When there is no motion the picture is great, but when there is any motion, its back to blur city. So far the best method I have used is just discarding a field, but this seems so depressing that no deinterlacer can touch it at the same output res! Also I don't want to discard because of loosing motion, I suppose I could double the framerate, but that seems like an odd approach.

I am providing some samples so you guys can tell me if this behavior is normal, or if there is a setting I should tweak, or just anything to help me out. Also is it normal to get 3fps encodes with any of the two deinterlaces I mentioned? With discard I get about 20fps.

Here is my script, its set for the discard method now, but you can easily figure out how I went about doing the others.
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\DG MPG Decode\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\NicAudio.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SmoothDeinterlacer.dll")
LoadPlugin("C:\Program Files (x86)\AVISynth 2.5\plugins\AviShader.dll")
Import("C:\Program Files (x86)\AVISynth 2.5\plugins\mvbob.avs")
video=MPEG2Source("Conan 2235.d2v")
audio=WAVSource("Conan 2235 PID 044 T01 3_2ch 384Kbps DELAY -174ms.wav")
AudioDub(video,audio)
#Trim(39,30428)+Trim(35283,49518)+Trim(54104,60149)+Trim(68460,83655)+Trim(91237,95132)+Trim(100192,105945)
Trim(12000,12400)
Crop(0,0,0,-8)
#AssumeTFF()
#Telecide(guide=1,post=2,vthresh=35)
#SmoothDeinterlace(showlace=False)
#mvbob()
SeparateFields()
LanczosResize(960,height,0,0,0,0,8) #8taps
Crop(8,2,-0,-2)
#mvfps()
#Weave()
#SeparateFields()
#Lanczos4Resize(752,424,75,75,-122,-130)


#"C:\WINDOWS\sysWOW64\cscript.exe" "C:\Program Files (x86)\Windows Media
Components\Encoder\WMCmd.vbs" -input "F:\Conan Clips n Shows\Conan #2235
3-29-06\Conan.avs" -output "C:\Documents and Settings\Administrator\Desk
top\Conando2.wmv" -loadprofile "C:\Documents and Settings\Administrator\
Desktop\Conan.prx" -pixelformat YUV12 -v_compopt 1 -v_mslevel 4 -v_numth
reads 2

http://www.nonyaz.com/temp/videos/Sample%20Pack.rar

Guest
4th June 2006, 11:51
Please read and follow forum rules, specifically, rule 12: do not ask what's best.

http://forum.doom9.org/forum-rules.htm

GodofaGap
4th June 2006, 13:40
Why don't you upload the source instead?

Separating fields with resizing makes no sense as even and odd fields aren't spatially aligned. You can see this in the NBC logo jumping up and down.

Also, you say you don't want to lose motion, but you don't want to double the frame rate. That's a contradiction.

Thirdly, I have no idea how you created the files other than the ones with separatefields. Every second frame is almost a completeduplicate of the previous one, which probably means you screwed something up.

Lastly, please never upload clips with uncompressed audio again. :p

Cheech
4th June 2006, 18:32
I guess I can chunk off a piece of the source and upload that, I will in a few min. http://www.nonyaz.com/temp/videos/Conan_Sample.tp

Can I "nudge" the odd field to make it align?

The other were just a matter of commenting separatefeilds and uncommenting mvbob, then I tried the resize before and after the bob to see if it made a difference.

I didn't bother compressing the audio because I usually encode in WMV and it does it for me, but its hella slow so I did 1 pass xvid and didn't think the audio would matter to much :)

Guest
4th June 2006, 20:09
What is your target width and height for the encoded output?

Cheech
4th June 2006, 20:16
The width should be smaller than 1200, but larger than 700. I aim to get my final encodes looking good with 385kbs audio and under 600 megs.

Guest
5th June 2006, 00:12
Given that, you can't do better than to discard a field and resize the width to 960, giving you 960x540.

There's no reason to do anything else, for the reason GodofaGap gave, i.e., you can't make it smoother without doubling the frame rate.

If you want to double the frame rate, then yes, there are ways to bob it so that the fields are aligned properly when they become frames. But you've stated that you don't want to double the frame rate, and it's unlikely you'd be able to make the target file size with double rate output.

Cheech
5th June 2006, 00:22
Yes, lets go about the discard field height. Since I think its hopeless getting a decent result with anything but discarding a field. However, if you want a challenge, then I say the height should be 650. Either way, I will still learn :)

Guest
5th June 2006, 00:28
That's borderline. You could try discarding a field and then resizing, or you can try deinterlacing the full height clip and then resizing. Either way you'll have issues, either a little blurring or some deinterlacing artifacts. *You* have to decide which is better.

If you are getting blends from deinterlacing, you need to study the documents better, because most deinterlacers have a no-blending mode. E.g., FieldDeinterlace(blend=false).

FieldDeinterlace(blend=false)
lanczosresize(1152,648)

or...

separatefields().selecteven()
lanczosresize(1152,648)

Cheech
5th June 2006, 00:36
I'd like to give the mvbob another chance, I don't think I was using it right. mvbob the 1080 and resize to ?x650

Guest
5th June 2006, 00:43
You're not going to make your target file size at double rate output.

Cheech
5th June 2006, 00:48
Really? I thought double rate would only increase it 10-20% because all it would do is add a little more motion data. Besides, I thought with bob, the rate would stay the same?

Guest
5th June 2006, 00:51
Try it first like this:

bob()
lanczosresize(960,540)

If you hit the target size, the result pleases you, and the player can render the resulting AVI at 60fps, then replace bob() with mvbob() for better quality.

To me, it looks very good even with just Bob()! And that will process much faster.

Cheech
5th June 2006, 00:57
Ok I will try that out, but not tonight, I have crap loads of work that I procrastinated doing over the last making period, and that if I don't do now, verge on not passing the year, and I really hate summer school. But, on the plus side, next week I will be freeeeeeeeeeeeeeeeeeeeeee (hopefully)

Cheech
5th June 2006, 06:35
How in the hell....... Why is it when you do something it turns into gold, and when I do something it looks like crap?

Also, can anyone do a quick explanation on the taps parameter on lanczosresize resize? I tried to read up on it, but once it started talking about the lobes of sign waves, I decided that I couldn't comprehend anymore without breaking out the trig textbook. But what I did get out of it is, that a parameter of 8 is perfect for downsizing by a factor of 2, guess not?

Also if anyone wants to read my 8 page paper on the Shaw Brothers Film Studio let me know :P

I will do more testing tomorrow its 1:30 AM and I have to take my A+ Certification in 7 hours, which I have not studied for.

Edit: Just tried mvbob, less than a frame per second encoding, I will let this go all night, maybe I can get a few seconds of encode in the afternoon :P

scharfis_brain
5th June 2006, 07:40
in domnsizing situation you won't gain much by using mvbob().
try eedibob() instead.

jel
5th June 2006, 07:42
@ cheech

if you are not careful i will give you a strike for "most gratuitous use of the word crap in one thread" :p

but seriously, we try to maintain a family friendly forum around here, so could you please reduce the amount of un-necessary profanity fform your posts in future.

cheers
j

GodofaGap
5th June 2006, 07:43
Also, can anyone do a quick explanation on the taps parameter on lanczosresize resize? I tried to read up on it, but once it started talking about the lobes of sign waves, I decided that I couldn't comprehend anymore without breaking out the trig textbook. But what I did get out of it is, that a parameter of 8 is perfect for downsizing by a factor of 2, guess not?
There is a short explanation in the avisynth documentation. But you really don't need to touch that setting.

Also for this much downsizing, you don't HAVE to use a very good (but also very slow!) bobber. Just a normal Bob() or Leakkernelbob is already very good too. The aim of those slow bobbers is to preserve resolution... but since you are downsizing the way you do, you throw most of it the detail you preserved with bobbing away anyway.

But if you want 4 days for your script to have rendered, that's ok too. :)

Cheech
7th June 2006, 00:11
in domnsizing situation you won't gain much by using mvbob().
try eedibob() instead.
So how does eedibob compare with the regular bob?