Handbrake Deinterlace - What Really Happens

Random chit-chat and anything that doesn't belong elsewhere
musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Handbrake Deinterlace - What Really Happens

Post by musicvid » Tue Nov 04, 2014 8:53 pm

A lot of unbridled fantasy and conjecture is being tossed about on the Feature Request forum concerning how Handbrake actually handles Deinterlace / Decomb in motion scenes.

Lest any more confusion be caused by leading hobbyists into believing that Handbrake uses primitive interpolation or something equally ridiculous, here is the record of the default behavior for Decomb, also Deinterlace Slow. These controlled tests were constructed in Vegas Pro, and the uncompressed output was handed to Handbrake for processing starting with the normal preset and Decomb=Default. Unedited images compiled in Adobe Photoshop.

In each set, the top is actual interlaced source, bottom is Handbrake's output.

Image

Image

Image

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Tue Nov 04, 2014 11:51 pm

The misunderstanding was not that we misunderstood how handbrake deinterlaces, but the claim that interlaced video contains 60FPS of information. You made the claim that a properly deinterlaced video to 30P loses no motion information, which is untrue. I tried to explain the history and the theory, but you just kept arguing. I really want to teach you that you can get a fluid 60FPS video from an interlaced video. I love to teach people new things or show them ideas that they may have missed. I found in life that sometimes you have to unlearn what you think to be true and try to look at things with a new mindset and see if there was anything that was missed the first time you learned something.

I recommend the website www.100fps.com for future reading.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Wed Nov 05, 2014 1:49 am

-- Interlaced NTSC video contains 30 frames per second of full-resolution data, Not 60. That can be demonstrated with fourth grade arithmetic.
-- No software deinterlacer developed in the last ten years discards half the information; it is all available, and is not weighted to one field or the other in any preconstructed way.
-- Deinterlacing introduces softness; the reasons for that are not that data is unavailable or is being ignored.
-- Noncubic (linear) interpolation is obsolete -- It fills in blank fields with averaged adjacent data, so it works best with stills. Almost every theory I read in that other thread seemed to be based on the presumption of noncubic interpolation, and then tried to generalize that assumption to Handbrake. Might actually have some truth -- if one is doing a slideshow.

"Bobbing" is not so great for exactly the same reason. The missing data in each field must be interpolated (filled in) in some way, simulating the full data in 60p. We're not adding data, just filling a bigger bucket.

That "100fps" website hasn't changed since I sold my first commercial DVD twelve years ago, and is incomplete and outdated. The Deinterlacing and Decomb Guides on the main Handbrake site are better and more current, in my opinion. If you want to find the cutting edge, head over to Doom9.

I'm certain I have much to learn from you. If there is one thing I would like you to take from this discussion, it is that nothing can be put back into video that isn't there or was lost somewhere upstream. So many hobbyists are persuaded by attractive-looking blogs claiming you can increase bit depth, chroma subsampling, resolution, frame rate, bitrate, and color depth by some mysterious processes, and in doing so restore some "quality" that wasn't in the source. So people believe that bigger, faster, brighter means better. 8 bit 4:2:0 won't look better when displayed at 4K RAW values. There is so much of that superstition going on in the gaming community and on social media, that video editors have a hard time explaining it just ain't so, at least not in nontrivial amounts.

One thing that benefits me -- before making assertions I always endeavor to run the tests in advance. My first testing of Handbrake deinterlacing and its ability to move data around came about version 0.9.3 iirc. I've seen precious little of the "controlled testing" mentality among the pundits on this forum, unfortunately. So, if you want to post your tests here when making a point, I'd love to look at them.

I do wish you the best; at least you maintained politeness. Oh yeah, and trust me, I'm a producer :wink:
My grandfather used to say something that has stuck with me for life:

"You can't make a silk purse from a sow's ear."
Last edited by musicvid on Wed Nov 05, 2014 2:19 am, edited 1 time in total.

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Wed Nov 05, 2014 2:18 am

