# Thread: Problems making QTGMC deinterlacer work

1. Originally Posted by poisondeathray
Originally Posted by brassplyer

Are you saying it's not possible to end up with smooth, 29.97 1080p video using this deinterlacer?
Yes, but it' s not the deinterlacer's fault. 59.94 will be smoother than 29.97, as simple as that. It's just math - you're throwing away half the motion samples. The original video , when deinterlaced by the TV will look like 59.94 on a flat panel .
A point I wasn't previously clear on, QTGMC converts each field into a frame, as opposed to blending them?
2. Originally Posted by brassplyer
Originally Posted by poisondeathray
Originally Posted by brassplyer

Are you saying it's not possible to end up with smooth, 29.97 1080p video using this deinterlacer?
Yes, but it' s not the deinterlacer's fault. 59.94 will be smoother than 29.97, as simple as that. It's just math - you're throwing away half the motion samples. The original video , when deinterlaced by the TV will look like 59.94 on a flat panel .
A point I wasn't previously clear on, QTGMC converts each field into a frame, as opposed to blending them?
ALL bobbers essentially convert a field to a frame 59.94 fields per second becomes 59.94 FRAMES per second . The difference is QTGMC uses other processing like temporal analysis to fill in the missing data (interpolate), it looks at adjacent fields, and applies other things like smoothing, sharpening

Interlaced video is like "half progressive" video each field is like 1/2 a frame with only 1/2 the spatial information (it's a "cheap" bandwidth way to encode 59.94p, that why interlace was created in the first place) . Interlaced video is missing data (they are not full frames) - that's why you have artifacts when you deinterlace to progressive frames for viewing. You are interpolating missing data

By going to 1080p29.97, you throw away 1/2 the temporal data. By going to 1080i59.94 you throw away 1/2 the spatial data (that you just "reconstructed" with QTGMC)
3. Originally Posted by poisondeathray
I don't know why someone would jump through all these hoops with a lossless workflow only to throw away 1/2 the data later.
Hehe, for the same reason that person might want to produce a Blu-Ray from a VHS tape, aka trying to make a silk purse from a sow's ear. I'm not entirely blameless in this regard myself, often making 720x480 DVDs from both VHS as well as VCD sources. Mine are film sources, so progressive and no 59.94fps nonsense.
Originally Posted by brassplyer
In part as an experiment. Simply upscaling it won't make it look better but tweaking it - as per the screen shots above - will. It won't be out of the box VHS. Certainly not true HD but better than normal VHS.
So, make a DVD.

Originally Posted by brassplyer
The idea is to have it in an HDTV format already and not depend on some player to do the upscaling.
It's a silly idea, in my opinion. Blu-Ray player/DVD player/TV upscaling is pretty good these days.
4. Wait a minute. Somebody keeps changing the subject (It ain't me, I just got here). What happened to the subject of saving the original DV source. Brassplayer claims he "converted" DV to huffyuv, as if huffyuv were some kind of dv format.

huffyuv = compressor. Not format. Compressor. kappeesh? Want to use a huffyuv-compressed video with a YV12 filter? Outta luck, guy. Huffyuv compresses to RGB or YUY2. Can't use it to compress in YV12.

If you start with DV you can compress it to lossless form with Lagarith (makes a slightly smaller file than huffyuv, and uses RGB, YUY2, and YV12). So, you say that you start with a DV capture and the first thing you want to do with it is deinterlace with QTGMC. The only reason I could see for doing that is because (a) you have to use filters that require progressive-only video, and/or (b) the source video's original interlace is faulty, defective, crummy, or ugly in some way and needs to be fixed, and/or (c) you don't want to use SeparateFields() for the filters.

One step at a time.

A) Convert an interlaced source colorspace to YV12 from its original colorspace, and save it as losslessly compressed YV12:

In Avisynth:

Code:
```AviSource("MyVideo.avi")   # <-- or MPEG2Sourge, or whatever source
ConvertToYV12(interlaced=true)
```
In VirtualDub:

Video -> Color Depth -> YV12
Video -> Compression -? Lagarith (set for YV12)
Video -> Fast Recompress

B) Convert the source colorspace to YV12, deinterlace and do some Avisynth processing, then go to RGB for some RGB work in VirtualDub -- and keep the video interlaced:

In Avisynth:

