VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Hello!

    I have NTSC dvd and really don't know how to encode it, MeGui'sanalysis showes TIVTC, Shall I encode in 25fps or 23.976?
    This is my scriptand a video sample:





    Code:
    SetMemoryMax(500)
    SetMTMode (3, 5)
    
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\LoadPluginEx.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\medianblur.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\LogoTools.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\TIVTC.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\TDeint.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\mt_masktools-25.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\vinverse.dll")
    
    
    
    B=ImageSource("C:\Users\TenSoR\Desktop\Mask.bmp").ConvertToYUY2()
    A=MPEG2Source("G:\DVDS\The Great Gambler (1979) \Work\VTS_02_1.d2v").ConvertToYUY2(Interlaced =True)
    
    SetMTMode (2)
    
    NoLogoAuto(A,B,150)
    ConvertToYUY2()
    NoLogoAuto(A,B,243857)
    ConvertToYV12()
    A=Last
    B=A.MedianBlur(2,2,2).Tweak(sat=0,Coring=False)
    Mask=ImageSource("C:\Users\TenSOR\Desktop\Mask.bmp")
    Overlay(A,B,0,0,Mask)
    
    
    AssumeTFF()
    tfm(order=1).tdecimate(hybrid=3)
    TDeint(order=-1, mode=1)
    srestore(frate=25)
    vinverse()
    Crop(4, 0, -2, -0)
    Distributor()
    Thanks in advance!
    Image Attached Files
    Last edited by TeNSoR; 19th Mar 2016 at 04:54.
    Quote Quote  
  2. I didn't try any logo removal, but I suspect maybe deinterlacing/deblending first and logo removal second might work better.

    For deblending I don't think you need to do anything other than this:

    QTGMC() # or yadif(mode=1)
    SRestore()

    That'll give you 25fps.

    There's some rather odd things happening on the scene changes. Blemishes that don't seem to have a logical reason for being there. I don't know if there's a clever way to fix those.
    Quote Quote  
  3. Originally Posted by TeNSoR View Post
    Shall I encode in 25fps or 23.976?
    It depends on whether you have any requirement or preference for one or the other?
    Quote Quote  
  4. Originally Posted by TeNSoR View Post
    AssumeTFF()
    tfm(order=1).tdecimate(hybrid=3)
    TDeint(order=-1, mode=1)
    srestore(frate=25)
    vinverse()
    Crop(4, 0, -2, -0)
    For the record, MeGUI can show a few different source types after the analysis to which it applies some sort of IVTC.

    "Hybrid Film/Interlaced - Mostly Film" applies IVTC to the film parts, and the interlaced parts are de-interlaced to 29.970 progressive and then converted from 29.970 to 23.976 using frame blending. The "Partially Film" option adds the same thing to the script.

    tfm().tdecimate(hybrid=1)

    "Hybrid Film/Interlaced - Mostly Interlaced" does it the other way around. The de-interlaced parts are de-interlaced to 29.970 progressive and IVTC is applied to the film parts which are then converted from 23.976 to 29.970fps using frame blending.

    tfm().tdecimate(hybrid=3)

    It's a compromise in order to output a constant frame rate, but you wouldn't want to be doing any of that before using SRestore()
    Quote Quote  
  5. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Thanks, hello_hello for your advice
    Quote Quote  
  6. Originally Posted by TeNSoR View Post
    I have NTSC dvd and really don't know how to encode it, MeGui'sanalysis showes TIVTC, Shall I encode in 25fps or 23.976?
    Don't rely on MeGUI's analysis for old Indian films. It doesn't know how to handle field-blended DVDs and will give you very poor results. Use your eyes and you'll do a much better job.

    As hello_hello recommended in the first reply:

    Yadif(Mode=1)#or the better QTGMC
    Srestore()


    That will give you 25fps and you can keep the audio untouched. If you want to slow it to film speed (I always do) just add AssumeFPS(23.976) after the unblending. The audio will have to be slowed and reencoded. However, since the Indian companies waste way too many bits making DD5.1 audio with all channels the same from what was originally mono audio, I don't hesitate to reencode the audio.
    Quote Quote  
  7. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by manono View Post
    Originally Posted by TeNSoR View Post
    I have NTSC dvd and really don't know how to encode it, MeGui'sanalysis showes TIVTC, Shall I encode in 25fps or 23.976?
    Don't rely on MeGUI's analysis for old Indian films. It doesn't know how to handle field-blended DVDs and will give you very poor results. Use your eyes and you'll do a much better job.

    As hello_hello recommended in the first reply:

    Yadif(Mode=1)#or the better QTGMC
    Srestore()


    That will give you 25fps and you can keep the audio untouched. If you want to slow it to film speed (I always do) just add AssumeFPS(23.976) after the unblending. The audio will have to be slowed and reencoded. However, since the Indian companies waste way too many bits making DD5.1 audio with all channels the same from what was originally mono audio, I don't hesitate to reencode the audio.
    You're right, Tom, I don't use MeGUI in encoding I use x264 CLI now just I felt confused how to encode this DVD. I always encode the audio file to decrease its size Thanks for your reply and for all you guys
    Quote Quote  
  8. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    manono, I have tried your way to slow it to a film "23.976" but the audio is
    not sync with the video. I couldn't manage to adjust it with mkvmerge GUI at all,
    Any idea?
    Quote Quote  
  9. Originally Posted by TeNSoR View Post
    manono, I have tried your way to slow it to a film "23.976" but the audio is
    not sync with the video.
    Of course. The idea was to eliminate the PAL speedup and restore the original running time of the movie, about 4 percent longer. Stretch the audio by 25/23.976.

    This is why I told you it depended on what your requirements and desires were. Do you need a PAL video with the PAL runtime? Then encode at 25 fps and keep the original audio. Do you want the original running time of the movie and don't care about PAL frame rates? Then encode at 23.976 fps and stretch the audio to match.
    Quote Quote  
  10. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by TeNSoR View Post
    manono, I have tried your way to slow it to a film "23.976" but the audio is
    not sync with the video.
    Of course. The idea was to eliminate the PAL speedup and restore the original running time of the movie, about 4 percent longer. Stretch the audio by 25/23.976.

    This is why I told you it depended on what your requirements and desires were. Do you need a PAL video with the PAL runtime? Then encode at 25 fps and keep the original audio. Do you want the original running time of the movie and don't care about PAL frame rates? Then encode at 23.976 fps and stretch the audio to match.
    I see but how to sync the audio with the video now? Thanks in advance, Jagabo
    Quote Quote  
  11. Originally Posted by TeNSoR View Post
    but how to sync the audio with the video now? Thanks in advance, Jagabo
    It shouldn't need synching after being stretched correctly, just muxing. I do this by first using BeSweet with the 25->23.976fps preset to create a WAV file. Afterwards I work with the audio in Audacity before reencoding to AC3. An easier and more direct way is to use eac3to to create a properly stretched AC3 file (it'll be 5.1, like the original, though) using the 25->23.976 (or PAL to film, I forget) setting. But all those useless DD5.1 Indian AC3 files I reencode to DD 2.0@224 AC3.

    At the most, after doing the stretching you might need to find and set a slight delay. I mux the audio and video when authoring with Muxman.

    And there are other ways to do the stretching. You can, for example, do it in Audacity or any other WAV Editor.
    Quote Quote  
  12. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by manono View Post
    Originally Posted by TeNSoR View Post
    but how to sync the audio with the video now? Thanks in advance, Jagabo
    It shouldn't need synching after being stretched correctly, just muxing. I do this by first using BeSweet with the 25->23.976fps preset to create a WAV file. Afterwards I work with the audio in Audacity before reencoding to AC3. An easier and more direct way is to use eac3to to create a properly stretched AC3 file (it'll be 5.1, like the original, though) using the 25->23.976 (or PAL to film, I forget) setting. But all those useless DD5.1 Indian AC3 files I reencode to DD 2.0@224 AC3.

    At the most, after doing the stretching you might need to find and set a slight delay. I mux the audio and video when authoring with Muxman.

    And there are other ways to do the stretching. You can, for example, do it in Audacity or any other WAV Editor.
    Okay, Tom, I will do it as you mentioned, Thanks again!
    Quote Quote  
  13. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    manono, I converted my AC3 audio file with BeSweet into a Wave file (larger than one giga) "25->23.976"
    I opened it in audacity, then I exported it as "AC3". Is there are any other steps before before reencode it into AC3? Thanks for your patience!
    Quote Quote  
  14. Originally Posted by TeNSoR View Post
    manono, I converted my AC3 audio file with BeSweet into a Wave file (larger than one giga) "25->23.976"
    I opened it in audacity, then I exported it as "AC3".
    You exported from Audacity as AC3? Unless you actually did something to the audio, there's no need to use Audacity at all. With my old film audio files I try and do some restoration and remove the noise, clicks and pops and the like. Then I export as a WAV file and then I reencode to AC3. If you have ffmpeg configured properly, then you can export from Audacity as AC3, I believe. I've never done that myself but always export as WAV and use aomething else to convert to AC3.

    Anyway, once you have an AC3 file, mux it with your video and hope for the best. Or, if the audio and video have the same names you should be able to play the audio along with the video to test the audio synch. If there's a delay, it should be constant, you should be able to figure it out, and you should then be able to remove it with DelayCut before muxing (or authoring) again.
    Quote Quote  
  15. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by manono View Post
    Originally Posted by TeNSoR View Post
    manono, I converted my AC3 audio file with BeSweet into a Wave file (larger than one giga) "25->23.976"
    I opened it in audacity, then I exported it as "AC3".
    You exported from Audacity as AC3? Unless you actually did something to the audio, there's no need to use Audacity at all. With my old film audio files I try and do some restoration and remove the noise, clicks and pops and the like. Then I export as a WAV file and then I reencode to AC3. If you have ffmpeg configured properly, then you can export from Audacity as AC3, I believe. I've never done that myself but always export as WAV and use aomething else to convert to AC3.

    Anyway, once you have an AC3 file, mux it with your video and hope for the best. Or, if the audio and video have the same names you should be able to play the audio along with the video to test the audio synch. If there's a delay, it should be constant, you should be able to figure it out, and you should then be able to remove it with DelayCut before muxing (or authoring) again.
    Thanks again for your reply, my friend Yes, I got AC3 file from audacity and I muxed it with the video and everything went fine
    Just some background noise but not noticible, Cheers!
    Quote Quote  



Similar Threads

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