VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. hello guys,
    what would be the most recommended Avisynth Script for a smooth NTSC to PAL DVD conversion with a as stutter free as possible playback ?
    There are so many out there but which one is the best ? I would be using DGIndex and HCencoder together with it. It's all about the script isn't it ?
    thanks in advance
    regards
    -Gwar
    Quote Quote  
  2. those are the ones which were recommended to me but both don't have smooth playback. They have visible stuttering in faster scenes

    LoadPlugin("C:\Program Files (x86)\Video\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth 2.5\plugins\TIVTC.dll")
    tfm(d2v="E:\video.d2v")
    tdecimate()
    AssumeFPS(25.000)
    LanczosResize(720,576)
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth 2.5\plugins\Decomb.dll")
    MPEG2Source("E:\video.d2v")
    Telecide(guide=1,blend=true)
    Decimate(cycle=5,quality=3)
    AssumeFPS(25.000)
    LanczosResize(720,576)
    Quote Quote  
  3. Both scripts are deleting one frame in five to convert 29.97 fps to 23.976 fps as they seem to assume the DVD source is "film" and therefore requires pulldown removal to restore the original 23.976 frame rate. Once that's done it's sped up to 25fps, but if the source is really "video" (29.97 fps interlaced NTSC) that will be what's causing the stuttering as you shouldn't be deleting frames. Try this (from the Avisynth wiki):

    Code:
    MPEG2Source("E:\video.d2v")            # Get clip
    Bob(height=576)                        # Separate fields and interpolate them to full height.
    BicubicResize(768,576)                 # Resize to PAL square-pixel frame size. (I can't see why that's necessary for a 720x576 output)
    ConvertFPS(50)                         # Convert field rate to PAL, using Blend mode.
    SeparateFields.SelectEvery(4,0,3)      # Undo Bob, even field first. Use SelectEvery(4,1,2) for odd field first.
    Weave                                  # Finish undoing Bob.
    Last edited by hello_hello; 19th Aug 2018 at 07:12.
    Quote Quote  
  4. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    NTSC to PAL is completely unnecessary.
    Quote Quote  
  5. Originally Posted by hech54 View Post
    NTSC to PAL is completely unnecessary.
    Unless it's necessary. Like when mixing NTSC and PAL material.

    Originally Posted by Gwar View Post
    what would be the most recommended Avisynth Script for a smooth NTSC to PAL DVD conversion with a as stutter free as possible playback ?
    There is no one script that works best for all material. You should provide a representative sample of your source. A sample with moderate motion. And not reencoded.
    Quote Quote  
  6. thank you very much for your suggestion "hello_hello". I will try this script later on today.
    By the way which tool would you recommend to me as the best one to find out if a source is a 29.97 fps interlaced NTSC "video" source or a "film" source with pulldown ?

    @hech54. If you want to keep the sound of an audio source 100% intact it's neccesary. For example if you have a 25fps with a PAL-speedup pitch sound.

    @jagabo if "hello_hello" suggestion doesn't work I make shure to provide a sample. 2 years ago I bought the tmpegenc smart renderer for all my mpeg2 cutting jobs so the sample would be without reencoding
    Quote Quote  
  7. Originally Posted by Gwar View Post
    thank you very much for your suggestion "hello_hello". I will try this script later on today.
    The output of that script is going to suck. Try using QTGMC() instead of Bob().
    Quote Quote  
  8. ok jagabo thanks. So you would suggest:
    MPEG2Source("E:\video.d2v")
    QTGMC(height=576)
    ConvertFPS(50)
    SeparateFields.SelectEvery(4,0,3) or (4,1,2) ?
    Weave
    and for future conversions is there a tool which tells me if a source is "film", "video" with or without pulldown ?

    I will also upload you a sample in a couple of hours
    thanks for your support
    Quote Quote  
  9. That clip starts out as 29.97p then after the titles and fade it switches to telecined film (23.976p with 3:2 pulldown, the rest of the show is probably the same). I'd probably use a motion interpolating frame rate changer to convert the intro to 23.976, then IVTC the rest with TFM().TDecimate(). The result will be all 23.976p.

    Code:
    Mpeg2Source("TFTCSAMPLE.d2v", CPU2="ooooxx", Info=3) 
    Crop(12,0,-4,-0)
    p1 = Trim(0,2459).SmoothFPS2(24000,1001)
    p2 = Trim(2460,0).TFM().TDecimate()
    p1+p2
    Image Attached Files
    Quote Quote  
  10. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    If you can get smooth 23.976 then just encode with hcenc with the proper pal resizing and don't do pull down. Afterwards drop the m2v file into dgpulldown and select 25fps. On normal players it will auto telecine and on progressive scan players it will play pretty close to film. I do this with pal sources to NTSC. As always mileage will vary
    if all else fails read the manual
    Quote Quote  
  11. Oops, I forget this thread was about NTSC DVD to PAL DVD (I'm involved in a few other deinterlacing/IVTC threads). Yes, so once you have the video back to 23.976 fps film frames as in post 10, resize to 704x576 (or 720x576). Then you can either speed the video (and audio) from 23.976 fps to 25 fps, or you can use dannyboy4888's suggestion and encode MPEG 2 at 23.976 fps progressive and use DGPulldown. The former is smoother but shortens the running time by about 4 percent (and is more work because you have to shorten the audio). The latter leads to two little jerks every second.
    Quote Quote  
  12. helped
    thanks
    Quote Quote  
  13. As Hech56 hinted, virtually all PAL DVD players and TVs can play NTSC DVDs as PAL60 which will be as smooth as watching the DVDs on an NTSC system. So if you're just interested in DVDs there's no need to convert.

    Note that PAL DVD players normally don't play commercial NTSC DVDs because of the region code, not because of the NTSC properties. If you copy the DVDs your copies will be region free and PAL players will happily play them.
    Last edited by jagabo; 21st Aug 2018 at 17:39.
    Quote Quote  
  14. thanks so far. My HCencoder says "there is no function named "SmoothFPS2".
    Which plugins do I need to load into the script despite DGDecode.dll and Decomb.dll. I searched a bit for a a "Smoothfps2" plugin but couldn't find anything.
    Regarding the script I shouldn't use the LanczosResize(720,576)command anymore and just resize with another tool ? Which one would that be ?

    After the conversion I can either change the fps to 25 with DGPUlldown and check if the jerks are visible and annoying or just speed it up in tsmuxer. Do I really need to cut the audio afterwards to make it fit ? I usually convert the audio with EAC3to with the command input.ac3 output.wav -23.976 -changeTo25.000 -down16
    and that was always synch to my old conversion method mentioned above.
    Quote Quote  
  15. You can find SmoothFPS2 by searching these forums. This post has it:

    https://forum.videohelp.com/threads/385501-Help-to-IVTC-this-source#post2499640

    It's just one of many variations that use mvtools. The mvtools docs has some other examples:

    http://avisynth.org.ru/mvtools/mvtools2.html
    http://avisynth.org.ru/mvtools/mvtools2.html#examples
    Last edited by jagabo; 22nd Aug 2018 at 13:02.
    Quote Quote  
  16. thanks but it still doesn't work. The HCencoder says "error loading Avisynth script, script error: end of files reached without matching) ........... SmoothFPS2.avs, column 65.

    I saved the following code into the plugins folder as SmoothFPS2.AVS
    function SmoothFPS2(clip source, int num, int den) {
    super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4)
    backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
    forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
    backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3)
    forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3)
    backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3)
    forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3)
    MBlockFps(source, super, backward_3, forward_3, num, den, mode=0)
    My avisynth scrip looks the following at the moment:

    import("C:\Program Files (x86)\Video\AviSynth\plugins\SmoothFPS2.avs")
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth\plugins\Decomb.dll")
    LoadPlugin("C:\Program Files (x86)\Video\AviSynth\plugins\mvtools2.dll")
    MPEG2Source("E:\Projects\GADG\video.d2v", CPU2="ooooxx", Info=3)
    Crop(12,0,-4,-0)
    p1 = Trim(0,2459).SmoothFPS2(24000,1001)
    p2 = Trim(2460,0).TFM().TDecimate()
    p1+p2
    LanczosResize(720,576)
    what am I doing wrong ? I also tried to leave out all "Load Plugin" commands + LanczosResize but that also didn't help. I know that european Players play NTSC but I recorded this show in my language dub on VHS back in the day and those Audio layers are in TV PAL. I want to adjust those to the US DVD's I bought and that's why I need to convert the source to PAL. If I just convert the Audio to NTSC it wouldn't sound the same because this show was aired with a PAL speedup Audio sound and I want it to exactley sound like that. I also bought the official release of this show in my language and you won't believe how bad the quality it. They converted the NTSC source so shitty to PAL like you never saw it before and the audio is also totally messed up, sourced from totally damaged master tapes with tons of drop outs and tapehiss and also converted in the wrong sound pitch. Since this is my favorite show I want to create my own private version of it using the US DVD's and the sound of my digitised HiFi VHS recordings.
    Quote Quote  
  17. You're missing the close curly brace at the end of SmoothFPS2.avs.
    Quote Quote  
  18. Originally Posted by Gwar View Post
    I know that european Players play NTSC but I recorded this show in my language dub on VHS back in the day and those Audio layers are in TV PAL. I want to adjust those to the US DVD's I bought and that's why I need to convert the source to PAL. If I just convert the Audio to NTSC it wouldn't sound the same because this show was aired with a PAL speedup Audio sound and I want it to exactley sound like that.
    I'd be surprised if the audio matches up even after changing the frame rate. I combined some NTSC DVD audio with HD 25fps video recently, and after I slowed the 25fps video down to 23.976fps I discovered the DVD version had many scenes with one extra frame, so I had to carefully compare them and duplicate frames at the end of scenes to mach them up (I wanted to avoid re-encoding the audio if possible). Sometimes you get lucky, but often not so much.

    Anyway, you might want to try a script with the video converted to 25fps and the audio included to see if they do match and how much work it'll require if they don't, before you spend a lot of time encoding. I find comparing the video helps, assuming you have both, otherwise you can just combine the video and audio, but either way it might pay to try it first. Something like this:

    A = MPEG2Source("E:\The quality video").SomeResizing(640,480) # or whatever resolution
    B = MPEG2Source("E:\The other video").SomeResizing(640,480) # make them the same resolution
    C = SomeAudioSource("E:\The good audio.ac3")
    A.Trim(0,2459).SmoothFPS2(24000,1001)\
    +A.Trim(2460,0).TFM().TDecimate()
    D = Last
    E = StackVertical(D, B)
    AudioDub(E, C)

    Personally, I'd rather slow the audio down than do horrid things to the video. You can slow it without changing the pitch.
    TimeStretch(tempo=(100.0 * 24000.0 / 1001.0 / 25.0)) # I think that's correct.
    Last edited by hello_hello; 24th Aug 2018 at 09:44.
    Quote Quote  
  19. Originally Posted by jagabo View Post
    You're missing the close curly brace at the end of SmoothFPS2.avs.

    you mean
    import("C:\Program Files (x86)\Video\Encoder\AviSynth\plugins\SmoothFPS2.avs}")
    LoadPlugin("C:\Program Files (x86)\Video\Encoder\AviSynth\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\Video\Encoder\AviSynth\plugins\Decomb.dll")
    LoadPlugin("C:\Program Files (x86)\Video\Encoder\AviSynth\plugins\mvtools2.dll" )
    MPEG2Source("E:\Projects\MOVIE\Geschichten aus der Gruft\video.d2v", CPU2="ooooxx", Info=3)
    Crop(12,0,-4,-0)
    p1 = Trim(0,2459).SmoothFPS2(24000,1001)
    p2 = Trim(2460,0).TFM().TDecimate()
    p1+p2
    LanczosResize(720,576)
    Still can't process the avs file
    Quote Quote  
  20. No, at the end of SmoothFPS2. Note the last line:

    Code:
    function SmoothFPS2(clip source, int num, int den) {
    super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4)
    backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
    forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
    backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3)
    forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3)
    backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3)
    forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3)
    MBlockFps(source, super, backward_3, forward_3, num, den, mode=0)
    }
    Quote Quote  
  21. thanks now it works. I will try it soon
    Quote Quote  



Similar Threads

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