VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    Hi All

    I am having a go at using AVISynth and the HDR AGC filter to lighten some footage that is too dark. This has been a steep learning curve for me to get this far so I want to double check to make sure I'm on the right track (I was going to ask the filter author over at the doom forums but you have to be registered for 5 days before you can post - WTF??)

    Anywhoo

    This is the script I used
    Code:
    AVISource("G:\Video editing\capture\dv-cap.03-12-02_17-50.00.avi")
    ConvertToYV12(interlaced=true)
    hdragc(max_gain =3.0, min_gain=1.0, coef_sat=2.5)
    And this is my results


    Is there anything more I can do to perhaps smooth out the grainy look of the lightened footage?
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    You could try one of the denoising filters afterwards. I like both PeachSmoother and Convolution3D. Both are worth a look to see if they help. But keep it light or you will have a nice plastic feel to it.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    Thanks

    This helped clean it up a bit

    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Convolution3DYV12.dll") 
    AVISource("G:\Video editing\capture\dv-cap.03-12-02_17-50.00.avi")
    ConvertToYV12(interlaced=true)
    HDRAGC(coef_sat=2.5,max_gain =3.0,min_gain=1.0,corrector=1.5)
    SeparateFields()
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64, 10, 0) 
    evn=SelectEven.Convolution3D (0, 32, 128, 16, 64, 10, 0) 
    Interleave(evn,odd)
    Weave()
    DoubleWeave.SelectOdd()
    Quote Quote  
  4. HDRAGC need to be between separate fields/weave when applaying on interlaced material
    Quote Quote  
  5. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    What, like this?
    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Convolution3DYV12.dll")
    AVISource("G:\Video editing\capture\dv-cap.03-12-02_17-50.00.avi")
    ConvertToYV12(interlaced=true)
    SeparateFields()
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64, 10, 0)
    evn=SelectEven.Convolution3D (0, 32, 128, 16, 64, 10, 0)
    Interleave(evn,odd)
    HDRAGC(coef_sat=2.5,max_gain =3.0,min_gain=1.0,corrector=1.5)
    Weave()
    DoubleWeave.SelectOdd()
    Quote Quote  
  6. No, not like that.

    If you really want to do it right:

    LoadPlugin("C:\Path\To\LeakKernelDeint.dll")
    LoadPlugin("C:\Path\To\Convolution3D.dll")
    MPEG2Source("C\Path\To\Movie.d2v")
    ConvertToYV12(interlaced=true)
    LeakKernelBob(Order=1)#if TFF,Order=0 if BFF
    HDRAGC(coef_sat=2.5,max_gain =3.0,min_gain=1.0,corrector=1.5)
    Convolution3D (0, 32, 128, 16, 64, 10, 0)
    SeparateFields()
    SelectEvery(4,0,3)#if TFF, SelectEvery(4,1,2) if BFF
    Weave()

    And encode for TFF. Or, if it matters to you, you can make it for BFF by changing some things.
    Quote Quote  
  7. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    Sorry, what is TFF and BFF?
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Top Field First
    Bottom Field First

    Describes the field order of interlaced video. DV is Bottom (or Lower) Field First.
    Read my blog here.
    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    ahhhh ok

    So, as my video is a DV capture, it should look like this

    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LeakKernelDeint.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Convolution3D.dll")
    AVISource("G:\Video editing\capture\dv-cap.03-12-02_17-50.00.avi") 
    ConvertToYV12(interlaced=true)
    LeakKernelBob(Order=0)#if TFF,Order=0 if BFF
    HDRAGC(coef_sat=2.5,max_gain =3.0,min_gain=1.0,corrector=1.5)
    Convolution3D (0, 32, 128, 16, 64, 10, 0)
    SeparateFields()
    SelectEvery(4,1,2)#if TFF, SelectEvery(4,1,2) if BFF
    Weave()
    Quote Quote  
  10. That's the way I'd do it. I don't know the output format, so there's a chance you'll have to change the colorspace again. If it's for XviD or HCEnc, you're OK. The Doom9 guys might suggest adding in some AssumeTFFs, as AviSynth has a disconcerting habit of switching back to BFF when you least expect it, but I think you're OK with those filters. If you're not sure, add an Info() to the bottom of the script temporarily to check. Also, before encoding, open the script in VDubMod, find a place with movement , advance a frame at a time, and make sure it plays smoothly.

    And if SerbianBoss comes back, he prefers to encode for BFF, and might suggest a slight change.

    And I didn't notice that you had DV in the name. I didn't even notice it was an AVI. So my source line was incorrect. But between yourself and guns1inger you got it right.
    Quote Quote  
  11. Member
    Join Date
    May 2005
    Location
    australia
    Search Comp PM
    Cool. Thanks for all the help guys
    Quote Quote  
  12. I'll be back

    Maybe add AssumeBFF() before leakkernelbob and AssumeBFF() after Convolution 3d.

    For BFF material i am using SelectEvery(4,0,3)
    Quote Quote  



Similar Threads

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