Code:
```AviSource("MyVideo.avi")   # <-- or MPEG2Sourge, or whatever source
ConvertToYV12(interlaced=true)
QTGMC(preset="whatever")
[.... run some YV12 plugins ....]
[.... run more YV12 plugins ....]

# --- re-interlace for same frame rate ----
SeparateFields().SelectEvery(4,0,3).Weave()

# --- to RGB32 for VirtualDub ---
ConvertToRGB32(matrix="rec601",interlaced=true)
```
In VirtualDub:

-- if you use some VirtualDub processing and want to save in RGB:

Video -> Color Depth -> RGB24
Video -> Compression -? Lagarith (set for RGB default)
Video -> Full processing mode

-- or, if you want to do some RGB processing in VirtualDub but re-save the results as YV12:

Video -> Color Depth -> YV12
Video -> Compression -? Lagarith (set for YV12)
Video -> Full processing mode

VHS to 1080 HD? ? Why waste so much precious life for nothing? Get better with SD-size BluRay and h264.

Originally Posted by brassplyer
A point I wasn't previously clear on, QTGMC converts each field into a frame, as opposed to blending them?
You can't have de-interlaced and blended at the same time. The two terms have completely opposite meanings. QTGMC separates interlaced half-frame-size fields, and from them interpolates two full-sized, non-interlaced video frames.

1 interlaced frame = 2 half-size fields = 2 different "moments in time" within 1 frame.
QTGMC de-interlace --------> 2 fields are interpolated into 2 full-sized frames with no "fields". Each frame = separate "moment in time".

Originally Posted by brassplyer
Ultimately my goal is going from this...

Attachment 14980

To this....

Attachment 14981
Hate to bust your bubble here, but...the lower image has increased contrast (to the point where dark detail is being crushed) but has no more "details" than the upper one does. The lower one has clearly just been oversharpened, starting to show clay-face ("oil paint") artifacts and "anime edges". Will look rather weird when the low level of detail is resized. There are sharpen settings in LSFMod that can help avoid clay-face.
5. dupe post. see above.
6. Jeezus, that's a long-winded post! [unsub]
7. Originally Posted by sanlyn
Wait a minute. Somebody keeps changing the subject (It ain't me, I just got here). What happened to the subject of saving the original DV source. Brassplayer claims he "converted" DV to huffyuv, as if huffyuv were some kind of dv format.
While there's interesting info in your post, I'm not sure why this is causing you confusion and causing you to have fits. You're harping on an issue that was never stated.

Here's the general process flow:

- Create a DV file by capturing a VHS via firewire passthru.

- Take that DV file and convert to HuffYuv to avoid lossy degradation during further processing and to facilitate the next step.....

- Upscaling to HD size for conversion to a Blu-Ray format. I.e. pillarboxing and going to either 1080p or 720p. Not possible to do with DV. Why? Because I want to. Don't want to depend on player upscaling and want to retain as much quality as possible with 25 gigs of data as opposed to 4.7 gigs of data upsampled.

Hate to bust your bubble here, but...the lower image has increased contrast (to the point where dark detail is being crushed) but has no more "details" than the upper one does.
No bubbles burst. It has "more detail" in that the detail that's there is more visible - mild sharpening (i.e. exaggeration of elements of the detail that's there), noise is reduced, color is more vivid and balanced - reds not as bloomy, blacks are blacker, chroma shift is adjusted, contrast is better. A dusty grayish haze over the whole thing is eliminated, sparkly things are more sparkly, shiny surfaces seem shinier, wood tones look more natural. Certain elements such as background objects in the dark are more visible. I assure you the treated video while obviously not true HD looks better than the original VHS. If you choose to insist this isn't possible, that's your prerogative.

You can't have de-interlaced and blended at the same time. The two terms have completely opposite meanings
Some deinterlace schemes blend the fields. It wasn't originally clear to me that this one doubles the frame rate and makes each field its own frame. Sue me. Again, you're developing heartburn over a point that shouldn't be heartburn-inducing.

Why waste so much precious life for nothing?
Fortunately, the computer does most of the work.
8. No. In going to huffyuv you did it in a way that affected luma and chroma values. There are better ways to do it, as I outlined. As you say, you're doing it the way you want. It's just that random colorspace conversions won't help preserve overall PQ, as demonstrated by the images you posted. But if you're getting what you want, case closed.
9. Originally Posted by sanlyn
No. In going to huffyuv you did it in a way that affected luma and chroma values.
I used a filter that shifts chroma, among other filters.
10. Chroma shift wasn't the point. Avoiding invalid YUV->RGB conversions is the point. The problem is complex, but the remedies are simple. http://forum.doom9.org/showthread.php?t=154731

