VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
  1. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Hi everyone.

    I've been trying to resize a video from 720x576 to 1280x720 with multiple methods but the results are always a blurred image. I want to know the best method to do it. I discovered this wonderful forum and I decided to ask here.

    I want to use an AVIsynth script with VirtualDubmod but I can't load the video (vob) on it. This is what I want to do with the video:

    Crop the black lines on the top and the bottom of the image, then Resize to 1280x720 but I want to obtain a sharp result.

    Obtain a Progressive video (because VideoSpec says: Interlaced - Top Field First) and finally Convert from 25 fps to 23.976 fps.

    Any help would be appreciated.
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    Dec 2005
    Location
    Finland
    Search Comp PM
    Install FFmpegSource to be able to load the video into Avisynth.

    Then the usual way to upscale would be something like this:

    Code:
    FFMpegSource2("VIDEO1.vob")
    
    Crop(0,16,0,-16)
    
    NNEDI3_rpow2(2)
    LanczosResize(1280,688) # Assuming an aspect ratio of 1.85
    
    AssumeFPS("ntsc_film")
    There is no interlacing - use your eyes, tools just look at how the video is encoded, not what it actually contains.

    The video is however suffering from a lot of detail loss and blocking due to a low bitrate. There are deblocking and denoising filters that could additionally be used to reduce that problem.
    Image Attached Thumbnails Click image for larger version

