VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 52
  1. 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~

    Drop dead gorgeous!
    Quote Quote  
  2. 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!
    Quote Quote  
  3. Originally Posted by Gew View Post
    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.
    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..)
    Quote Quote  
  4. 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!
    Quote Quote  
  5. 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
    Quote Quote  
  6. 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!
    Quote Quote  
  7. 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/
    Quote Quote  
  8. 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)
    Correct?
    Drop dead gorgeous!
    Quote Quote  
  9. Originally Posted by Gew View Post
    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)
    Correct?
    Not if that was a DV-AVI

    You want to deinterlace, interlaced material

    You want to inverse telecine, telecined material
    Quote Quote  
  10. 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!
    Quote Quote  
  11. 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
    Quote Quote  
  12. 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!
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    FFDshow's DV filter decodes as YV12
    Strange indeed. That FFDshow wouldn't render/play it as YV12, but only after ConvertToYUY2()
    Drop dead gorgeous!
    Quote Quote  
  14. If you are using AVISource() and ffdshow to decode that uses the VFW configuration (yellow icon) , DirectShowSource() uses directshow (red icon)
    Quote Quote  
  15. 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!
    Quote Quote  
  16. 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)
    Quote Quote  
  17. 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!
    Quote Quote  
  18. 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)
    Quote Quote  
  19. 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!
    Quote Quote  
  20. Originally Posted by Gew View Post
    By the way, I put temporal smoothing after yadif, is this correct?
    Yes, do the filtering after it's been made progressive. Also, when using the filters, even if no parameters are named, it's slightly faster if you put '()' after the name of the filter, as in:

    fluxsmootht()
    Quote Quote  
  21. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by manono View Post
    ... when using the filters, even if no parameters are named, it's slightly faster if you put '()' after the name of the filter, as in: fluxsmootht()
    That used to be the case in some older versions of Avisynth (the cache wasn't used if you omitted the parentheses), but that problem was fixed some time ago. Still, adding parentheses does make the script clearer IMHO.
    Quote Quote  
  22. Originally Posted by Gavino View Post
    That used to be the case in some older versions of Avisynth (the cache wasn't used if you omitted the parentheses), but that problem was fixed some time ago. Still, adding parentheses does make the script clearer IMHO.
    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()
    Since the manual itself is over 4 years old, it stands to reason that peculiarity might have been fixed some time ago. Whether doing it that way makes the script clearer or not, I don't know. But I've been doing it that way for so long that the scripts look weird to me if I don't do it, so I'll keep doing it. I don't guess it matters much to Gew, though.
    Quote Quote  
  23. 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!
    Quote Quote  
  24. Originally Posted by Gew View Post
    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?
    None of the above. It's film and telecined, then just TFM().TDecimate(). If it's interlaced, then just deinterlace

    I have no idea about quality/speed of ffmpeg deinterlacer
    Quote Quote  
  25. 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!
    Quote Quote  
  26. Also, say I have an telecined NTSC DVD. What would mediainfo make of the field order, progressive?
    Drop dead gorgeous!
    Quote Quote  
  27. "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!
    Quote Quote  
  28. Originally Posted by Gew View Post
    Also, say I have an telecined NTSC DVD. What would mediainfo make of the field order, progressive?
    Mediainfo sometimes says interlaced, sometimes it gives field order. But it doesn't matter, because it can be incorrect either way.
    Quote Quote  
  29. Oh, yes, you mentioned it earlier, that mediainfo's returning info is just based on metadata from the clip.
    But still, is the scenario with interlace and telecide at the same time, naturally impossible?
    Meaning are these two kinda like opposites?
    Drop dead gorgeous!
    Quote Quote  
  30. Originally Posted by Gew View Post
    Oh, yes, you mentioned it earlier, that mediainfo's returning info is just based on metadata from the clip.
    But still, is the scenario with interlace and telecide at the same time, naturally impossible?
    Meaning are these two kinda like opposites?
    Unfortunately , no.

    Often you get hybrids or combinations of interlace sections and telecined sections
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!