I'm happy you appreciate my politeness. I find no need to get upset over an argument I've heard so many times in video forums, and even on youtube. There's so much misinformation on the internet. So anyway, to teach :D , I will break down your argument
musicvid wrote:-- Interlaced NTSC video contains 30 frames of data, Not 60.
Yes there are only 30FPS according to your editor, vcr, captured video on any interlaced source. 480i or even 1080i. You can only edit each 1/30th of a second of that type of footage. But each frame contains 2 time stamps of information. Information being a captured moment in time.
Lostless wrote:"Bobbing" is not so great for exactly the same reason. The missing data in each field must be interpolated in some way, simulating the full data in 60p. We're not adding data, just filling a bigger bucket.
Bobbing the only way to extract the 60FPS to turn 30i into 60P without losing any motion information. Bobbing takes field 1, ignores filed 2, stretches the image vertically and makes frame 1 of a 60FPS video. Then goes to field 2, ignores field 1 and then does the the same thing and makes frame 2. Onto the next frame, rinse, repeat. You can combine bobbing with other deinterlacing methods to preserve as much as vertical resolution as you can. Its how your HDTV takes that 1080i or 480i image going to it and makes a smooth 60FPS. Good example is sports broadcasts on 1080i broadcasts.
musicvid wrote:That 100fps website hasn't changed since I sold my first commercial DVD twelve years ago, and is incomplete and outdate.
It may be old, but doesn't make the information wrong about how interlacing is working as interlacing was around long before that website.
And your a producer. I just refer to the argument from authority fallacy. Just because you work with something, doesn't mean you understand all the technical aspects down to the electronics of what you work on.
I hope I make sense, i don't mind if you have questions on my answers. You have have a great day.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Wed Nov 05, 2014 2:31 am

Oh, has Youtube responded to your request for 480p 60 support?
I'd give them a better chance of adding it any time soon than Handbrake adding upscaling in the WinGUI.

Something has me really puzzled. Earlier you said, "I guess I misspoke using the term SD. I'm talking about 480P 60FPS EDTV. Like footage from an original XBOX or Wii in progressive mode." BTW, that stuff is only for analog delivery so people can see it on their analog monitor and screen inputs.

Now, you've been going on and on for a couple of days about the glories of bobbing SD interlaced footage. Which is it? Can you point me to your Youtube channel so I can see for myself?