But...whatever you want.
11. Hate to bust your bubble here, but...the lower image has increased contrast (to the point where dark detail is being crushed) but has no more "details" than the upper one does. Will look rather weird when the low level of detail is resized.
Finally made an initial burn to BD and got to see it played back on an HDTV. It looks fantastic. No clay-face or crushed anything in evidence. Looks clean but not artificially sharp. Looks good.
12. Sorry. I don't believe that. Not at all. By the time your playback gear upscales, it's as soft as the original, but with a lot of finer, inner detail missing. If you require pre-deinterlacing for everything you watch, it doesn't say much for the deinterlace, rescaling, or 3:2 telecine performance of your display setup. But if you like it, keep it.
13. Originally Posted by sanlyn
Sorry. I don't believe that. Not at all.
Mmokay.

By the time your playback gear upscales, it's as soft as the original,
When you say "upscaling" - you mean as in upscaling/upsampling as it would a DVD? Playback gear isn't upscaling - it's playing back the 1280 x720 image as burned to the BD.

Examine your logic. You think the processed image looks "as soft as" the unprocessed image at the same size. Ask yourself if that makes any sense.

Two files of the same frame unprocessed and processed. Taken right off the video files. I cropped the pillarboxing off the second one.

Does this

Look the same as this at the same size?

So why would it be any different at a larger size?

Feel free to admit the second one looks cleaner, more vivid and not as "soft" as the first.
14. Is that Chevy Chase blowing a French Horn?
15. Chevy Chase? Nah -- he's not smirking.

brassplayer: cropped still images don't demonstrate that much. It does look cleaned up pretty well, if still a little noisy. But in any case the lower image has no more "detail" than the top image, it just looks like VHS that's been denoised and sharpened. No doubt it will obviously play better than untreated VHS, and h264 encoding will be cleaner than MPEG2. So the BD version will look "better" than straight SD MPEG2. It's obviously improved from VHS source.

But wait a sec. These images aren't upscaled. I thought your intent was to do your own upscaling to HD. Neither image is upscaled to HD resolution, and the original image won't fill the HDTV screen without side pillars. With that frame size, you're still using your playback equipment's upscaling that you say you don't like. Again, I think your images say that your BD frame size is...what? 720x576 and somehow set up with sidebars to display as 16:9 ? So I'm thinking you added sidebars in your processing to tell your gear to play a 1.788888:1 image on a 16:9 display. Your playback hardware would have added those bars for you on a BD frame flagged for 4:3 display. I find this confusing, as I thought 720x576 was for PAL standard def BD at 50fps interlaced.

It would have been more informative to post a sample few seconds of the final video.

Why are the images so red? It's not red lighting that's doing it. Gelled floods don't look like that.

[QUOTE=brassplyer;2204590]
Originally Posted by sanlyn
Examine your logic. You think the processed image looks "as soft as" the unprocessed image at the same size. Ask yourself if that makes any sense.

Two files of the same frame unprocessed and processed. Taken right off the video files. I cropped the pillarboxing off the second one.

Does this

Attachment 15084

Look the same as this at the same size?

Attachment 15085

So why would it be any different at a larger size?

Feel free to admit the second one looks cleaner, more vivid and not as "soft" as the first.
There's nothing to explain. Your image will be magnified 2.2 times or so when it hits your HDTV. I thought this upsizing was something you wanted to avoid from your hardware. Obviously the newer image will look sharpened, and not as soft as the original, but still soft. Certainly, it won't look "HD". Yes there's an improvement in some respects but not the quantum leap you describe.

Besides, you've incurred a slight loss in horizontal real estate. You've filled a big percentage of the 720-wide encoded frame with black pillars instead of with info from the original image. You don't need the black bars. Your playback system will resize the image appropriately for 1.3333:1 and add pillars for you on a 16:9 display.
16. Originally Posted by budwzr
Is that Chevy Chase blowing a French Horn?
Wow Fletch lives!
17. Originally Posted by sanlyn
brassplayer: cropped still images don't demonstrate that much. It does look cleaned up pretty well, if still a little noisy. But in any case the lower image has no more "detail" than the top image, it just looks like VHS that's been denoised and sharpened.
That's because it's VHS that's been denoised and sharpened...along with deinterlacing, contrast/brightness adjustments and tweaking chroma alignment. Got rid of the gray-white caste the original image has. The only thing that's been cropped is the black pillarboxing in the second one.

No detail has been added per se, the detail that's there is more evident - so from a viewer's perception standpoint it's more detailed.

No doubt it will obviously play better than untreated VHS
Yup, obviously.

