![]() |
Avisynth: SmoothDeinterlace and ConvertToYUY2?
Hi everyone
I have an mpeg2 interlaced source... so, I thought that maybe using SmoothDeinterlace my problem would be solved. But, when I loaded my AVS script on Tmpgenc, avisynth warned me that SmoothDeinterlace only works with YUY2 and RGB32 sources. So then, I added: ConvertToYUY2(interlaced=true) and finally, my script was accepted. however, when I finished the encoding I noticed that the left half of the video was VIOLET, and the other half was correct. After that, I tried: ConvertToRGB32(interlaced=true) And what I got was almost the same result... just that it wasnt the half, but just an small section of the video all colored in violet. I dont get why this is happening. Im not a total noobie, but this is out of my tiny knowledge. plzzzzzzz!!! PS: sorry for my english, if everyone could understand spanish it would be much easier to me. :) [/code] |
We used to have this problem once. This is due to an instruction that I do not remember at the moment that need to works in YV12 !
(I will remember the line if you post your complete script). That means that you have a real incompatibility in your scripts between filters that need to be in YV12 and others that need to be in YUY2. :arrow: you will have to choose beween dropping the YV12 filter or using and other deinterlacer (there are a lot that work in YV12). |
That half violet screen issue "IMHO"!!! results from a usage of "Asharp()" in YUY2 colorspace!
Second: If you dont want to result your strems in a 50fps "bobbed" state, then Smoothdeiterlace() is NOT the first choice! Youd look for "Kerneldeint()" on neuron2.net or if you want it quick'n dirty "try" Fielddeinterlace(full=false, blend=false) ... or blend=true. (Blend=false means no blendings/ghostings but blend=true means no jitter at all) So the best would be if you post your TOTAL actual script where your problems do base on. |
thanks!! :P
yeah, I was using Asharp filter. the script I did wasnt the big thing, just loading the source, then "Smoothdeiterlace"ing, and finally "asharp. I've read somewhere that the best desinterlacing filter was Smoothdeiterlace. Actually, I don't understand whats ASHARP is for... now Im going to look for it. than, maybe I can delete that line from my script. :wink: |
Don't delete anything.
Post your script here and somebody will tell you what is the better solution. |
Quote:
Do you order something new in a restaurant you've never eat before without reading the card at least? ;) Asharp -- "nomen est omen" does sharpen .... but in an adaptive way so only edges will be sharpened by using threshold. So do follow mine and Prodaters advice and post your script |
Quote:
When I'm in a chinese or japonese restaurant and don't understand the name of somethign of the card, I order it :-D |
YEP!
"no risk - no fun" .... isnt it ? :lol: Do you remember that nice -old shool- hip hop song from 1988 "go see the doctor" from Kool Moe dee ? :) http://www.discogs.com/artist/Kool+Moe+Dee |
Dont be surprised:
Code:
LoadPlugin("C:\AVSFilters\MPEG2Dec3dg.dll") actually, I knew the concept of ASHARP; the name reveals itself. its just that there are so many filters which do the same job. |
Try this script:
Code:
LoadPlugin("C:\AVSFilters\MPEG2Dec3dg.dll") |
Hi Boulder,
The version in the link you suggested is 1.5.0. Here -> http://gast3.ssw.uni-linz.ac.at/~kp/...th/KernelDeint we can find a version 1.5.1. Do you know if this is an official compile of KernelDeint, and what are the changes from the previous version? Just one more question... I have been reading that KernelDeint is considered one of the best deiterlacers out there (if you want to keep the same fps as the source). Comparing KernelDeint and FieldDeinterlace, the final result will be that different? |
Quote:
Quote:
Quote:
|
You should also test "tdeint()" a new deinterlacer with modes for 25fps and 50fps(bobbed) output. It might become the best deinterlacer actually available as some tests till now have been shown.
|
That's true, it's a good one. It's just damn slow due to the amount of calculations involved in its technique :cry:
|
I'm trying to deinterlace some interlaced music video clips and made some tests with these three deinterlacers.
KernalDeint and TDeint seems to produce an image a little more sharp (I don't stop to compare them deeply), but IMHO they have a big negative point compared to FieldDeinterlace that is they produces much more jerkiness. I think the smoothnes FieldDeinterlace seems to produces is due to the blending of the fields. But IMHO I prefer the blending ghost then the jerkiness. What do you think? Is there a way to get rid of the "blending ghosts" and the jerkness at the same time, or do I really have to choose one? |
It's one or the other, either you blend or interpolate.
You could try with sharp=false for a less sharp kernel. TDeint also has some parameters which might help with jerkiness, and TomsMoComp is not bad either, try it without the vertical filter (TomsMoComp(x,5,0) that is). |
muaddib,
I don't know exactly what kind of material you have, but maybe one option would be a conversion from 60i to 24p? Music videos are probably pure interlaced 29.97fps streams, which could be turned into 23.976fps monsters. There's a sticky thread about it at the optimal scripts forum. |
Quote:
In this case I will stay with "blend". I really don't like jerk playback, even if it is a light jerk... Quote:
Quote:
Quote:
|
Quote:
Quote:
There is one interesting thing… with the 29.97 material, dvd2avi reports them as 100% ntsc interlaced, but there are some of them that I can do a simple IVTC (telecide.decimate), and it will result in a perfect 23.976 stream. By perfect I mean a completely smooth playback. The problem is that there are the ones that will result in a jerk playback. :x So I always have to try/encode them and check if it’s ok or not. I’m getting tired of these tests. :? and I have many (many!) clips to encode. :? Also there are some 25fps reported as interlaced, but they are not! There is absolutely no comb effect in the entire stream. |
Well, DVD2AVI doesn't really know much..you must trust your eyes at all times.
One way to figure whether a clip is truly interlaced is to use a script that only loads the source and then SeparateFields(). View this clip in VirtualDub and see if there are any changes in the fields of the same frame. If there's constant movement, not just two duplicate frames with the other shifted a bit up or down, the clip should be truly interlaced. With PAL sources you'll just have to deinterlace or encode as interlaced. Shouldn't telecining result in a pattern of 3 progressive frames, then 2 combed when the source is loaded to VDub? |
Ahhhh Music Videos Nice!! :lol:
Well, most NTSC Musicvideos are shot on film, being telecined and then in THAT telecined state cuttet! So u should frist try to ivtc your source. BUT in case of PAL: In here many US Music Videos broadcasted in PAL Land are fieldblended/decimated from this telecined 29.97 state using a brutal conversation down to 25fps fieldblended. Here only "restore24" would give you the needed orig 23.976 fps back. |
Quote:
Quote:
Quote:
And as Boulder said: Quote:
This will save me time, but not work, cause I still have to check the videos one by one... I wish there was a tool that would automatically analyze the stream (not just the header or flags) and give us the correct type of the stream. :roll: Well I checked some of the material I have and found this kind of patterns: NTSC land (all reported as 29.97fps 100% interlaced) :arrow: 2I - 3P -> This is the simple telecinned, right? :arrow: 3I - 2P -> How should I process this? :arrow: 4I - 1P -> Should I assume this as full interlaced? :arrow: Progressive (fieldblended) -> Can I make anything with this one, or just encode as is? There were others isolated strange patterns like 1I-1P-1I-2P, but I don't know if it's worthy to mention... PAL land (all reported as 25fps 100% interlaced) :arrow: Full Progressive :arrow: Full Interlaced :arrow: Part Interlaced part Progressive :arrow: Look like it was deinterlaced, but it presents some small comb effect, some kind of a light residual comb left over. Please, I would be very happy if you give me your thoughts about how to process all this different kind of streams. :roll: Thanks a lot! :D |
Quote:
|
Regarding all those patterns, I'd go first for Telecide() and trying different values for the guide parameter. Guide=0 might be worth trying too.
Restore24 : http://forum.doom9.org/showthread.ph...ight=restore24 One alternative for Telecide() would be BlendBob : http://forum.doom9.org/showthread.ph...light=blendbob It's very hard to tell you any general scripts for those sources as the original can be just about anything! But that 3:2 pattern should require standard IVTC. |
the first I do with all 'unknown' video stuff is bobbing and counting unique frames.
this means a video is loaded into AVS and bob() gets appended. this thing is then loaded into VDub. then count the unique frames in 200 bobbed frames. also noteyour frames an a sheet of paper! also pay attention for blended frames. the result may look as follows: o - clean frame d - duped that clean frame b - blend of its neighbors. simple Telecined NTSC Film: o d d o d o d d o d o d d o d o d d o d o d d ... progressive PAL: o d o d o d o d o d o d o d o d o d o d o d phase shifted PAL: o o d o d o d o d o d o d o d o d o d o d o 60i or 50i video: o o o o o o o o o o o o o o o o o o o o o 25fps blended into 60i video... o d b o b o b o d b and lots of other weird 'telecing' patterns I've seen serveral ones so far! please post a short sample of unprocessed (no resizing, no deinterlacing, either direct stream copied or chopperXPed) video, which shows the problems. |
Sorry for bumping in like this guys.
I've been reading this thread with great interest. I live in PAL land and basically only backup DVD movies. So I never came across an interlaced source before and never gave it too much importance. That is, untill I bought me a TVCapt. card. This means I'm a complete noob and that I have been searching this and other forums for information about interlaced sources. And I must tell you that this haven't been an easy task. Most forums have good guides on this subject. But the problem is, most forums only post pictures for comparison. I think as a big noob I would need a very small 5 seconds movie to load into VDubMod and start analysing it myself. Because you give great explanations but I can only imagine what you're talking ;-) and watching a picture ain't the same thing as watching 100 or 150 motion pictures and see how those behave. So here's what I'm going to do (unless someone can show me a place with what I'm about to do). Tonight I'm going to start a new thread asking for users with the most common types of interlaced sources to post some small clips with 5 to 10 seconds and 352x288 resolution. Then I would ask you guys to go over there and point what is what and what methods should we use to encode when going from NTSC to PAL and the opposite. I hope you will be able to help me and other to come users. TIA guys. Cheers |
Rui,
make that 352x576. With 352x288 you'll be discarding one field when capturing :!: Basically it's the same with a DVD and a TV capture. Most movies/programs originally film material, shot at 23.976fps, are broadcast progressive in PAL lands. That is the case if the NTSC->PAL conversion has been done correctly by speeding up the video and audio. Sometimes the conversion has been done with a converter which results in fieldblending etc. This can often be repaired with Scharfi's Restore24 which attempts to restore the original film frames. Many European programs/movies are truly interlaced so they must be treated as such. The patterns scharfis_brain posted help in determining this case. To put it simple: load the source, use Bob() and if you see no duplicate or blended frames, it's truly interlaced. |
Thanks Boulder.
I just thought about using 352x288 because it will use less bandwidth to upload/download. I didn't know I'd loose a field :oops: too noob in this area :lol: Cheers |
Quote:
I’m very glad to have you here with us! :D This “forum” stuff is strange... I never talked to you before, but I have read a lot posts from you that looks like I already know you for a long time. I just miss the “interlaced” Simpson’s brain. :mrgreen: And sorry for the late reply... I was very busy these last days. :? Well, I did some tests with the method you described and got many different results. Some of them are easy to decide what to do, but some I don’t have a clue, even if I can do anything. Some times is hard to identify what kind of field/frame I have. Especially hard when there are blended fields... I probably got lost inside some of the patterns that have many of those fields. Well... I’ll post what I got here: :arrow: NTSC material (720x480 @29.97fps): 1-) o d d o d o d d o d o d d o d o d d As you said, this one is a simple telecined NTSC film, and a standard IVTC should handle it. But I have many sources that loose the pattern on scene changes (sc). I mean they have a little gap in the pattern, like this: 2-) o d d o d o d d o (sc) o d d o d o d d o d o d d o d o d d o d o d (sc) o d d o d o d d o d Will a standard IVTC handle these little “gaps” inside the pattern correctly? 3-) o d d o d o d d o d o d d o (sc) o o d o d d o d o d d o d o d d o (sc) o o d o d d o d o d d Here is another example of these little “gap” at scene changes. The question is the same. 4-) b d b d o d o d o d b d b d o d o d o d b d b d o d o d o d This one looks like an already field blended to me... :?: Can I do something with it? 5-) o b b b b b b b b b o b b b b b b b b b o b b b b b b b b b Now this is strange :!: I don’t know, but looks like a full interlaced with all blended fields! This one has many bobed fields with some dirt and ugly comb effect. :puke: 6-) o d o d o d o d o d o d o d o d o d o d o o o o o o o d o d o d d o d o d d o d o d d o d o d d o d o d d o d o d d o d o d d o d o d d o d o d (sc) o o d o d d o d o d d o d o d d o d o d d o d o d d o d o d d o d o d o d o o o o o o o d o d o d d o d o d d This sample has some movie inside the movie. I mean in those bold fields there is a car that goes through the screen and when the car gets out of the screen we are in another scene and the mix of the car passing and the scene in the background is what gives all clean fields. 7-) o d o d d o d o d d b o b o d b o b o d b o b o d b o b o d b o b o d b o b o d b o d o d d o d o d d b o b o d b o b o d b o b o d b o b o d b o b o d b o b o d b o b o d b o d o d d o d o d d o d b o d b o b o d b o b o d b o b o d I’ll not even try to show the pattern here. This is probably not 100% correct (but you got the picture). Some blended fields are easy to be taken as clean field depending of the motion. This one seems to have two patterns inside a bigger pattern that repeats itself. Is there anything to be done here? Or just a FieldDeinterlace (blending fields) will keep the motion smooth? :arrow: Now a few PAL material (720x576 @25fps) 1-) o d o d o d o d o d o d Beautiful progressive PAL. :D 2-) o b o b o b o b o b o b Watching this clip without bob() we can see (in all frames) some tiny comb effect. Well, I guess this is full interlaced, as it has no duped frames (with bob)... but interlaced with blended fields? 3-) o d b o o d b o o d b o b o d o b o d o b o d o d o d b o o d b o o d b o b o d o b o d o b o d o d o d b o o d b o o d b o b o d o b o d o b o d b o o d b o o d b o d o o b o d o b o d o b o d b o o d b o o d b o b o o b o d o b b o o d b Well, this looks to be a trouble one. :x It seems to have 2 or even 3 patterns inside a bigger pattern. I can’t imagine if there is really something that could be done “automatically” other than blend the all fields to keep the motion smooth. :?: :roll: Well that is it. There are many more “weird” examples but I believe those are more than enough... Quote:
Quote:
Even if you could post some script examples would be great! As “Scharfi's scripts are the best ones!” (yes I read that thread too :mrgreen: and even used the apostrophe correctly :wink: ) As I said, I have many music videos to deal with. Please, tell me if you want a sample of any specific example that I posted above and I will happily find a way to place a link here. Thanks a lot! :D |
Quote:
You are the most welcome Rui! :D Quote:
Did you start that thread aready? |
Damn!, my eyes hurt muaddib :!:
All I can seee is o d b o o d b o o d b o b o d o b o d o b o d o d o d b o o d b o o d b o b o d o b o d o b o d o d o d b o o d b o o d b o b o d o b o d o b o d b o o d b o o d b o d o o b o d o b o d o b o d b o o d b o o d b o b o o b o d o b b o o d b :lol: -kwag |
:rotf: :rotf:
|
Well, I did the post talking to scharfis_brain, but I believe he must be busy these last days.
If anyone has tips or comments to do about those kinds of sources, please help me! Until now my situation is like this: - If the source has a standard telecine pattern, than I just make a standard IVTC. - Anything else (that is interlaced) I use FieldDeinterlace and blend the fields, in order keep the motion smooth. So… any ideas :idea: :?: :roll: |
Hi muaddib!
This subject is very interesting and I'm waiting for scharfis_brain response too :) I'm having a weird experience with ivtc: I tried capturing a VHS with a collection of Goofy cartoons (Os maiores sucessos do Pateta). Source: VHS, NTSC Capture: 720x480 MPEG-2 I-only 8Mbps with an old ATI AIW, zero frame drops. Audio mp2 @ 48 kHz. With a quick visual inspection, you can tell it's got an almost steady telecined pattern. The only exceptions are the transitions from one story to the next, where you have some weird hybrid frames - wipes from/to solid colors, where the wipe is interlaced overlayed above the telecined cartoon. Since these transistions are very quick, I don't mind if they're left with a little combing, anyway. So I thougth it would be easy to ivtc with Telecide/Decimate (decomb). Created a .d2v (since the capture is in mpeg) and loaded in an avs script. dgmpgdec 1012, avisynth 2.55 Following the tutorial that comes with Decomb511.dll, I checked the frame order, which is top first for this card. The line Telecide(order=1,guide=1,post=0,show=true) confirmed the visual inspection (steady pattern except for the wipes). So up to now: Telecide(order=1,guide=1) The preview in VirtualDubMod showed no more big combing, but it was not perfect. The edges were "jagged", post processing with Telecide didn't help. Since this is a cartoon the edges are very evident. I then quit the avs script, load the file directly in virtualdubmod and used Telecide for vd (everything default). The lines were PERFECT! Solid, smooth edges :) Except, of course, the wipes :) :?: :?: :?: :?: What am I doing wrong? Why does the telecide for vd looks ok and telecide for avs looks bad? Maybe it's a color space conversion somewhere messing with the ivtc? |
Try with the parameter blend=true in Telecide().
|
OOOPS :oops:
I solved it... There was a "SwapFields()" line left behind from another incarnation of the script. Removing it everything is fine now. Sorry... :oops: |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.