"2 time stamps"
-- Half the information per field at twice the frequency. One is "better"? Bobbing is not as good as native 30p (again, I've run the tests), and It's nowhere close to 60p quality.

"extract"
-- titch, titch

"Bobbing"
-- Yes, another name for that is "interpolation."

"stretches the image vertically"
:?:

"other deinterlacing methods"
No, interpolated data cannot be recombined without creating noise.

"as interlacing was"
-- Nothing has changed, and everything has changed. Read up.

"interlacing was around long before that website"
-- Regarding digital video? Not as long before as you might think.

"i don't mind if you have questions"
-- None I can think of right now. If I have any I can ask a couple of my high school students.
-- In the meantime, I am eagerly awaiting the results of your tests.

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Wed Nov 05, 2014 5:01 am

musicvid wrote:Something has me really puzzled. Earlier you said, "I guess I misspoke using the term SD. I'm talking about 480P 60FPS EDTV. Like footage from an original XBOX or Wii in progressive mode."
I want to apologize. That was my original intention to talk about upscaling to youtube from 480P 60fps to 720P. You can blame Jack and your argument no my thread that got my brain going.
Im going to conclude with this.
My claim is this and only this. That you can extract 60FPS out of 30i footage. Nothing about quality, analog vs digital, or any of that.
I will make some example videos for you if you wish to see. Same footage, one not deinterlaced. One using decoding default. and one using bob. The first one I expect to show combing, the second to be progressive but 30FPS and the bobed one 60FPS

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Wed Nov 05, 2014 5:28 am

Might be interesting to see.
I agree with your scaled-back claim, with the exception once again of the word "extract," which implies something that cannot actually be done. Simulate, synthesize, emulate, something like that may be more accurate. I can simulate 5.1 surround from 2.0 stereo in my DAW, but it's not discrete multichannel, and a knowledgeable listener would not be fooled.

I beta-tested Donald Graft's Smart Bob in about 2002, I believe. Back then we could simulate full frame 60p, just couldn't play it.
Used it occasionally in VDub and AviSynth, then ran some more tests when it was repurposed by others in Handbrake.
Produces good results, but I don't give it the cult-like status that seems to have characterized these threads.
More like a rainy day project than a production asset.

Another reminder of the hobbyist / producer disconnect that runs just under the surface on these forums.

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Wed Nov 05, 2014 7:21 am

musicvid wrote:I agree with your scaled-back claim, with the exception once again of the word "extract," which implies something that cannot actually be done. Simulate, synthesize, emulate, something like that may be more accurate.
Let me give you my definition of extract. To pull out of or to separate from a source. Like extracting audio from a movie. Nothing is lost, just you now have an audio file without a movie. Nothing is simulated, or emulated or faked in anyway.
But any who, I promised you examples. All 3 are the exact same footage coming from a Wii in 480i mode (analog at that and then digitized). Thats 29.97 interlaced frames per second. Make sure you download them from dropbox as dropbox likes to reencode the video for its browser player.
First one is the straight 480i footage. no filters, nothing. just a straight encode from handbrake to prove the source is interlaced. https://www.dropbox.com/s/7pv9441kndi2o ... r.mp4?dl=0
Next one is handbrakes decomb filter to 30FPS. Just as it has always worked. the combing is now gone. https://www.dropbox.com/s/r50khdm50xa5h ... b.mp4?dl=0
Last, the bob filter. And as I expected. 60FPS. full fluid motion as it would look on my TV. Handbrakes bob filter is not that bad and looks pretty good. Just to show it is a true 60FPS look at the numbers. They change every frame. This is not simulated or emulated, but 60P "extracted" from a 30i source. https://www.dropbox.com/s/lkmyqfsqpg5hsij/bob.mp4?dl=0
I hope i could teach more then just you, musicvid. I hope have made myself clear without any misunderstandings.
Feel free to use my 480i source to do the test yourself to show I'm not faking this in anyway.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Wed Nov 05, 2014 2:17 pm

Let me give you my definition of extract. To pull out of or to separate from a source. Like extracting audio from a movie.
Yup. It has to exist first. Otherwise you are extracting air.

You seem to be saying you prefer fps over native progressive quality. That is a perfectly legitimate claim, and with some justification, at least in gaming circles. Editors and moviegoers are not quite so enamored with fps for the sake of fps, if I may hazard a guess.
Deinterlacers are better than they were, and so are bobbers.
I'm a little sensitive to claims someone can put the video toothpaste back in the tube.
Last edited by musicvid on Wed Nov 05, 2014 2:55 pm, edited 1 time in total.

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Wed Nov 05, 2014 2:55 pm

musicvid wrote:
Let me give you my definition of extract. To pull out of or to separate from a source. Like extracting audio from a movie.
Yup. It has to exist first. Otherwise you are extracting air.

You seem to be saying you prefer fps. That is a perfectly legitimate claim, and with some justification.
Deinterlacers are better than they were, and so are bobbers.
I'm a little sensitive to claims someone can put the video toothpaste back in the tube.
If you watch my examples, it clearly shows that I can make a 60p video from 30i source. There's enogh info to make that happen without motion compensation. You can't motion compensate numbers in a timer. I don't know if we're even arguing separate points or looking at the same point from different perspectives. If you can't agree that 30i contains enogh info to make a 60p video, regardless of deinterlacing methods, I dont know what say.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Wed Nov 05, 2014 4:11 pm

It's fine for analog SD.
Alternating 60p frames are blurred a little, and the shadow detail is unmistakeably improved in the Decomb version, with less artifacting. Better than I expected though. What you should do is use NeatVideo first to reduce analog noise and instead use the bits where they will do some good. A weak denoise filter in Handbrake is worth trying.

I was really hoping you would upload 720p 60 (and 720p 30) encodes from Handbrake CLI, so we can see exactly what it is you want to upload to Youtube, why upscaling would be beneficial to have in the GUI, and not just something to be misused.
You see, rather than repeatedly remind people that I am teaching them something, I actively encourage them to teach themselves. People generally tune out teachers like they tune out car commercials. I know, I've been selectively tuned out for nearly four decades :wink:

HandyMan
Bright Spark User
Posts: 169
Joined: Tue Aug 07, 2012 10:52 pm

Re: Handbrake Deinterlace - What Really Happens

Post by HandyMan » Wed Nov 05, 2014 9:07 pm

I have been following the 2 threads and did some tests with a HDTV 1080i@30FPS video source.

Source file 1080i
Bazzo.TV - S09E08 20141030 deintersample.ts

I first encode it with de-interlace slower to obtain 1080p@30FPS

De-interlace Slower 1080p@30FPS
Bazzo.TV - S09E08 20141030 1080 deinterslower rf23 (2014-11-05) svn6502.mkv

The I encode it with de-interlace bob, leaving same as source gave me a 30FPS clip. :shock: Bob double the number of frame in the clip, I was expecting to get a 60FPS clip. I change to 59.94 FPS and then I got a 1080p@60FPS which does show movement at 60FPS.

Bob 1080p@60FPS
Bazzo.TV - S09E08 20141030 1080 deinterbob rf23 (2014-11-05) svn6502.mkv

However, taking a telecined source (not video source) and bobing it create artifact and is of lower quality than deinterlace slower.

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Wed Nov 05, 2014 9:39 pm

You should use decomb bob and not deinterlace bob. Deinterlace will output only what it's given. Decombing bob will output 60fps if it needs it, Saving resolution on still images in the video. Remember still items in interlaced video are full resolution. bobbing the telecine video will produce lesser quality as half the vertical resolution is thrown out. Telcined video contains the full vertical resolution of the movie. Detelecine, in the decimb menu in handbrake, needs to be used to reconstruct the 24p out of the 30i video.
Im glad your tests are producing the results I would expect. :)