But wait a sec. These images aren't upscaled. I thought your intent was to do your own upscaling to HD.
They're both screen caps off Virtualdub, at the same size. The first is a 4:3 720 x 480 file, the complete second image is 16:9 1280 x 720 but only showing the 4:3 image part which I indicated - I cropped the pillarboxing for purposes of straight-up comparison.

Neither image is upscaled to HD resolution
Hopefully I've clarified that this is an incorrect statement, I thought it was already clear that this is what I've been doing.

Why are the images so red? It's not red lighting that's doing it. Gelled floods don't look like that.
Because of the colored floods - apparently yes they do do that. I thought you weighed in on that topic once before. The purple light is obvious all over the place - reflected on the walls, in some of the performers' gray hair, on white jackets, reflecting off shiny surfaces. There were numerous colored floods of various hues. Your example is artificially removing a caste that's supposed to be there.

Your image will be magnified 2.2 times or so when it hits your HDTV. I thought this upsizing was something you wanted to avoid from your hardware. Obviously the newer image will look sharpened, and not as soft as the original, but still soft. Certainly, it won't look "HD". Yes there's an improvement in some respects but not the quantum leap you describe.
I said it looks cleaner and better. It does look a lot better. Quantum leap is your term, not mine.

Besides, you've incurred a slight loss in horizontal real estate. You've filled a big percentage of the 720-wide encoded frame with black pillars instead of with info from the original image. You don't need the black bars. Your playback system will resize the image appropriately for 1.3333:1 and add pillars for you on a 16:9 display.
The 4:3 portion of the image needs to be at I believe 960x720 for HD scaling within the 1280 x 720 image. I don't see any option for creating a 960 x 720 image within the Blu-Ray rendering options - i.e. creating an HD image without putting it within a 16:9 image. Are you saying there is such a thing? I know on YouTube the only way to have it show up at HD resolution is to put it within a 720 or 1080 size image. This is an atypical project, I would think HD was intended for actual HD content so you have to make your image fit with the HD parameters by using this "trick".
18. OK, so the odd image size you posted has been explained (I got a PM about that. Where did the 735x570 image come from? That's a minor point anyway, but thanks for the explanation. I'll pass it on). OK, so granted you have to go thru all this labor and angst because your video setup doesn't deinterlace properly and doesn't upscale properly, and probably doen't handle 3:2 pulldown properly either. So the work does look pretty good (except for the tape noise in the dark backgrounds). But you haven't avoided resizing by your playback equipment; 1280x720 will be rescaled to 1920x1080 when it's played. You're still dependent on your equipment's rescaling performance, and you still have to go thru this resizing and pillarbox routine -- effectively upsizing twice, using two different methods.

It would be so much easier to get hardware that works. I don't have those problems here, but I see it in homes that I visit all the time when I work on clients' computers. To your credit it seems to be going pretty well, but really -- that leaves you with a lot of work ahead from here on out. I've been using 720x480 and 704x480 BD, interlaced or with telecine, with no problems from my equipment. Saving a couple of bucks on players, receivers and tv's that don't perform isn't worth the price. Especially when it still comes out looking like sharpened VHS no matter what you do.
19. QTGMC() is a better deinterlacer than that found in any TV. A good upscaler like nnedi3_rpow2() is better than any upscaler in any TV. So one can make an upscaled video that looks better than anything any TV can do. The question is it worth the time and effort (and additional file size)? And in the future, as TVs get better and better at deinterlacing and upscaling, will your upscaled video still look better than what the TV can do? You're upscaled video will be stuck with whatever artifacts and shortcomings it currently has.
20. Originally Posted by brassplyer
The 4:3 portion of the image needs to be at I believe 960x720 for HD scaling within the 1280 x 720 image. I don't see any option for creating a 960 x 720 image within the Blu-Ray rendering options
This line (added at the end of your script) will pillarbox your 960x720 into 1280x720. This solution is kind of not ideal because any CRT or 4:3 screen will show some little square in the middle of that screen and you have to zoom in while watching, but I'm not sure what else you could do. Proper BD authoring needs 1280x720 resolution for 60p.
21. Originally Posted by _Al_
any CRT or 4:3 screen will show some little square in the middle of that screen and you have to zoom in while watching
Does Blu-ray support pan-and-scan like DVD?
22. Originally Posted by jagabo
QTGMC() is a better deinterlacer than that found in any TV. A good upscaler like nnedi3_rpow2() is better than any upscaler in any TV. So one can make an upscaled video that looks better than anything any TV can do. The question is it worth the time and effort (and additional file size)? And in the future, as TVs get better and better at deinterlacing and upscaling, will your upscaled video still look better than what the TV can do? You're upscaled video will be stuck with whatever artifacts and shortcomings it currently has.
Well...agreed, up to a point. Recall, QTGMC is also denoising, something most TV's don't get into with deinterlace. Kinda pokey for real-time playback. But it's true, on most TV's I see in homes the deinterlace,3:2 processing, pulldown,scaling, etc., really looks bad. I mean bad. And I'm talking retail DVD and BD, right down to some good issues I'm familiar with. I researched and auditioned plenty before buying my equipment, and held off on BluRay for 4 tears until I found something that worked the way BD is supposed to, given a decent source.

