VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 79
Thread
  1. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Hi friends, I need a best possible code to improve this garbage, any suggestions are welcome, target is 25fps PAL 704x572

    Sample in Anex

    Video full info:

    Format : MPEG-PS
    File size : 1.05 GiB
    Duration : 1h 28mn
    Overall bit rate mode : Variable
    Overall bit rate : 1 702 Kbps
    Writing library : (c) 1998-2012 Womble Multimedia, Inc. / MPEG Video Wizard DVD 5.0.1.100 (03/2011) / Dec 6 2012

    Video
    ID : 224 (0xE0)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, BVOP : Yes
    Format settings, Matrix : Custom
    Format settings, GOP : M=3, N=12
    Duration : 1h 28mn
    Bit rate mode : Variable
    Bit rate : 1 476 Kbps
    Maximum bit rate : 9 396 Kbps
    Width : 352 pixels
    Height : 576 pixels
    Display aspect ratio : 4:3
    Frame rate : 25.000 fps
    Standard : PAL
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.291
    Time code of first frame : 00:00:00:00
    Time code source : Group of pictures header
    Stream size : 934 MiB (87%)
    Writing library : (c) 1998-2012 Womble Multimedia, Inc. / MPEG Video Wizard DVD 5.0.1.100 (03/2011) / Dec 6 2012

    Audio
    ID : 189 (0xBD)-128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Muxing mode : DVD-Video
    Duration : 1h 28mn
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel count : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Delay relative to video : -80ms
    Stream size : 122 MiB (11%)
    Image Attached Files
    Quote Quote  
  2. It's never going to look great. I think this is overdone -- but do you consider it an improvement? Heavy filtering has reduced the blocking but has also removed a lot of detail in the dirt, grass, etc.
    Image Attached Files
    Quote Quote  
  3. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    It's never going to look great. I think this is overdone -- but do you consider it an improvement? Heavy filtering has reduced the blocking but has also removed a lot of detail in the dirt, grass, etc.
    Oh...my master! How are you doing?

    Yes I know it will never be really good, but gave a considerably improved, which code you used?

    I tried this code (by you), and get more detail:

    QTGMC(preset="fast")
    McTemporalDenoise(settings="low")
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    Sharpen(0.3, 0.0)
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()


    Could you tell me how you getting 50fps MKV?

    Another question: How Do To Work Another,source video is in MP4?
    Last edited by Caiosouza; 6th Nov 2016 at 19:59.
    Quote Quote  
  4. Originally Posted by Caiosouza View Post
    Yes I know it will never be really good, but gave a considerably improved, which code you used?
    Code:
    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="xxxxxx", Info=3)
    SetMtMode(2)
    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=400, SAD2=300, sigma=16)
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=768, fheight=576)
    aWarpSharp(depth=5)
    The strong deblocking by Mpeg2Source() loses a lot of detail. The strong TemporalDegrain() too. Instead of Mpeg2Source deblocking you can try something like deblock_qed() where you can control the deblocking strength -- but you have to use it after deinterlacing. Obviously, you can turn down the filtering in TemporalDegrain. I rarely use more than SAD1=100, SAD2=75, sigma=4 myself.

    Originally Posted by Caiosouza View Post
    I tried this code,and get more detail:

    QTGMC(preset="fast")
    McTemporalDenoise(settings="low")
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    Sharpen(0.3, 0.0)
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()
    And more noise too. It's a matter of picking a balance between noise reduction and loss of detail to meet your own taste.

    Originally Posted by Caiosouza View Post
    Could you tell me how you getting 50fps MKV?
    Leave out: AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave(). You won't be able to use 50p on DVD though -- if that's your goal.
    Quote Quote  
  5. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Caiosouza View Post
    Yes I know it will never be really good, but gave a considerably improved, which code you used?
    Code:
    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="xxxxxx", Info=3)
    SetMtMode(2)
    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=400, SAD2=300, sigma=16)
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=768, fheight=576)
    aWarpSharp(depth=5)
    The strong deblocking by Mpeg2Source() loses a lot of detail. The strong TemporalDegrain() too. Instead of Mpeg2Source deblocking you can try something like deblock_qed() where you can control the deblocking strength -- but you have to use it after deinterlacing. Obviously, you can turn down the filtering in TemporalDegrain. I rarely use more than SAD1=100, SAD2=75, sigma=4 myself.

    Originally Posted by Caiosouza View Post
    I tried this code,and get more detail:

    QTGMC(preset="fast")
    McTemporalDenoise(settings="low")
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    Sharpen(0.3, 0.0)
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()
    And more noise too. It's a matter of picking a balance between noise reduction and loss of detail to meet your own taste.

    Originally Posted by Caiosouza View Post
    Could you tell me how you getting 50fps MKV?
    Leave out: AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave(). You won't be able to use 50p on DVD though -- if that's your goal.
    Interesting...what Software you use to convert avi source to MKV?

    Please spalin this: CPU2="xxxxxx" (my code is CPU=6)

    I would like a medium term, more detail and middle sharp,something between these two codes

    What do you think this:

    QTGMC(preset="fast")
    Santiag()
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    Sharpen(0.3, 0.0)
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()
    TemporalDegrain(SAD1=200, SAD2=150, sigma=8)


    Santiag() is ? ? ?

    Thank you
    Last edited by Caiosouza; 6th Nov 2016 at 21:46.
    Quote Quote  
  6. Originally Posted by Caiosouza View Post
    Interesting...what Software you use to convert avi source to MKV?
    I fed the AVS script directly the the x264 CLI encoder.

    Code:
    x264.exe --preset=slow --crf=19 --sar=1:1 --output %1.mkv %1
    Originally Posted by Caiosouza View Post
    I would like a medium term, more detail and middle sharp,something between these two codes
    Maybe something like:

    Code:
    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="ooooxx", Info=3)  # deringing only
    
    SeparateFields()
    PointResize(width,height*2)
    deblock_qed()
    PointResize(width, height/2)
    Weave()
    
    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=768, fheight=576)
    aWarpSharp(depth=5)
    Santiag is an antialiasing filter. It will clean up some ragged edges.
    Quote Quote  
  7. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Caiosouza View Post
    Interesting...what Software you use to convert avi source to MKV?
    I fed the AVS script directly the the x264 CLI encoder.

    Code:
    x264.exe --preset=slow --crf=19 --sar=1:1 --output %1.mkv %1
    Originally Posted by Caiosouza View Post
    I would like a medium term, more detail and middle sharp,something between these two codes
    Maybe something like:

    Code:
    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="ooooxx", Info=3)  # deringing only
    
    SeparateFields()
    PointResize(width,height*2)
    deblock_qed()
    PointResize(width, height/2)
    Weave()
    
    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=768, fheight=576)
    aWarpSharp(depth=5)
    Santiag is an antialiasing filter. It will clean up some ragged edges.
    Nice! I'll try that!

    I still do not understand ("deringing only") this: , CPU2="ooooxx", Info=3) and CPU2="xxxxxx", Info=3)
    SetMtMode(2)


    And this: why fwidth=768 and not 704? The video source is 352...

    I have other video in MP4 which also need improvement, how to work the codes, mux demux etc ...?

    Many, many thanks!!!
    Last edited by Caiosouza; 7th Nov 2016 at 07:54.
    Quote Quote  
  8. Originally Posted by Caiosouza View Post
    I still do not understand ("deringing only") this: , CPU2="ooooxx", Info=3) and CPU2="xxxxxx", Info=3)
    SetMtMode(2)
    Mpeg2Source() has a nice filter for reducing DCT ringing artifacts. I'm still using that in the script. See the Mpeg2Source() docs. I was using a multithreaded build of AviSynth -- SetMtMode(2) was to control that, I forgot to remove the line before posting.

    Originally Posted by Caiosouza View Post
    And this: why fwidth=768 and not 704? The video source is 352...
    Because that's the correct square pixel size for a 4:3 DAR video with a height of 576 lines. If you are going to make a DVD you will need the original 352 or a 704 pixel wide frame, and you'll need to decimate to 25p or interlace to 25i (as in your original script).

    Originally Posted by Caiosouza View Post
    I have other video in MP4 which also need improvement, how to work the codes, mux demux etc ...?
    Just use a different source filter -- LSMASHVideoSource(), LWLibavVideoSource(), ffVideoSource(), etc.
    Quote Quote  
  9. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Because that's the correct square pixel size for a 4:3 DAR video with a height of 576 lines. If you are going to make a DVD you will need the original 352 or a 704 pixel wide frame, and you'll need to decimate to 25p or interlace to 25i (as in your original script).
    I going to DVD 704x576

    Proceeds this?

    Code:

    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="ooooxx", Info=3)

    SeparateFields()
    PointResize(width,height*2)
    deblock_qed()
    PointResize(width, height/2)
    Weave()

    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)

    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    aWarpSharp(depth=5)




    Nice!!!
    Quote Quote  
  10. DVD doesn't support 50p. You'll need to go back to 25i with your original

    Code:
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
    at the end of the script. Then encode interlaced MPEG 2.
    Quote Quote  
  11. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    DVD doesn't support 50p. You'll need to go back to 25i with your original

    Code:
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
    at the end of the script. Then encode interlaced MPEG 2.
    Sorry I forgot this line, huhaha

    Code:

    Mpeg2Source("1993 MX 250 Sample.d2v", CPU2="ooooxx", Info=3)

    SeparateFields()
    PointResize(width,height*2)
    deblock_qed()
    PointResize(width, height/2)
    Weave()

    QTGMC(preset="fast")
    Santiag()
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)

    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    aWarpSharp(depth=5)

    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()


    A get error in the filters Santiag and TemporalDegrain...where I download these?
    Quote Quote  
  12. http://avisynth.nl/index.php/Santiag
    http://avisynth.nl/index.php/Temporal_Degrain

    And, of course, you don't have to use exactly the settings I used. I'm just giving you some options.
    Quote Quote  
  13. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    http://avisynth.nl/index.php/Santiag
    http://avisynth.nl/index.php/Temporal_Degrain

    And, of course, you don't have to use exactly the settings I used. I'm just giving you some options.
    I downloaded required plugins and getting lots of error in Santiag (no named function) and Nnedi3, i tried avisynth 2.6, but a return to 2.58 because this run fine for me, any similar filter code to replace Santiag and TemporalDegrain to 2.58?

    Thank a ton!
    Last edited by Caiosouza; 7th Nov 2016 at 11:28.
    Quote Quote  
  14. Both of those filters work in AviSynth 2.58 and 2.6. Both are AVS scripts. Did you import them into your script?

    Code:
    import("C:\Program Files (x86)\AviSynth\plugins\TemporalDegrain.avs") 
    import("C:\Program Files (x86)\AviSynth\plugins\Santiag.avs")
    Be sure to change the paths if they are in different locations on your computer.
    Quote Quote  
  15. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Both of those filters work in AviSynth 2.58 and 2.6. Both are AVS scripts. Did you import them into your script?

    Code:
    import("C:\Program Files (x86)\AviSynth\plugins\TemporalDegrain.avs") 
    import("C:\Program Files (x86)\AviSynth\plugins\Santiag.avs")
    Be sure to change the paths if they are in different locations on your computer.
    Would you mind do upload .avs scripts?

    I've been analyzing the samples (My initial and You)and you get better results,only only need not be so aggressive to detail, the latter I think it will be good. I need run this filters, but however I am still unable now
    Last edited by Caiosouza; 7th Nov 2016 at 11:35.
    Quote Quote  
  16. I already gave you links to those AVS scripts. And note the other filters that they require. I think you already have most of them because you've been using MCTemporalDenoise which has many of the same requirements. But you'll probably have to track down a few more.
    Quote Quote  
  17. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    I already gave you links to those AVS scripts. And note the other filters that they require. I think you already have most of them because you've been using MCTemporalDenoise which has many of the same requirements. But you'll probably have to track down a few more.
    Yes i think too, in 2.58 the error is " no function named NNEDI3" ...in 2.6 I recieve: " no function named TemporalDegrain and Santiag"

    Many hours...and very difficult to find a solution...
    Image Attached Files
    Last edited by Caiosouza; 7th Nov 2016 at 13:00.
    Quote Quote  
  18. That's the same Santiag I have here. If you look at the link I gave it lists nnedi3 as one of it's requirements:

    http://avisynth.nl/index.php/Santiag#Required_Plugins

    So you have to download the nnedi3 package and put nnedi3.dll in AviSynth's plugins folder (where it will autoload) or put it somewhere else on your computer and import it manually within your script:

    Code:
    LoadPlugin("C:\Path\To\nnedi3.dll")
    TemporalDegrain is the same one I'm using too. Again, the link I gave indicates what other plugins you need:

    http://avisynth.nl/index.php/Temporal_Degrain#Required_Plugins

    Download the ones you don't already have and put them in AviSynth's plugins folder or import them manually in your script.
    Quote Quote  
  19. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    That's the same Santiag I have here. If you look at the link I gave it lists nnedi3 as one of it's requirements:

    http://avisynth.nl/index.php/Santiag#Required_Plugins

    So you have to download the nnedi3 package and put nnedi3.dll in AviSynth's plugins folder (where it will autoload) or put it somewhere else on your computer and import it manually within your script:

    Code:
    LoadPlugin("C:\Path\To\nnedi3.dll")
    TemporalDegrain is the same one I'm using too. Again, the link I gave indicates what other plugins you need:

    http://avisynth.nl/index.php/Temporal_Degrain#Required_Plugins

    Download the ones you don't already have and put them in AviSynth's plugins folder or import them manually in your script.
    I do it, but not...damn nnedi3...
    Image Attached Thumbnails Click image for larger version

