VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Hi all, I'm trying to backup a movie from DVD9 to DVD5. The source video itself is encoded as 60000/1001i but it's a movie so I assume that it was shot on film. I would like to use avisynth to restore it to a progressive state and encode it with soft-telecine using CCE. The problem I'm having is with the telecine pattern. Please have a look at the sample below and advise me how I should proceed.

    http://www.mediafire.com/download.php?pmmp6wa4byl9jh7
    Quote Quote  
  2. It's a field blended PAL to NTSC conversion. Use:

    Yadif(mode=1, order=1)
    SRestore(frate=25)

    Then encode 25fps progressive with pulldown flags. Or AssumeFPS(23.976) and encode with 3:2 pulldown flags (and slow down the audio).
    Quote Quote  
  3. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Hey jagabo,

    Thanks for the quick reply, I tried your script and it works out quite nicely. There is very little residual combing and a few artifacts in some frames, but I can live with those. The loss of detail is noticeable however. Is there an alternative to Yadif(mode=1, order=1) that I could try?

    Also, if I set SRestore(frate=24.975) and then do SelectEvery(5, 0,1,2,3,4,4).Weave(), would it be better than what DGPulldown does? My thinking here is 25->29.97 means there will be some blending, whereas 24.975 -> 29.97 means 1 duplicate frame in every 6, with no blending. I may, of course, be completely wrong, as I've never tried it...
    Quote Quote  
  4. Originally Posted by Island_Dweller View Post
    I may, of course, be completely wrong, as I've never tried it...
    Yes, you're completely wrong. The last thing you want to do is to repeat frames. DGPulldown doesn't create blended frames at all. However, I usually do use SRestore(frate=24.975) myself instead of the default 25fps.

    Also, I believe it's impossible for there to be any left-over combing resulting from SRestore as it outputs bobbed fields which, almost by definition, are never interlaced. If you want to use a better but much slower bobber before SRestore, look into one of the TempGaussMC variants:

    http://avisynth.org/mediawiki/TempGaussMC
    Quote Quote  
  5. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Hey manono, my apologies if I offended you by saying what I said about DGpulldown, and yes you're right, there is no combing but some ghosting effect rather. Again, sorry about that...

    However, CCE doesn't have any options at all to encode at 24.975fps; 23.976, 25 or 29.97 are your only options for DVD.

    I will give TempGaussMC a try. Cheers.
    Quote Quote  
  6. Yes, you have to encode at one of the DVD legal framerates, but when done you can apply a custom pulldown for 24.975->29.97 and it'll work out OK. The video remains the same length (assuming that's the framerate after the unblending) and the audio doesn't have to be stretched. Actually, I usually slow the video to 23.976fps after unblending it, and slow the audio also. It gets rid of the 'PAL speedup'.

    Offend me? No, I wasn't offended. It's just that you didn't (and don't) seem to understand what pulldown does.
    Quote Quote  
  7. MPEG 2 only supports the following frame rates:

    Originally Posted by Island_Dweller View Post
    However, CCE doesn't have any options at all to encode at 24.975fps; 23.976, 25 or 29.97 are your only options for DVD.
    MPEG 2 only supports a handful of frame rates. It uses a 4 bit field to indicate the frame rate:

    1 = 23.976
    2 = 24
    3 = 25
    4 = 29.97
    5 = 30
    6 = 50
    7 = 59.94
    8 = 60

    The other 8 values are undefined.
    Quote Quote  
  8. TempGaussMC doesn't leave the original fields unaltered - so even though it's much much better for general deinterlacing , you may get some bizarre artifacts when used with srestore. This has been reported by a few people, but I haven't seen it myself. But another problem is that it denoises if when at default settings which may not be wanted, especially since a concern over loss of detail was voiced. (Of course you can adjust the settings or even disable the denoising)

    For some strange reason , Tdeint(1,1) works much better on this sample than yadif when used with srestore. (normally tdeint is chalk full of deinterlacing artifacts, even worse than yadif) . But this doesn't mean it will work well on the whole movie. Yadifmod + nnedi2/3 is usually safe as well for anything you would normally use yadif on , but just much slower and fewer residual aliasing artifacts (but still faster than TGMC)
    Quote Quote  
  9. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    @ manono : thanks for the tip, it's a very clever trick.

    @ jagabo : thanks for the info.

    @ poisondeathray : Thanks for the suggestions.

    I tried tdeint(1,1) on the sample, and it works well and it's very fast, but it leaves a lot of aliasing artifacts when I try it on the main movie. Thin lines become jagged. I don't really know how else to describe it.

    Yadifmod(order=1, field=-1, mode=1, edeint=nnedi2(field=-2)) gives much better results. (6fps when using direct stream copy with vdub)

    I also tried TempGaussMC_beta2(lossless=2, EdiMode="bob"), TempGaussMC_beta2() and TempGaussMC_beta2(lossless=3). (~1.5fps average direct stream copy with vdub.)

    The output from TempGaussMC_beta2() is what I would like, if only I could tweak it to make it a little sharper. Suggestions?

    Each of these bobs attempts is followed by SRestore(frate=24.975) in the script, in case that's relevant.
    Quote Quote  
  10. Originally Posted by Island_Dweller View Post
    The output from TempGaussMC_beta2() is what I would like, if only I could tweak it to make it a little sharper. Suggestions?
    Describe in more detail by what you mean by sharper ? Do you mean less denoising in the first place ? or edge enhancement after the fact ?

    Some options might be to adjust the contra-sharpening strength , use noise-bypass settings , or use a 3rd party sharpener in the filter chain after bob-deinterlacing and srestore

    Note the denoising and blurring is critical for a stable , bob-shimmer free output - that's actually the reason why TGMC was created in the first place . When you reduce the denoising, you tend to get the shimmer back

    Here is the original post from the Didee regarding noise and TGMC (the original author, avisynth guru, and author of many incredible functions)
    http://forum.doom9.org/showpost.php?p=1324744&postcount=7

    QTGMC is a re-organization of the original TGMCb2 function with some added features, you can check that out as well
    http://forum.doom9.org/showthread.php?t=156028
    Last edited by poisondeathray; 24th Aug 2010 at 12:47.
    Quote Quote  
  11. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Hey guys, sorry, I haven't been able to try your suggestions since I last posted.

    By sharper, I mean I would like less denoising. Ideally, I'd like to keep as much detail from the source as possible. But if that's not an option, then I wouldn't mind adding edge enhancement after bobbing+srestore.

    Edit : just saw your link to Didee's post. I see your point. TGMC needs to denoise to do its magic. His idea of removing noise, bobbing, adding the noise is certainly something I'd like to try. Can I humbly request an example script of how to do this? This is what I have at the moment:

    MPEG2source("VTS_01_1.d2v")
    TempGaussMC_beta2(lossless=3)
    SRestore(frate=24.975)
    Last edited by Island_Dweller; 24th Aug 2010 at 14:41. Reason: response to new information provided
    Quote Quote  
  12. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    re: TGMC altering frames and therefore not good for use with Srestore

    I have been successful using a detection clip with Srestore. I use a script that looks like this:
    Code:
    setmtmode(5,0)
    loadcplugin(\\"C:\Program Files\Avisynth 2.5\plugins\yadif.dll\\")
    o = MPEG2Source(\\"PathTo\video.d2v\\")
    y = o.yadif(mode=1,order=1)
    tgmc = o.tempgaussmc_beta2(1,1,0,4,0,0,edimode=\\"Yadif\\",Smode=1,SLmode=1,Sbb=0,SVthin=0.0,pelsearch=1)
    setmtmode(2)
    tgmc.Srestore(frate=25.0,dclip=y)
    edit: Not sure why the editor keeps putting \ marks before double quotes ("), but remove those from the script.
    Quote Quote  
  13. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Hi txporter, thanks for the suggestion, I tried

    o = MPEG2Source("VTS_01_1.d2v")
    y = o.yadif(mode=1,order=1)
    tgmc = o.tempgaussmc_beta2(1,1,0,4,0,0,edimode="Yadif",Sm ode=1,SLmode=1,Sbb=0,SVthin=0.0,pelsearch=1)
    tgmc.Srestore(frate=24.975,dclip=y)

    I can't really figure out how to get setmtmode() to work, but this should only affect speed, right? Anyway, on this source, I don't like what yadif is doing to scenes with lots of motion.

    I've decided to give Didée's script here a shot. Here is what I settled upon.


    # Plugins
    Import("...\Srestore.avs")
    Loadplugin("...\nnedi2\nnedi2.dll")
    Loadplugin("...\masktools-v2.0a44\mt_masktools-25.dll")
    Loadplugin("...\RemoveGrain-0.9\RemoveGrainSSE3.dll")
    Loadplugin("...\RemoveDirt\RemoveDirtSSE2.dll")

    # Source
    MPEG2source("VTS_01_1.d2v")

    # Insane code
    nedibob = nnedi2(field=-2)
    prev = nedibob.selectevery(1,-1)
    next = nedibob.selectevery(1,1)
    max = nedibob.mt_logic(prev,"max",U=3,V=3).mt_logic(next ,"max",U=3,V=3)
    min = nedibob.mt_logic(prev,"min",U=3,V=3).mt_logic(next ,"min",U=3,V=3)
    calm = nedibob.merge(nedibob.clense(reduceflicker=false), 0.5)
    resharp = mt_clamp(calm.sharpen(1),max,min,0,0,U=3,V=3)
    restore = calm.srestore(frate=25) # or nedibob.srestore(frate=25), or resharp.SRestore(frate=25)

    # freeze before+after scenechange. Needs v0.9 of RemoveDirt.dll
    prev = restore.selectevery(1,-1)
    next = restore.selectevery(1,1)
    SCclean = restore.SCSelect(next,prev,restore,dfactor=2.0) # 2.0 ~ 5.0

    return(SCclean) # return(restore) for NO scenechange cleanup


    Thanks to everyone who participated in this thread, your help is greatly appreciated.
    Last edited by Island_Dweller; 28th Aug 2010 at 07:09.
    Quote Quote  
  14. You need a multithreaded build of AviSynth to use SetMTMode.

    http://avisynth.org/mediawiki/MT
    Quote Quote  
  15. Member
    Join Date
    Aug 2010
    Location
    Indian Ocean
    Search Comp PM
    Oops, I was still editing my post and you had already replied, you work very fast!

    Thanks for the link, it's gonna take me a while to get familiar with its syntax.
    Quote Quote  



Similar Threads

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