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.
+ Reply to Thread
Results 1 to 30 of 33
-
-
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")
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. -
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? -
@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. -
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 -
XP w/ Service Pack 3.
VirtualDub: the latest one.
VirtualDubMod: is dead.
Avisynth: 2.6 -
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")
I'd use any recent version of VirtualDub and version 2.6 of AviSynth, both 32 bit. And all 32 bit filters. -
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? -
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. -
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()
-
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. -
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. -
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?
-
-
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. -
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 -
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.
-
-
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. -
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. -
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. -
-
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.
-
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()
- 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? -
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.
Similar Threads
-
Still can't resize video
By steveeyes in forum Video ConversionReplies: 8Last Post: 16th Aug 2015, 20:44 -
Best method to resize an avi file downward
By loninappleton in forum Video ConversionReplies: 7Last Post: 31st May 2015, 12:09 -
any good reason (good excuse) not to keep AR when crop/resize to 720p?
By mkvonly in forum Blu-ray RippingReplies: 11Last Post: 3rd Mar 2015, 08:04 -
A bit confused with options to get good results with video and subtitles
By Valerc in forum SubtitleReplies: 18Last Post: 5th Jul 2012, 19:08 -
Anyone know of a good MP3 program to resize (make smaller) some files
By soulbug in forum Newbie / General discussionsReplies: 4Last Post: 28th Feb 2011, 15:03