Name:	Error.jpg
Views:	235
Size:	92.5 KB
ID:	39327  

    Image Attached Files
    Last edited by Caiosouza; 7th Nov 2016 at 15:45.
    Quote Quote  
  20. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    In another case which could improve in this video? This is in MP4 , how it works on avisynth and virtual dub?

    Jagabo what about creating a sticky containing a pack with the main plugins and scripts and other necessary components used by you,all in one place?
    Image Attached Files
    Last edited by Caiosouza; 7th Nov 2016 at 17:01.
    Quote Quote  
  21. Try this (this bit of code saved my time quite a few times ). I've adpated it a little (with ccd deblocking interlaced footage etc..). it may require more tweaking for fast motion... not sure

    MPEG2Source("1993 MX 250 Sample.d2v", cpu=0, info=3)

    #STEP 1 # Deblocking interlaced source (Didée's code)
    par=getparity()
    SeparateFields().PointResize(width,height)
    Deblock_QED(24,28,uv=3)
    AssumeFrameBased()
    SeparateFields()
    Merge(SelectEven(),SelectOdd())
    par ? AssumeTFF() : AssumeBFF()
    Weave()
    #STEP 2 ## Color denoising / desaturation (Light)
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    #### CCD COLOR DENOISING :
    LoadVirtualDubPlugin("C:\Camcorder_Color_Denoise_s se2.vdf", "CCD", 1)
    CCD(9,1) # 0 to 100, default 30
    weave()
    converttoyv12(matrix="Rec601",interlaced=true)

    #STEP 3 # Denoising with RemovespotsMc + dfttest
    c=last
    #even fields
    # Motion compensation on frames -2...+2
    even = c.SeparateFields().SelectEven()
    super_even=even.MSuper()
    vf2 = super_even.MAnalyse (isb=false, delta=2, overlap=4)
    vf1 = super_even.MAnalyse (isb=false, delta=1, overlap=4)
    vb1 = super_even.MAnalyse (isb=true, delta=1, overlap=4)
    vb2 = super_even.MAnalyse (isb=true, delta=2, overlap=4)
    cf2 = MCompensate (even, super_even, vf2, thSAD=400)
    cf1 = MCompensate (even, super_even, vf1, thSAD=400)
    cb1 = MCompensate (even, super_even, vb1, thSAD=400)
    cb2 = MCompensate (even, super_even, vb2, thSAD=400)
    # dfttest on motion-compensated clip
    Interleave (cf2, cf1, even, cb1, cb2)
    SetMTMode(2)
    RemoveSpotsMC()
    SetMTMode(4)
    dfttest (sigma=4, sigma2=4, tbsize=3, lsb=false)
    SelectEvery (5, 2)
    # Gradient smoothing
    presmooth = last
    #SmoothGrad (radius=20, thr=0.15)
    #SmoothGrad (radius=12, thr=0.25, ref=presmooth)
    # Back to 8 bits, ordered dithering
    #DitherPost () #
    filtered_even=last
    #odd fields
    # Motion compensation on frames -2...+2
    odd = c.SeparateFields().SelectOdd()
    super_odd=odd.MSuper()
    vf2 = super_odd.MAnalyse (isb=false, delta=2, overlap=4)
    vf1 = super_odd.MAnalyse (isb=false, delta=1, overlap=4)
    vb1 = super_odd.MAnalyse (isb=true, delta=1, overlap=4)
    vb2 = super_odd.MAnalyse (isb=true, delta=2, overlap=4)
    cf2 = MCompensate (odd, super_odd, vf2, thSAD=400)
    cf1 = MCompensate (odd, super_odd, vf1, thSAD=400)
    cb1 = MCompensate (odd, super_odd, vb1, thSAD=400)
    cb2 = MCompensate (odd, super_odd, vb2, thSAD=400)
    # dfttest on motion-compensated clip
    Interleave (cf2, cf1, odd, cb1, cb2)
    SetMTMode(2)
    RemoveSpotsMC()
    SetMTMode(4)
    dfttest (sigma=4, sigma2=4, tbsize=3, lsb=false)

    # Gradient smoothing
    presmooth = last
    #SmoothGrad (radius=20, thr=0.15) #
    #SmoothGrad
    # Back to 8 bits, ordered dithering
    #DitherPost ()#
    filtered_odd=last
    Interleave(filtered_even, filtered_odd)
    weave()
    #STEP 4 # chroma bleeding (May need more tweaking)
    mergechroma(aWarpSharp(depth=10, thresh=0.75, blurlevel=3, cm=1))#
    #STEP 5 ## Upsizing
    spline36resize(720,576)
    Last edited by themaster1; 7th Nov 2016 at 17:35.
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  22. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by themaster1 View Post
    Try this (this bit of code saved my time quite a few times ). I've adpated it a little (with ccd deblocking interlaced footage etc..). it may require more tweaking for fast motion... not sure

    MPEG2Source("1993 MX 250 Sample.d2v", cpu=0, info=3)

    #STEP 1 # Deblocking interlaced source (Didée's code)
    par=getparity()
    SeparateFields().PointResize(width,height)
    Deblock_QED(24,28,uv=3)
    AssumeFrameBased()
    SeparateFields()
    Merge(SelectEven(),SelectOdd())
    par ? AssumeTFF() : AssumeBFF()
    Weave()
    #STEP 2 ## Color denoising / desaturation (Light)
    ConverttoRGB32(matrix="rec601",interlaced=true)
    separatefields()
    #### CCD COLOR DENOISING :
    LoadVirtualDubPlugin("C:\Camcorder_Color_Denoise_s se2.vdf", "CCD", 1)
    CCD(9,1) # 0 to 100, default 30
    weave()
    converttoyv12(matrix="Rec601",interlaced=true)

    #STEP 3 # Denoising with RemovespotsMc + dfttest
    c=last
    #even fields
    # Motion compensation on frames -2...+2
    even = c.SeparateFields().SelectEven()
    super_even=even.MSuper()
    vf2 = super_even.MAnalyse (isb=false, delta=2, overlap=4)
    vf1 = super_even.MAnalyse (isb=false, delta=1, overlap=4)
    vb1 = super_even.MAnalyse (isb=true, delta=1, overlap=4)
    vb2 = super_even.MAnalyse (isb=true, delta=2, overlap=4)
    cf2 = MCompensate (even, super_even, vf2, thSAD=400)
    cf1 = MCompensate (even, super_even, vf1, thSAD=400)
    cb1 = MCompensate (even, super_even, vb1, thSAD=400)
    cb2 = MCompensate (even, super_even, vb2, thSAD=400)
    # dfttest on motion-compensated clip
    Interleave (cf2, cf1, even, cb1, cb2)
    SetMTMode(2)
    RemoveSpotsMC()
    SetMTMode(4)
    dfttest (sigma=4, sigma2=4, tbsize=3, lsb=false)
    SelectEvery (5, 2)
    # Gradient smoothing
    presmooth = last
    #SmoothGrad (radius=20, thr=0.15)
    #SmoothGrad (radius=12, thr=0.25, ref=presmooth)
    # Back to 8 bits, ordered dithering
    #DitherPost () #
    filtered_even=last
    #odd fields
    # Motion compensation on frames -2...+2
    odd = c.SeparateFields().SelectOdd()
    super_odd=odd.MSuper()
    vf2 = super_odd.MAnalyse (isb=false, delta=2, overlap=4)
    vf1 = super_odd.MAnalyse (isb=false, delta=1, overlap=4)
    vb1 = super_odd.MAnalyse (isb=true, delta=1, overlap=4)
    vb2 = super_odd.MAnalyse (isb=true, delta=2, overlap=4)
    cf2 = MCompensate (odd, super_odd, vf2, thSAD=400)
    cf1 = MCompensate (odd, super_odd, vf1, thSAD=400)
    cb1 = MCompensate (odd, super_odd, vb1, thSAD=400)
    cb2 = MCompensate (odd, super_odd, vb2, thSAD=400)
    # dfttest on motion-compensated clip
    Interleave (cf2, cf1, odd, cb1, cb2)
    SetMTMode(2)
    RemoveSpotsMC()
    SetMTMode(4)
    dfttest (sigma=4, sigma2=4, tbsize=3, lsb=false)

    # Gradient smoothing
    presmooth = last
    #SmoothGrad (radius=20, thr=0.15) #
    #SmoothGrad
    # Back to 8 bits, ordered dithering
    #DitherPost ()#
    filtered_odd=last
    Interleave(filtered_even, filtered_odd)
    weave()
    #STEP 4 # chroma bleeding (May need more tweaking)
    mergechroma(aWarpSharp(depth=10, thresh=0.75, blurlevel=3, cm=1))#
    #STEP 5 ## Upsizing
    spline36resize(720,576)
    Thank you !

    But...
    Image Attached Thumbnails Click image for larger version