Obviously, cruddy dirty noisy VHS and bad transfers need more than a good playback system. But, wow, just cleaning that stuff for SD digital playback is trouble enough. But as _AI_ sez, setting up as this project is will be limiting in some situations and a poor upscaling TV likely has problems that don't stop with deinterlace and upscaling. I'd rather opt for a better TV.
23. Originally Posted by _Al_
Originally Posted by brassplyer
The 4:3 portion of the image needs to be at I believe 960x720 for HD scaling within the 1280 x 720 image. I don't see any option for creating a 960 x 720 image within the Blu-Ray rendering options
This line (added at the end of your script) will pillarbox your 960x720 into 1280x720. This solution is kind of not ideal because any CRT or 4:3 screen will show some little square in the middle of that screen and you have to zoom in while watching, but I'm not sure what else you could do.
Thanks for the tip. Will try that in the future. I just did it with the resize filter within Virtualdub. Other things needed to be done besides simply pillarboxing - getting rid of the switching noise at the bottom and then because of that crop a little off the sides to keep the AR correct. No doubt can be done in avisynth as well but with Vdub you can tweak it and see the results immediately instead of having to rewrite a script.

Do people often play BD's on 4:3 crt's? CAN you even play a BD on a CRT? Not sure why anyone would have a BD player and not an HDTV. I think of BD as synonymous with playback on an HDTV - that's the only kind of set I even care about accommodating with this.

Proper BD authoring needs 1280x720 resolution for 60p.
That was my understanding.
24. Originally Posted by sanlyn
OK, so the odd image size you posted has been explained (I got a PM about that. Where did the 735x570 image come from? That's a minor point anyway, but thanks for the explanation. I'll pass it on). OK, so granted you have to go thru all this labor and angst because your video setup doesn't deinterlace properly and doesn't upscale properly
I guess you're bound and determined to avoid seeing the forest.

I'm going through this labor A) for fun and B) because no matter what gear you have, a VHS tape played straight through and upsampled on the fly isn't going to look as good as a VHS capture that's been tweaked and natively formatted for HD.
25. Originally Posted by poisondeathray
Originally Posted by budwzr
Is that Chevy Chase blowing a French Horn?
Wow Fletch lives!
Hey, now there's a nested topic in the thread!

Hahaha, remember the "Italian High Fashion" scene in EuroVacation? Hilarious.
26. Originally Posted by jagabo
Does Blu-ray support pan-and-scan like DVD?
I brought this subject because I'm not 100% sure, best it is for OP to check within DVD Architect (if I remember correctly he uses) if there is some box for it.

Does anybody have Pinnochio remastered BD? It is 4:3.
27. Originally Posted by brassplyer
Do people often play BD's on 4:3 crt's?
Yes.

Originally Posted by brassplyer
CAN you even play a BD on a CRT?
Yes. I still use mine now and then. Many CRT owners usually prefer component output anyway, not HDMI. Many people who bought, keep, maintain and calibrate good equipment don't favor wasting good merchandise that still works.

Originally Posted by brassplyer
Not sure why anyone would have a BD player and not an HDTV.
There are (were) HD CRT's. Most people that I know with CRT's can't stand the inferior image character of LCD's/plasmas. It is not a matter of picture size. I have one PC customer who lost his WEGA HDTV during an electrical storm. I can recall some time back when he spent \$1200 to have it calibrated by an ISF tech. He brought home a copy of every new HDTV he could get his hands on, one by one, returned each of them to the stores, one by one, and just stopped watching TV except for news and weather on an old 1990 Toshiba b&w 12" CRT. He attends our local movie fan club about twice a month to watch classic flicks with the group.

Many pro mastering labs still use CRT's to master DVD and BluRay.

Yes, I know that CRT's are disappearing. What a shame.

Statistics