HandyMan
Bright Spark User
Posts: 169
Joined: Tue Aug 07, 2012 10:52 pm

Re: Handbrake Deinterlace - What Really Happens

Post by HandyMan » Wed Nov 05, 2014 10:07 pm

I am not using decomb for video 1080i@30FPS, de-interlace slower normaly gave me good result. Sometimes decomb doesn't deinterlace some frame ...

BTW I just did a decomb Same as source give me 30FPS, decomb with 59.94 produce 60FPS and is similar to the deinterlace slower.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 12:56 am

I'll test using 1080i AVCHD and / or HDV camera footage, time permitting. Maybe over Thanksgiving week.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 1:57 am

Here's the shadow noise I was talking about in the "bob" encode. "Decomb" encode follows below:

Image

Image

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Thu Nov 06, 2014 3:07 am

I wouldn't worry about the quality. I didn't exactly use the highest quality setting on my capture device or even tell handbrake to do higher quality for 60FPS. I just used that footage to show 60FPS taken from a 30i source. Handbrakes bob filter is a dumb bob filter as far as I know. I doesn't try to weave in anything from the other field, but just discards it. To me, the fluid motion overrides any defect that the bob filter does.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 3:50 am

Well, at least we understand we have quite different goals.
Sounds like you would overlook a quality loss for the sake of a frame rate increase. Remarkable.
Same for software upscaling too, I presume?

Lostless
Posts: 53
Joined: Thu May 24, 2007 7:55 pm

Re: Handbrake Deinterlace - What Really Happens

Post by Lostless » Thu Nov 06, 2014 4:53 am

I consider any loss in a video a bad thing. I find temporal loss to be the greater of 2 losses. Dropping every other potential frame is a severe loss. Unfortunately, making 30i into 60p is not the best quality vs a real 60p source, but sometimes that's the only source available and SDtvs are quickly fading away. Bobing is the closest experience we can get to watching 30i video on a progressive display that looks like it would on a SDtv. Plug a VCR Into an hdtv, the hdtvs video processor will bob deinterlace to make 60 progressive frames.
And with that, I say I'm done. I think we have both said our sides and I wish you, and anyone else following a good night.

JackNF
Regular User
Posts: 114
Joined: Fri Feb 06, 2009 4:59 pm

Re: Handbrake Deinterlace - What Really Happens

Post by JackNF » Thu Nov 06, 2014 1:53 pm

musicvid, here's a little something you might want to read up on. The first paragraph in the "Background" section on this wiki I think offers a most succinct overview of everything we've been discussing here these past few days albeit talking about PAL video instead of NTSC.

http://en.wikipedia.org/wiki/VidFIRE