Name:	upscaled.jpg
Views:	476
Size:	136.9 KB
ID:	35741  

    Quote Quote  
  3. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thanks a lot but I don't know how to install FFmpegSource. I went here:

    http://avisynth.nl/index.php/FFmpegSource

    Then here:

    https://github.com/FFMS/ffms2/releases

    And I finally download ffms2-2.22-msvc.7z. I unzip the file and copied ffms2.dll into Avisynth plugin folder. I opened VirtualDubmod, then I load your script and says:

    Avisynth open failure:
    Script error: there is no function named "FFMpegSource2"

    What can I do now?
    Quote Quote  
  4. Copy FFMS2.AVSI into AviSynth's plugins folder too.
    Quote Quote  
  5. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thanks a lot. But with FFMS2.AVSI into AviSynth's plugins folder, same error:

    Script error: there is no function named "FFMpegSource2"

    Then, I copied ffmsindex.exe into AviSynth's plugins folder and same error again.

    I don't know what to do.
    Quote Quote  
  6. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Check the Registry and see what the Avisynth plugins entry says.
    Just as an example:

    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth]
    "plugindir2_5"="c:\\program files\\avisynth 2.5\\plugins"
    Quote Quote  
  7. Member
    Join Date
    Dec 2005
    Location
    Finland
    Search Comp PM
    @Enrik

    Are all your programs and plugins either 32 bit or 64 bit? If they don't match, they won't work with each other.
    Quote Quote  
  8. If you're running 32 bit AviSynth on 64 bit Windows the Registry entry will be under:

    Code:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Avisynth]
    Make sure that the entry matches the actual installed location.
    Last edited by jagabo; 18th Feb 2016 at 15:45.
    Quote Quote  
  9. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    First of all, thanks to everyone.

    I'm using Windows XP Professional Service Pack 2, 32 bits. The registry says the same:

    Originally Posted by El Heggunte

    [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth
    "plugindir2_5"="c:\\program files\\avisynth 2.5\\plugins"
    What version of Avisynth and VirtualDub (or Virtualdubmod) should I use?
    Quote Quote  
  10. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by Enrik View Post
    .......

    What version of Avisynth and VirtualDub (or Virtualdubmod) should I use?
    XP w/ Service Pack 3.

    VirtualDub: the latest one.
    VirtualDubMod: is dead.
    Avisynth: 2.6
    Quote Quote  
  11. If the filters aren't loading automatically you can always load them manually in your script.

    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugin\ffms2.dll")
    import("C:\Program Files\AviSynth 2.5\plugins\ffms2.avsi")
    You'll probably have to load nnedi3 and any other required filters manually too.

    I'd use any recent version of VirtualDub and version 2.6 of AviSynth, both 32 bit. And all 32 bit filters.
    Quote Quote  
  12. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Finally works with the final versions of Virtualdub, Avisynth and the 32 bits plugins! thanks a lot.

    Only 3 more questions:

    1-How can I improve the image quality? I mean obtain something similar to a real HD in 720p (maybe is not possible) but at least I would like to know how to use the deblocking and denoising filters on the Avisynth script to reduce the detail loss and blocking.
    2-The final size of the video is an AVI of 664 MB (with Direct stream copy) the initial size was 10 MB, is it normal?
    3-Is there any possibilities to save in Virtualdub as VOB, MP4 or MKV instead of AVI?
    Quote Quote  
  13. Member
    Join Date
    Dec 2005
    Location
    Finland
    Search Comp PM
    1) You should deblock the video before doing anything else. Then it could perhaps be stabilized, as this helps with denoising and looks better too. Then run a suitable denoising filter on it. Then it is time to upscale the result. Perhaps use a sharpen filter at the end, if it seems necessary. You can't get back details which have been lost, however.

    http://avisynth.nl/index.php/Deblock_QED
    http://avisynth.nl/index.php/Stab
    http://avisynth.nl/index.php/SMDegrain
    ...

    Just browse the wiki, there are many filters to choose from. But you will yourself have to try them out and see what you like best.

    2) If you just select "save as AVI", the video will be saved uncompressed, that's why it is big. Use Video -> Compression to choose another codec (if you have some installed).

    3) VirtualDub only really works with AVI files so it's best to use something else to encode other types of files. You can load Avisynth scripts with e.g. MeGUI.
    Quote Quote  
  14. It will never look like native HD. The best you can hope for is to remove some of the MPEG block artifacts, reduce noise a bit, and enlarge the frame while keeping fairly sharp edges, without too severe oversharpening artifacts.

    I would start with Mpeg2Source("filename.d2v", CPU2="ooooxx") to get its deringing filter without its deblocking (which is too strong). Then use Deblock_QED() to reduce the blocking.

    Unfortunately the video already has fairly strong oversharpening halos. You can use dehalo_alpha() to reduce them but it also removes a fair amount of detail unless you fine tune it a lot.

    A temporal noise reducer will help but may also lose some low contrast details.

    There's a bit of projector bounce that you can reduce with Stab().

    This is overdoing it but should give you some ideas:

    Code:
    Mpeg2Source("VIDEO1.d2v", CPU2="ooooxx", Info=3) 
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    Santiag()
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()
    Image Attached Files
    Quote Quote  
  15. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thanks a lot, but what plugins should I have? I can't use the script:

    Mpeg2Source("c:\VIDEO\VIDEO1.d2v", CPU2="ooooxx", Info=3)
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    Santiag()
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()

    I downloaded "dgmpgdec158" and I use "DGIndex.exe" to create a .d2v file and I obtain a file named "VIDEO1.d2v" and 4 more files: "VIDEO1.demuxed" and 3 ac3 files, I don't know if it is normal.

    Then, I put the following plugins on the Avisynth's plugins folder:

    DGDecode.dll
    masktools2.dll
    deblock.dll
    Deblock_QED_MT2Mod
    TemporalDegrain
    Dehalo_alpha_MT2

    And I have this error:

    Script error:there is no function named "mt_LutSpa"
    (Deblock_QED_MT2Mod.avsi, line 46)

    I don't know what to do.
    Quote Quote  
  16. Originally Posted by Enrik View Post
    I don't know what to do.
    It might have to do with MaskTools2. Which version are you using? The DeBlock_QED readme says:
    # Changes 2010-10-16:
    # - Replaced 'relative' with the new 'mode' parameter in mt_LutSpa(), starting from MaskTools 2.0a45

    I believe you'll need that version or newer.

    However, it may also be that something's wrong with the way you're opening your video. Try this:

    Mpeg2Source("c:\VIDEO\VIDEO1.d2v", CPU2="ooooxx", Info=3)
    Return Last
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    Santiag()
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()


    If it won't open, then that's the reason.
    Quote Quote  
  17. You need mt_masktools.dll.
    Quote Quote  
  18. Originally Posted by jagabo View Post
    You need mt_masktools.dll.
    You sure about that? The DeBlock_QED page mentions only MaskTools2. Maybe he also needs that Microsoft Visual C++ 2012 Redistributable Package (x86 / x64) mentioned on the MaskTools2 page?
    Quote Quote  
  19. Originally Posted by manono View Post
    Originally Posted by jagabo View Post
    You need mt_masktools.dll.
    You sure about that? The DeBlock_QED page mentions only MaskTools2.
    You're right. Just the current masktools2.dll will work. Maybe I was remembering back when I had an older Masktools.
    Quote Quote  
  20. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thanks again. I used the script with Return Last:

    Mpeg2Source("c:\VIDEO\VIDEO1.d2v", CPU2="ooooxx", Info=3)
    Return Last
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    Santiag()
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()

    And when I load the Avisynth script on VirtualDub I get an error with a file: MSVCP110.dll. When I click OK all I can see is the original video without any changes.

    I've tried with this:

    AviSynth 2.6.0
    masktools2-x86.zip

    AviSynth+ x64
    masktools2-x64.zip

    And always the same error.

    I've installed Microsoft Visual C++ 2012 Redistributable Package (vcredist_x86.exe because I'm using Windows XP SP2 32 bits) and no luck.

    How can I solve that? Sorry for all those questions.
    Quote Quote  
  21. MSVCP110.dll is a part of Microsoft's Visual C runtime library. I think it's this one:
    https://www.microsoft.com/en-us/download/details.aspx?id=5555
    Quote Quote  
  22. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Thanks jagabo, and thanks to everyone but I'm going nuts with these errors. I've installed Windows XP Service Pack 3 and same error again and again. And now, two more errors with other files.

    When I try to load the Avisynth script I get this:

    This application has failed to start because d3dx9_30.dll was not found. Reinstall the application may fix that problem.

    This application has failed to start because MSVCP110.dll was not found. Reinstall the application may fix that problem.

    This application has failed to start because MSVCR110.dll was not found. Reinstall the application may fix that problem.


    Then, when I click ok, I see the same original video without changes. With these errors the script doesn't work.

    What's wrong? of course, I have installed vcredist_x86 and nothing has changed. Error, error and error.
    Last edited by Enrik; 23rd Feb 2016 at 07:41.
    Quote Quote  
  23. Lone soldier Cauptain's Avatar
    Join Date
    Jan 2006
    Location
    Brazil
    Search Comp PM
    Originally Posted by Enrik View Post
    Thanks jagabo, and thanks to everyone but I'm going nuts with these errors. I've installed Windows XP Service Pack 3 and same error again and again. And now, two more errors with other files.

    When I try to open the Avisynth script I get this:

    This application has failed to start because d3dx9_30.dll was not found. Reinstall the application may fix that problem.

    This application has failed to start because MSVCP110.dll was not found. Reinstall the application may fix that problem.

    This application has failed to start because MSVCR110.dll was not found. Reinstall the application may fix that problem.


    Then, when I click ok, I see the same original video without changes. With these errors the script doesn't work.

    What's wrong? of course, I have installed vcredist_x86 and nothing has changed. Error, error and error.
    Download VCREDIST 2010 and Directx June 2010 executable.



    Claudio
    Quote Quote  
  24. You need DX9 runtime: https://www.microsoft.com/en-us/download/details.aspx?id=34429

    Look in C:\Windows\System32\. Do you see MSVCP110.dll there? If not, you installed the wrong Visual C Runtime. Try an earlier or later version.
    Quote Quote  
  25. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    It's something incredible, on C:\Windows\System32 I see those files but I get the same errors again and again.

    I think I must format my computer, I can't fix those errors with any download.
    Quote Quote  
  26. Didn't read whole thread - sorry for that but seem i don't see information that correct resize should be performed in linear RGB space.
    So pursuing perfection will require quite complex approach.
    Quote Quote  
  27. Originally Posted by Enrik View Post
    Thanks again. I used the script with Return Last:

    Mpeg2Source("c:\VIDEO\VIDEO1.d2v", CPU2="ooooxx", Info=3)
    Return Last
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    Santiag()
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()

    ...When I click OK all I can see is the original video without any changes.
    Of course. The second line of your scrip is "Return last". That bypasses everything below that line. So effectively all you have is Mpeg2Source(...). Manono suggested that as a way to verify that Mpeg2Source() was working properly. And since you see the video, it is.
    Quote Quote  
  28. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    I have resolved the problem, all I had to do was delete the unnecesary plugins. I have no errors now. I will use the scripts again.
    Quote Quote  
  29. Member
    Join Date
    Feb 2016
    Location
    Europe
    Search PM
    Finally, I used the next script:

    Code:
    Mpeg2Source("C:\VIDEO\VIDEO1.d2v", CPU2="ooooxx", Info=3) 
    LoadPlugin("C:\AviSynth\plugins\depanestimate.dll")
    Deblock_QED(quant1=30, quant2=20)
    Stab(4,4,4,4)
    Crop(4,16,-4,-16)
    dehalo_alpha(rx=2.5, ry=2.5, brightstr=1.2, darkstr=0.8, lowsens=10, highsens=90)
    TemporalDegrain(SAD1=50, SAD2=35, sigma=2)
    Sharpen(0.3)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=688)
    aWarpSharp(depth=2)
    Sharpen(0.3)
    GreyScale()
    I have 3 questions.

    - With Santiag() (in jagabo's original script) I get the error: there is no function named Santiag. What is it? I can't find any plugin with that name.
    -Should I use the line "Sharpen(0.3)" twice?
    -How can I save the video with audio?
    Quote Quote  
  30. Santiag() is an antialias filter.

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

    Import it with

    import("drive:\path\to\Santiag.avs")

    Whether or not you should run sharpen twice depends on your video. The idea above it to sharpen a little before upscaling, then sharpen again after. Of course, the same is true of all the other filters. For best results you need to tune the script for each video.

    I usually just mux the original audio with the new video after encoding.
    Quote Quote  



Similar Threads

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