VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Hi. After getting to grips with MeGUI with help from hello_hello, jagabo, manono and others, I'm moving on to my second task. With this DVD, 'interlaced' is obvious but I don't know exactly how to decide if unblending is needed. What do you think? Thank you for your time.
    Image Attached Files
    Quote Quote  
  2. It's "out of phase" PAL. Just use TFM().
    Quote Quote  
  3. Hi jagabo. How do you tell it's "out of phase" (I'm keen to learn more of this 'judge with your eyes' stuff)?

    I had to google TFM and got this:
    "TFM is a field matching filter that recovers the original progressive frames from a telecined stream. It does not decimate the resulting duplicate frames though, so to achieve an ivtc you must follow TFM with a decimation filter such as TDecimate(), which is also included in the tivtc.dll."

    I'll have to google 'telecined' but, meantime, do I also need TDecimate (which you didn't mention)? Many thanks.
    Quote Quote  
  4. Originally Posted by pooksahib View Post
    Hi jagabo. How do you tell it's "out of phase" (I'm keen to learn more of this 'judge with your eyes' stuff)?
    First MediaInfo showed that the video was encoded interlaced. I then built an index file with DgIndex and made an AviSynth script:

    Code:
    Mpeg2Source("sample.d2v")
    Opening that script in VirtualDub showed obvious comb artifacts during motion. I then added the Bob() filter to split the frames into fields:

    Code:
    Mpeg2Source("sample.d2v")
    Bob()
    Stepping through field by field I could see that every pair of fields was identical (aside from bob and encoding artifacts) and there were no blended fields. That indicated the the video started out as 25p but pairs of fields from different source frames were joined together in the MPG file looking like interlaced frames. Since the MPG file is TFF that means a BFF analog stream was captured TFF.

    So progressive frames 1, 2, 3, 4, 5... were broadcast (or recorded on studio video tape) as:

    Code:
    1B 1T 2B 2T 3B 3T 4B 4T 5B 5T...
    but were paired together when captured as:

    Code:
    1B) (1T2B) (2T3B) (3T4B) (4T5B) (5T...
    TFM() will re-pair them into the original progressive frames:

    Code:
    (1B1T) (2B2T) (3B3T)  (4B4T) (5B5T)...
    You're your back to the original 25p frames (with a little bit of artifacting and blurring from being encoded interlaced).
    Quote Quote  
  5. Thanks, jagabo. I'll have to go through this a step at a time.

    Is an index file a d2v file? I can generate one of these with MeGUI but can't work out how to do it with DGIndex...

    I opened Notepad, typed “Mpeg2Source("sample.d2v")” and called it myscript.avs. Is that effectively the same script as you created?

    I have VirtualDub 1.10.4 (portable) with the mpeg2 plugin. It plays mpg and vob no problem. However, the command File/Run Script gives me a blank box until I change 'All scripts' to 'All Files'. Then, when I click myscript, I get the error shown attached. Any idea why?

    If I load the mpg itself into vdub and click Video/Filters – Add, my choices are bob doubler, bob blur and field bob. Nothing as plain and simple as 'bob'. The bobs I mentioned are 'internal' – is one of them the right one or am I in need of an 'external' filter?

    Many thanks.
    Image Attached Thumbnails Click image for larger version

Name:	vdub error.jpg
Views:	203
Size:	17.6 KB
ID:	36570  

    Quote Quote  
  6. Originally Posted by pooksahib View Post
    Is an index file a d2v file?
    Yes.
    I can generate one of these with MeGUI but can't work out how to do it with DGIndex...
    Open all the VOBs and go File->Save Project. That will give you the D2V and the audio.
    I opened Notepad, typed “Mpeg2Source("sample.d2v")” and called it myscript.avs. Is that effectively the same script as you created?
    That might work. You already have the DGDecode.dll, right? Open the script in VDub and if there's an error message, give us the complete script and what the error message says. Make sure you open your AVS scripts with File->Open Video File.
    If I load the mpg itself into vdub and click Video/Filters – Add, my choices are bob doubler, bob blur and field bob.
    Don't open the MPG directly and don't use the VDub filters. Do your filtering in your AviSynth script as jagabo showed you:

    Mpeg2Source("sample.d2v")
    Bob()


    That should give you a double-rate video (59.94fps). You can confirm that (once you get it to open) in File->File Information.

    Bob is about the worst bobbing filter. Just use it to examine your bobbed fields. Don't do any encoding with it.
    Quote Quote  
  7. The "MeGUI" method for following those instructions would be to open and index the DVD as usual (MeGUI uses DGIndex for vob files). Then you can do exactly as jagabo suggested, only you're using the script creator's preview instead of opening the script with VirtualDub to preview it. Or if you've already created the d2v file, use it as the Video Input for MeGUI's script creator to preview it. No need to create a script for previewing as such.

    You can enable the de-interlacing while selecting "Yadif with Bob" as the de-interlacing method instead of adding Bob() to the script yourself. Or use Bob(). Either way, if every frame appears to be repeated it's probably not interlaced. You must select Yadif with Bob though, not just Yadif.

    To add the field matching, go to the deinterlacing section in the script creator, enable it, select "film" as the source type and "TIVTC" as the de-interlacing method. That's actually applying the field matching and frame decimation normally used to reverse NTSC pulldown. MeGUI will add something like this to the script.

    LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TIVTC.dll")
    tfm(order=-1).tdecimate()

    In your case you just want the field matching, so delete the part in blue and click the script creator's "Preview AVS script" button to refresh the preview.

    LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TIVTC.dll")
    tfm(order=-1)

    The script creator itself doesn't have an option for only applying field matching, but the method above at least gets MeGUI to load TIVTC.dll for you. After applying field matching, check several parts of the video to make sure there's not still sections that appear interlaced. There's no guarantee it's all the same. Some might be interlaced and some progressive, although it's generally one or the other. And before saving the script don't forget to check MeGUI didn't add tdecimate() back again if you changed something in the script creator.

    By the way, you can copy often used plugins from MeGUI's "avisynth_plugin" folder to the Avisynth plugins folder so you don't have to manually load them in a script. If you copied TIVTC.dll to the Avisynth plugins folder you could add field matching to a script yourself like this:

    tfm()

    Yadif is probably the other plugin in MeGUI's folder you'd use regularity enough to want it auto-loading. Only it won't. Remember when I mentioned it was a C plugin in another thread and Avisynth won't auto-load them?
    Copy the line below, paste it into Notepad, modify it according to where Yadif is located on your PC, save it as a text file, change the extension from txt to avsi and put it in the Avisynth plugins folder. That'll auto-load Yadif for you.

    Load_Stdcall_Plugin("C:\Program Files\MeGUI\tools\avisynth_plugin\yadif.dll")

    Then you should be able to add Yadif to a script yourself like this:

    Yadif()

    Or Yadif with Bob like this:

    Yadif(mode=1)

    PS. If the video's old and could do with a cleanup, give this a spin. QTGMC again. In progressive mode this time....

    LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TIVTC.dll")
    tfm()
    QTGMC(InputType=1, Preset="Medium", EzDenoise=1.5)
    gradfun3()

    Adjust EzDenoise up or down as required, or even remove it if there's not a lot of noise. For gradfun3() you'll need the Dither Package installed. I included a link with the instructions for installing it with Srestore and QTGMC in the other thread, so you might have it already.
    Last edited by hello_hello; 15th Apr 2016 at 05:19.
    Quote Quote  
  8. I meant to ask, have you considered enabling cropping yet? For your sample, if you want to keep it 4:3 it does require cropping a little picture top and bottom, and a couple more pixels here and there for mod4, but I prefer nice clean edges and 4:3 myself.

    # Set DAR in encoder to 4 : 3. The following line is for automatic signalling
    global MeGUI_darx = 4
    global MeGUI_dary = 3
    LoadPlugin("C:\Program Files\MeGUI\tools\dgindex\DGDecode.dll")
    DGDecode_mpeg2source("D:\samples.d2v")
    tfm()
    QTGMC(InputType=1, Preset="Medium", EzDenoise=1.5)
    crop(14, 8, -22, -8)
    gradfun3()
    Image Attached Files
    Quote Quote  
  9. Originally Posted by pooksahib View Post
    I have VirtualDub 1.10.4 (portable) with the mpeg2 plugin. It plays mpg and vob no problem. However, the command File/Run Script gives me a blank box until I change 'All scripts' to 'All Files'. Then, when I click myscript, I get the error shown attached. Any idea why?
    File -> Run Script is for VirtualDub scripts, not AviSynth scripts. An AviSynth script is a video file to VirtualDub. So use File -> Open Video File to open AviSynth scripts.
    Quote Quote  
  10. Thanks guys, excellent info as usual.
    Originally Posted by manono View Post
    I opened Notepad, typed “Mpeg2Source("sample.d2v")” and called it myscript.avs. Is that effectively the same script as you created?
    That might work. You already have the DGDecode.dll, right? Open the script in VDub and if there's an error message, give us the complete script and what the error message says.
    Presumably you mean I should have DGDecode.dll within Vdub? I didn't but now I do. Also, after something I read, I've replaced 64bit Vdub with 32bit. After twigging that I had to include a proper file path in the script, I can now open a d2v with Vdub.

    You say my Notepad method might work. Everything I've googled just says 'use a simple text document'. Is there some other/better way of creating a script?

    However, I think I'll be happier doing everything within one program and if MeGUI can do the work that jagabo did with Vdub then that's what I'll concentrate on.

    Originally Posted by hello_hello View Post
    You can enable the de-interlacing while selecting "Yadif with Bob" as the de-interlacing method instead of adding Bob() to the script yourself. Or use Bob().
    “Interlaced/Yadif with bob” works fine and each frame is indeed duplicated. With Bob() added to the script it's not so easy to say that each frame is duplicated as there's a subtle difference every click...

    Originally Posted by hello_hello View Post
    After applying field matching, check several parts of the video to make sure there's not still sections that appear interlaced.
    Sorry if this appears thick but you mean 'look for combing', yes?

    Originally Posted by hello_hello View Post
    I meant to ask, have you considered enabling cropping yet?
    I've decided I'm not that much of a control freak. Having different pic sizes on my PC screen (when flipping between PotPlayer's DAR and 4:3 options) was initially bugging me but it's how it plays on my TV that matters. My previous encode plays just fine and that was using Clever Anamorphic/resize to mod16 – no cropping.

    I'll give this second DVD an encode with TFM() and report back should I have queries. Thanks again to you all.
    Quote Quote  
  11. Another way to fix the out-of-phase PAL is to recombine manually:

    Code:
    WhateverSource()
    SeparateFields()
    Trim(1,0)
    Weave()
    But sometimes a source will flip between in-phase and out-of-phase sections. TFM() can adjust to that. This manual method will fix the out-of-phase sections but will convert all the in-phase sections to out-of-phase.
    Quote Quote  



Similar Threads

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