The VidFIRE process itself is interpolation, fake motion added in meant to try to restore the original 'video look' to old British TV shows that were shot on video but only archived on film. It is a cheat, the true original 'video look' was destroyed when the original tapes got wiped leaving just the archived film telerecordings at 25p. The fact that there's enough of a marked difference between watching 25p and 25i for the BBC restoration boffins to go to the trouble of faking it for a handful of DVD releases, and specifically the way they faked it, I feel speaks volumes. I should have thought to bring this up long before now, I've got the whole set of classic Doctor Who DVDs sitting on the shelf just a few feet from me.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 3:35 pm

Jack,
That is for kinescope restoration from analog videotape source, which Handbrake does not do. It is completely irrelevant to this discussion or Handbrake in general. Nor is the technology available to hobbyists afaik.

I am familiar with the Dr. Who restoration project, having worked with a long-time original cast and production member on my own projects, including guess what? -- a widely-quoted tutorial discussing deinterlacing and rescaling in Handbrake.

Yadif, even EEDI2 with or without McDeint utilize much more sophisticated motion compensation and cubic interpolation algorithms.
So why don't we discuss those, rather than a red herring? https://trac.handbrake.fr/wiki/Decomb#options
One reason Handbrake doesn't employ QTGMC, I presume, is because it is painfully slow to use.

I already suggested you head over to http://forum.doom9.org/ and read up to see what those images from Handbrake I posted really mean, rather than continue this unfocused speculation. You'll get to read about it from the guys who actually developed this stuff.

I can't do any more than point you to the relevant resources. You seem unusually resistant to referencing any of them.

Also, since you seem unaware of the level of inquiry I regularly participate in on the topics of deinterlacing and rescaling, here is one thread with background links and an abundance of documentation that will keep you occupied for many hours, if you choose to learn rather than confabulate.
http://www.sonycreativesoftware.com/for ... eID=761694
http://www.sonycreativesoftware.com/for ... eID=738430
http://www.sonycreativesoftware.com/for ... eID=758052

I once suggested someone start a "game capture" corner here in the Tiki Bar forum so you guys can discuss your ideas all you want. I'm going to suggest it again to you, with the observation that hobbyists often aren't very interested in how this tehnology really works, and usually don't stick around technical forums very long, possibly because of all the conjecture they have already been subjected to (or create). Certainly not everyone shares this current obsession with fps for its own sake. I'm also pretty tired of the level of uninformed narcissism and denial that seems to characterize many of the posts on the subject. It's all style over substance, isn't it? If your ideas ever make it to production houses, I'll be interested in reading about it.
Until then, I'll just await the results of your tests . . .
Last edited by musicvid on Thu Nov 06, 2014 4:43 pm, edited 1 time in total.

JackNF
Regular User
Posts: 114
Joined: Fri Feb 06, 2009 4:59 pm

Re: Handbrake Deinterlace - What Really Happens

Post by JackNF » Thu Nov 06, 2014 4:40 pm

I've not been constraining my discussion to just Handbrake, but video theory in general. The fundamentals. If you can't see how it's relevant, then we're clearly talking different things.

Haven't been to doom9 in a while, the forums seemed to slow down in the sections I was interested in lurking maybe ~5+ years ago. Sometime after the front page news section stopped updating regularly. I'm not a professional, but I have been a very well read hobbyist the past ~15 years.
Last edited by JackNF on Thu Nov 06, 2014 4:46 pm, edited 1 time in total.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 4:46 pm

Then start your own thread, Jack, something I see you've rarely done.
The Handbrake Feature Request forum and this topic, "Handbrake Deinterlace," are not the appropriate place for it.

JackNF
Regular User
Posts: 114
Joined: Fri Feb 06, 2009 4:59 pm

Re: Handbrake Deinterlace - What Really Happens

Post by JackNF » Thu Nov 06, 2014 4:48 pm

Had I known it was going to sprawl into the mess it became, I would have.

musicvid
Veteran User
Posts: 3245
Joined: Sat Jun 27, 2009 1:19 am

Re: Handbrake Deinterlace - What Really Happens

Post by musicvid » Thu Nov 06, 2014 5:42 pm

There's still time.
Maybe start it with your tests?

Post Reply