Name:	Error.jpg
Views:	263
Size:	89.9 KB
ID:	39335  

    Quote Quote  
  23. It's for use with a multi-threaded version of AviSynth. If you're not using one then remove or comment out (put a '#' in front of the line). That script looks slow even with a multi-threaded version of AviASynth. Without one it'll be even slower. Good things often take time. It also looks to me to be difficult to get going (to open because of the difficulty you might have with some of the required functions).
    Quote Quote  
  24. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by manono View Post
    It's for use with a multi-threaded version of AviSynth. If you're not using one then remove or comment out (put a '#' in front of the line). That script looks slow even with a multi-threaded version of AviASynth. Without one it'll be even slower. Good things often take time. It also looks to me to be difficult to get going (to open because of the difficulty you might have with some of the required functions).
    Thank You!!! Worked! I will test this code now!

    And............................................... .................................................. .................................................. ................
    what the hell is that???
    Image Attached Files
    Last edited by Caiosouza; 7th Nov 2016 at 19:42.
    Quote Quote  
  25. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    What madness, after that (above) the jagabo the code opened!!! I just took the line of Santiag, however I had already done it before and always get error, however it is impossible, I'm getting 0,03fps around 13 hours to 1 minute video , it is totally impossible to do this code: (Dual Core 3GB Ram)

    Mpeg2Source("C:\Users\User\Desktop\ETC\1993 MX 250 to RES\Sample 1993 250\1993 MX 250 Sample.d2v", CPU2="ooooxx", Info=3)
    SeparateFields()
    PointResize(width,height*2)
    deblock_qed()
    PointResize(width, height/2)
    Weave()
    QTGMC(preset="fast")
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    aWarpSharp(depth=5)
    Sharpen(0.3, 0.0)
    nnedi3_rpow2(2, cshift="Spline64Resize", fwidth=width*2, fheight=height)
    aWarpSharp(depth=5)
    AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave()



    EDIT: deblock_qed() is a cause of massive slowest fps, whithout this i gets 2fps

    How I Get More fps? To use 2 core? or AMD 3 Core? (any estable,pelase)
    Last edited by Caiosouza; 7th Nov 2016 at 20:15.
    Quote Quote  
  26. Something is not right with your numbers. Using that script with and without deblock_qed I see only about a 10 percent difference in speed. Both in excess of 3 fps with single threaded AviSynth and x264 at the slow preset. Using multithreaded AviSynth increase that by about 2x on my quad core i5 2500K CPU.

    You can try using Yadif(mode=1, order=1) instead of QTGMC(preset="fast") to get faster processing, but lower quality.
    Quote Quote  
  27. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Something is not right with your numbers. Using that script with and without deblock_qed I see only about a 10 percent difference in speed. Both in excess of 3 fps with single threaded AviSynth and x264 at the slow preset. Using multithreaded AviSynth increase that by about 2x on my quad core i5 2500K CPU.

    You can try using Yadif(mode=1, order=1) instead of QTGMC(preset="fast") to get faster processing, but lower quality.
    Yes I agree, I do no understand too low....
    I already made so many alterations that do not know, but that I solve.
    The more important the code worked! (withou Santiag)

    Something about this?
    https://forum.videohelp.com/attachments/39332-1478552291/1999_AMA_250_SX_PAL.mp4

    Thank you !
    Last edited by Caiosouza; 7th Nov 2016 at 21:41.
    Quote Quote  
  28. Originally Posted by Caiosouza View Post
    Unfortunately, that was originally interlaced video but it was resized vertically and encoded interlaced. So the two fields can no longer be separated cleanly. I would just blend the two fields together and then clean it up a bit:


    Code:
    LSMASHVideoSource("1999_AMA_250_SX_PAL.mp4") 
    vinverse() # blend comb artifacts
    BilinearResize(width/2, height) # downsize, clean edges, upsize, sharpen
    Sharpen(0.3, 0.0)
    Santiag()
    Spline36Resize(width*2, height)
    Sharpen(0.2, 0.0)
    Santiag helps a lot here. The result isn't great but it looks a little better than the source when watching full screen. If you're going to DVD you'll need to upscale to 720x576, not 720x540.
    Image Attached Files
    Quote Quote  
  29. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Caiosouza View Post
    Unfortunately, that was originally interlaced video but it was resized vertically and encoded interlaced. So the two fields can no longer be separated cleanly. I would just blend the two fields together and then clean it up a bit:


    Code:
    LSMASHVideoSource("1999_AMA_250_SX_PAL.mp4") 
    vinverse() # blend comb artifacts
    BilinearResize(width/2, height) # downsize, clean edges, upsize, sharpen
    Sharpen(0.3, 0.0)
    Santiag()
    Spline36Resize(width*2, height)
    Sharpen(0.2, 0.0)
    Santiag helps a lot here. The result isn't great but it looks a little better than the source when watching full screen. If you're going to DVD you'll need to upscale to 720x576, not 720x540.
    Oh...cool !
    Do you work the video directly? Do not need mux demux etc?
    I going to DVD PAL

    In reference of the 1993 MX 250 Codes (topic video),You were right about the performance, Deblock_QED isn't ,
    I transfer my workfolder to my other desktop AMD 3 core 4GB Ram, and
    the performance turned to "normal" aroud 1,5 1,7 fps
    I tri to open Santiag filter now, all others runs fine, ok
    I now realising a hibrid test with your last code and old I posted in initial
    Soon i post results sample here to compare,

    Thanks a lot! (for a while...haha)
    Quote Quote  
  30. Originally Posted by Caiosouza View Post
    Do you work the video directly? Do not need mux demux etc?
    Yes. LSMASHVideoSource() can access video from the mp4 file directly. I usually mux the original audio along with the new video using MkvToolnix.
    Quote Quote  



Similar Threads

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