Hi!
IVTC is basically bringing non-standard cut film back to 23.976fps. This, I know. Also, I know that adding .ConvertFPS(23.976) to my say 25 or 29.97fps clips is _not_ a correct way of achieving this.
So, I wonder if someone could just post
#1) AVS-code to correctly IVTC a 25 FPS .d2v DVD clip:
#2) AVS-code to correctly IVTC a 29.97 FPS clip.
would be much appreciated.
Regards~
![]()
+ Reply to Thread
Results 1 to 30 of 52
-
Drop dead gorgeous!
-
Also, I know that to decide proper code you must know field order. So, take top field first granted, as this is the major field-order, at least for NTSC (~30fps) DVD's.
Drop dead gorgeous! -
IVTC doesn't apply to situation (1) , because it's not telecined (it might be sped up from film rate for PAL , in which cause you do the reverse PAL slowdown)
IVTC may or may not apply to situation (2). If you are 100% sure that it is telecined, you could just TFM().TDecimate()
e.g.
MPEG2Source("file.d2v")
TFM().TDecimate()
If you don't know what it is, post a sample clip. You can also use this mini guide to figure out some common patterns
http://neuron2.net/faq.html#analysis
The bottom line is, there is no way to know without examining it manually. The FPS doesn't tell you conclusively what you have (there maybe hybrid sections, or field repeats etc.., it might be interlaced, not film etc..) -
First, thanks alot for your very quick response!
And thanks for the great points. Actually, just seconds after posting I started pondering my head over if PAL DVD's wasn't really kind of always progressive (so that no IVTC'd be needed). Anyways, you beat me to it. Thanks for confirmation. Also, I think I can cheat on getting to know the field order. The marvelous utility mediainfo.exe kinda supplies me with that fact for the clips I feed it with. If this is 100% realiable, I honestly don't know. Anyways. Also thanks for those code lines. I was abit fraid that I would get a massive trunk of code (>20lines). You see, I've tried googling my way to to find these answers but it's so confusing, tons of code, IVTC:ing, and like ten different types of interlacing are mentioned (not just ttf/bff). So I decided to post this to see if there was an easy way to approach "the most common situations".Drop dead gorgeous! -
mediainfo is not accurate at all in regards to field order, interlacing etc.. all it does is read a header on how the file was reported to be encoded or flagged.
You have to manually examine it (go through that procedure in that link or some similar process) to determine what the content actually is -
Oh, thanks for that.
But hey, what about DV footage?
I have a (25 fps/PAL) HandyCam. When I use ie. the handy utility windv.exe to fetch a clip from the tape, and then run mediainfo on this clip, I get:
Scan type : Interlaced
Does this mean that I should do some deinterlacing?
Because, up until now, I've just made an .avs script with DirectShowSource(dvclip.avi) and some temporal smoothing filters, etc. Then finally I've just done ffmpeg.exe -i dvshit.avs -acodec libmp3lame -vcodec libxvid... output.avi
Have I missed out on some important point? 'cuz I havn't seen anything particularly strange within output.avi, but then again, I do not have a trained eye for video stuff in general. I'm really novice.
Ty in adv~Drop dead gorgeous! -
DV footage is almost always interlaced, bff (at least NTSC is, not sure about PAL)
You should only deinterlace if your goal was for progressive display (like for web, or pc). If you plan on making a DVD-video, leave it interlaced
You should read up on interlacing
http://en.wikipedia.org/wiki/Interlace
http://www.100fps.com/ -
Yeah, and for the most part that exactly what my goal is -- computer / mpeg4'isch audience.
So, this would be the correct apporach:
Code:loadplugin("tivtc.dll") directshowsource("dvclip.avi") TFM().TDecimate() bicubicresize(640,360)
Drop dead gorgeous! -
-
I couldn't notice any difference in the outcome from TFM().TDecimate() and without it. However, like I said, I do not have a trained eye. It also struck my mind that perhaps the DirectShowSource is what's cracking. I know that some ppl think it's often halfway of a "cheat" in the meaning that it will load just about anything. Then I thought, perhaps directshow is doing some deinterlacing per auto, so thats why I won't notice any difference with TFM().TDecimate().
So, I tried replacing it with AviSource. Now, it wouldn't load at all. I had to "rundll32.exe ff_vfw,configureVFW" and check that ffdshow should be used for fourcc "dvsd". Now I only got the rendering-failed popup in MPC. It somehow struck me that the default YV12 could be my problem. So I added ConvertToYUY2() in my script. Now it - finally - played fine with AviSource. However, I'm still not noticing any difference ;^
But as long as you say I'm aaaight, then my nerves will stay calm enough. So, is TFM().TDecimate() my solution with 25fps DV material?
Regards~Drop dead gorgeous! -
Assuming that it's standard pal DV , you would use a deinterlacer, e.g. yadif. There are dozens to choose from, some very fast, lower quality, some very slow, higher quality. You can bob-deinterlace (2x fps, very smooth playback) , or single rate deinterlace (1x fps, choppier playback)
FFDshow's DV filter decodes as YV12, cedocida can be configured to YUY2 or YV12, but I think PAL DV is 4:2:0 YV12, NTSC DV is 4:1:1 YUY2
If you had regualr PAL DV, and used TFM().TDecimate() it would return 20fps, if you deinterlaced properly it would be 25fps, if you bob deinterlaced it would be 50fps. Huge difference between these
Upload a sample if you're not sure -
Ok, so wrong move of me.
Now, I added SmoothDeinterlace(), couldn't see any difference. But was that right?
I also tried:
ComplementParity()
SeparateFields()
This made the clip _really_ shaky. Shaking vertically indeed.Drop dead gorgeous! -
Correct of you.
TFM().TDecimate() gives me 20fps (slow playback, perhaps partly due to decoding process).
ComplementParity().SeparateFields() gives me 50fps (really choppy)Drop dead gorgeous! -
Yadif is fast enough to process real time for playback, and gives decent quality, you have to load it separately:
Load_Stdcall_Plugin("PATH\yadif.dll")
This will give you bob (50fps)
Yadif(order=0, mode=1)
This will give you single rate (25fps)
Yadif(order=0, mode=0) -
Thanks!
And:
SmoothDeinterlace(tff=false)
..is also a -- technically correct -- way of approach, even if a "cheaper" such, single rate, ~equivalent to Yadif(order=0, mode=0), correct?
Also, I won't notice any difference in/without bob, or is there any significant thing to look for, making it easier to notice. Just smoothness, overall?Drop dead gorgeous! -
Yes smoothness. Test it out for yourself. Encode a sample with bob-deinterlacing, and one with single. The difference should be light night and day
Better deinterlacers will have fewer artifacts (better quality than yadif) but cannot run in real time (very slow and CPU intensive) -
Okey. I have mediocre system (E2220/C2D 2.4GHz/2x2gb PC6400 etc), I wasn't sure that it could handle BOB playback. It was a bit laggy. However, I then realized that I had - in my novice search for light - literally drown my .avs in smoothers, waaay past the healthy point. I commented out lots and playback was really nice. You may laugh when you realize how it looked to begin with, it was just that I had heard that you should have lotsa smoothing 'cuz interlace non-hd stuff will always have an unnatural edgy sharpness that you want to get rid of.
However:
#loadplugin("tivtc.dll")
loadplugin("fluxsmooth.dll")
loadplugin("undot.dll")
loadplugin("smoothdeinterlacer.dll")
loadcplugin("yadif.dll")
directshowsource("dvclip.10-02-04_13-55.00.avi").trim(200,0)
#converttoyuy2
#yadif(last,3,0)
#TFM().TDecimate()
#ComplementParity().SeparateFields()
#smoothdeinterlace(tff=false)
Yadif(order=0, mode=1)
#undot.undot
fluxsmootht
#fluxsmootht
#blur(0.8).blur(0.2)
#tweak(bright=10)
bilinearresize(640,360)
Now, as you see, with lots of it commented out it went smooth. Encoding atm. Will see result at 50fps BOB. By the way, I put temporal smoothing after yadif, is this correct?Drop dead gorgeous! -
-
Thanks for the correction. I got the information from the Decomb Manual where it says:
Don't Invoke an Avisynth Strangeness This one is very important and can easily cost you a 25% speed penalty! It appears that Avisynth has a strangeness that causes it to waste enormous amounts of time when there are no parentheses with the commands. For example, this script:
Telecide
Decimate
…will run much slower than this one:
Telecide()
Decimate() -
Thanks again for your great answers.
Now, this lead me to this, sort of a follow-up:
In case of a ~29.97fps NTSC DVD. I would do ie. Yadif() or SmoothDeinterlace() for deinterlacing, and also TFM().TDecimate() for IVTC. Then I must ask you guys, which of these shall I put first in the script?
SmoothDeinterlace()
TFM().TDecimate()
or
TFM().TDecimate()
SmoothDeinterlace()
PS. Is the -deinterlace switch in ffmpeg.exe any good? eg. Is it comparable with Yadif or SmoothDeinterlace?Drop dead gorgeous! -
So NTSC DVD's can't ever be telecined and interlaced? I thought all DVD (PAL&NTSC) was interlaced.
But they are always either telecined or interlaced, correct? I'm in PAL country but I tried finding some (NTSC) DVD image to laborate on.
Also read this: http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-telecine.html
Which however doesn't reveal my (bold) question.Drop dead gorgeous! -
"Even if the source is progressive 29.97fps, it's almost always encoded as interlaced 29.97fps."
Read in another thread, on a whole different topic. Anyways, seems (from that) 29.97 (which is what you want to bring back to ~24 fps) is often interlaced aswell. Now wouldn't that require TFM().TDecimate(). and a deinerlacer?Drop dead gorgeous! -
Similar Threads
-
Need help IVTC a video
By drawar in forum Video ConversionReplies: 16Last Post: 31st May 2011, 22:29 -
Another IVTC problem
By elmuz in forum RestorationReplies: 8Last Post: 29th Jul 2010, 03:49 -
Why can IVTC not be perfect?
By loekverhees in forum Newbie / General discussionsReplies: 12Last Post: 31st Oct 2009, 17:51 -
ivtc help
By iamtehsux in forum Newbie / General discussionsReplies: 3Last Post: 20th Dec 2008, 19:58 -
IVTC Help!!!
By Martig in forum Video ConversionReplies: 1Last Post: 11th Jan 2008, 01:43