VideoHelp Forum




+ Reply to Thread
Results 1 to 17 of 17
  1. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    hi everyone...i have a show that i've captured via my firewire from my digital stb to my computer. now when i load it in dvd2avi or dgdecode it says that it's 29.97/interlaced. so i converted it to dvd format using this script...

    LoadPlugin("C:\DVD Tools\AviSynth 2.5\plugins\DirectShowSource.dll")
    MPEG2Source("filename.d2v")
    LanczosResize(720,480)
    ConvertToYUY2()

    and loaded that script into CCE SP. then under advanced video i ticked upper field first/close all gops. and in quality i set it to quantizer=16, intra block=10, block scanning=alternate. i then set my number of passes, bitrate etc.

    now the problem is...i converted/authored/burned it and it looks "ok" on my tv, except when there's a scene change it looks kinda blurry/flashy for a second and i can seem to see the interlacing. is this normal or am i doing something wrong? the source file does not look like this...any help would be great...thanks very much.
    Quote Quote  
  2. Hi-

    There's quite a bit that's puzzling here. You should be using an up-to-date DGMPGDec package which contains the DGIndex to make the D2V project file, and the DGdecode.dll you'll need to decode the video. So, you script should read:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    MPEG2Source("C:\Path\To\Video.d2v")

    Read this (also included with DGMPGDec):

    http://neuron2.net/dgmpgdec/QuickStart.html

    Next, if the source is already 720x480, then you don't need the LanczosResize line. If it's not already 720x480 (why isn't it?), that's not how you resize interlaced video, and could perhaps be responsible for your problem.

    i ticked upper field first

    That will be correct if it's really TFF. Is it?

    If the video is interlaced, your last line should be:

    ConvertToYUY2(Interlaced=True)

    On what are you seeing interlacing, a standard CRT interlaced TV set, or some kind of an HDTV? And if it's a movie or something else shot on film, it can probably benefit from an IVTC. If you could upload a small piece of the source, a 5-10 second section with movement, that would help us to diagnose the problem, and give advice on how to treat it.
    Quote Quote  
  3. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    when i capture through firewire from my stb, the resolution is only 528x480...don't ask me why but other people report the same resolution when recording. also, i don't know how to check if it's top field first. so i guess i need to figure out the field order and also the proper way to resize to 720x480.

    thank you for your quick reply, btw.

    here is a sample...sorry, sendspace is the only place i could think to upload it to...
    http://www.sendspace.com/file/94ltbu
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    It's essentially progressive.
    I'd use this.
    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("sample.d2v")
    telecide(order=1)
    lanczosresize(720,480)
    converttoyuy2()
    (for telecide you need the decomb filter http://neuron2.net/decomb/decombnew.html )

    To determine field order use:
    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("sample.d2v")
    assumetff().separatefields()
    serve the script into VirtualDub and find an area with motion. Single step forward, if the motion always progresses it's tff. Substitute the above with assumebff, and double check.

    To correctly resize interlaced material:
    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("sample.d2v")
    separatefields()
    lanczosresize(720,240)
    weave()
    converttoyuy2(interlaced=true)
    Quote Quote  
  5. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    ok, so i used your methods (thank you very much btw) and found out that it was top field first. now in making my final script, should it look like this...

    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("dexter.d2v")
    telecide(order=1)
    separatefields()
    lanczosresize(720,240)
    weave()
    converttoyuy2(interlaced=true)

    i would like to resize it to 720x480, that is why i included everything you wrote. thanks again.
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    no.
    apologies i got it wrong

    use:

    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("dexter.d2v")
    separatefields()
    lanczosresize(720,240)
    weave()
    converttoyuy2(interlaced=true)

    And this would make it progressive.
    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("dexter.d2v")
    fielddeniterlace()
    lanczosresize(720,480)
    converttoyuy2()

    as a quick fix that is.

    to return to true progressive you'd use this:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("sample.d2v")
    telecide(order=1)
    selectrangeevery(5,4)
    lanczosresize(720,480)
    converttoyuy2()

    as it's pulldowned progressive that ended up being converted to interlaced 29.97.


    {
    for the sample though as frame 0 doesn't start the 3/2 sequence to see the result I used:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("sample.d2v")
    telecide(order=1)
    trim(3,312)
    selectrangeevery(5,4)

    I assume the video would start the 3/2 sequence at frame 0 though.
    i'm not experienced enough to know.
    i suck at this
    }
    Quote Quote  
  7. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    Originally Posted by 45tripp
    And this would make it progressive.
    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll")
    mpeg2Source("dexter.d2v")
    fielddeniterlace()
    lanczosresize(720,240)
    converttoyuy2()
    shouldn't that be:
    lanczosresize(720,480)

    because i checked it with media player and it was squished to 720x240
    Quote Quote  
  8. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    yeah...
    copy paste, and tired eyes
    I think I've got it now.

    but I'm sure someone else will better help you soon
    Quote Quote  
  9. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I'll throw one into the mix Requires TIVTC.dll

    ###Start
    function FieldMatch(clip c) {
    global pp = c.DuplicateFrame(0)
    global cc = c
    global nn = c.DeleteFrame(0)
    p2 = pp.SeparateFields()
    c2 = cc.SeparateFields()
    n2 = nn.SeparateFields()
    global pc = Interleave(p2.SelectEven(), c2.SelectOdd()).Weave()
    global cp = Interleave(c2.SelectEven(), p2.SelectOdd()).Weave()
    global cn = Interleave(c2.SelectEven(), n2.SelectOdd()).Weave()
    global nc = Interleave(n2.SelectEven(), c2.SelectOdd()).Weave()
    return ScriptClip(cc, \
    "!cc.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? cc : " + \
    "!nn.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? nn : " + \
    "!cn.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? cn : " + \
    "!nc.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? nc : " + \
    "!pp.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? pp : " + \
    "!cp.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? cp : " + \
    "!pc.IsCombedTIVTC(cthresh=12, MI=80, blockx=16, blocky=32) ? pc : cc")
    }

    Mpeg2Source("your.d2v",cpu=4) #source needs a bit of deblocking
    ConverttoYV12() #or not if you can get away with it.

    Fieldmatch()
    Tfm()
    Tdecimate()
    crop(0,56,-0,-64)
    # AddBorders()

    ###End

    Resulting in:

    clip.avi
    Quote Quote  
  10. A small note on this script:

    Code:
    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll") 
    mpeg2Source("dexter.d2v") 
    separatefields() 
    lanczosresize(720,240) 
    weave() 
    converttoyuy2(interlaced=true)
    It could be reduced to:

    Code:
    LoadPlugin("C:\Program Files\DVD Tools\AviSynth 2.5\plugins\dgdecode.dll") 
    mpeg2Source("dexter.d2v") 
    converttoyuy2(interlaced=true) 
    lanczosresize(720,480)
    Since LanczosResize() won't be changing the vertical size it won't mingle the two fields.
    Quote Quote  
  11. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    thanks for all the help guys...i'm gonna give a couple a try and i'll let you know the results. cheers!
    Quote Quote  
  12. What's the matter with a simple:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    LoadPlugin("C:\Path\To\TIVTC.dll")
    MPEG2Source("C:\Path\To\Sample.d2v")
    TFM().TDecimate()
    LanczosResize(720,480)
    ConvertToYUY2()

    or, if using Decomb:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    LoadPlugin("C:\Path\To\Decomb.dll")#use whatever version name you have
    MPEG2Source("C:\Path\To\Sample.d2v")
    AssumeTFF()#if that's what it is
    Telecide(Guide=1).Decimate()
    LanczosResize(720,480)
    ConvertToYUY2()

    With newer versions of Decomb, you no longer set the field order within Telecide, but it should be set with an AssumeTFF/BFF. A Telecide without Decimate keeps it at 29.97fps, with a duplicate frame in every 5 frames. Under no circumstances should it just be deinterlaced.
    Quote Quote  
  13. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    Originally Posted by manono
    What's the matter with a simple:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    LoadPlugin("C:\Path\To\TIVTC.dll")
    MPEG2Source("C:\Path\To\Sample.d2v")
    TFM().TDecimate()
    LanczosResize(720,480)
    ConvertToYUY2()

    or, if using Decomb:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    LoadPlugin("C:\Path\To\Decomb.dll")#use whatever version name you have
    MPEG2Source("C:\Path\To\Sample.d2v")
    AssumeTFF()#if that's what it is
    Telecide(Guide=1).Decimate()
    LanczosResize(720,480)
    ConvertToYUY2()

    With newer versions of Decomb, you no longer set the field order within Telecide, but it should be set with an AssumeTFF/BFF. A Telecide without Decimate keeps it at 29.97fps, with a duplicate frame in every 5 frames. Under no circumstances should it just be deinterlaced.
    I think I'm gonna give your 1st one a try and see what happens...any idea where i can find the TIVTC.dll plugin? Thanks.

    nevermind...found the latest version.
    Quote Quote  
  14. Good. Remember though, you'll be encoding for 4:3 23.976fps progressive. Before authoring you'll have to have applied Pulldown. You can do this in CCE while encoding, or afterwards using something like DGPulldown. Applying 3:2 (or 2:3) Pulldown has your 23.976fps video output 29.97fps as required for NTSC DVDs. Make sure and test out your script in VDub(Mod) before sending to CCE. Good luck.
    Quote Quote  
  15. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    thanks for the info, the one thing i do know about is pulldown and stuff! lol

    just one more question...can/should this method be used for all my captures off of tv that are in 4:3 format? and for 16:9 do I just add a crop to the script or are there other steps involved?
    Quote Quote  
  16. thanks for the info, the one thing i do know about is pulldown and stuff! lol

    Good, but a lot of people don't, and then wonder why they can't author their 23.976fps video.

    can/should this method be used for all my captures off of tv that are in 4:3 format?

    Only the ones sourced from film. Open that sample in VDubMod and advance a frame at a time. Notice how you have 3 progressive frames followed by 2 interlaced frames in every 5 frame sequence. 3-2-3-2. That's the sign of it having been shot on film and telecined. An IVTC removes the telecine and returns it to its original progressive 23.976fps. You can do this for most movies and a lot of TV shows. If every frame is interlaced, you can't IVTC. Leave it alone and encode for interlaced 29.97fps. You might check around edits, like at the commercials, and make sure that you don't have problems like stray interlacing or some sort of jerkiness. You shouldn't, though.

    and for 16:9 do I just add a crop to the script or are there other steps involved?

    Crop and resize. If interlaced, you have to be careful. I do it like this:

    LeakKernelBob(Order=1)#if TFF
    #Crop, resize and filter here
    SeparateFields()
    SelectEvery(4,0,3)#if TFF
    Weave()
    ConvertToYUY2(Interlaced=True)

    And encode for TFF. You'll have to Load the LeakKernelDeint filter.
    Quote Quote  
  17. Member
    Join Date
    Dec 2006
    Location
    Toronto, Canada
    Search Comp PM
    awesome...thank you very much for all your help....everyone!!!
    Quote Quote  



Similar Threads

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