Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th February 2018, 21:20   #1  |  Link
Enigma0456
Registered User
 
Join Date: Feb 2018
Posts: 24
Help with AviSynth

I'm working on the treatment of the cutscenes of the game (from PlayStation 1), Megaman 8. But as I know almost nothing about the handling of AviSynth I will need some advice on the plugins.

The video, as you can see, was been most likely compressed because of the limited space available on the CD-ROMs used for burning PS1 games.

Here is my AviSynth script. I also added the Warp sharp filter from VirtualDub, this aspect having significantly improved the quality of the image automatically made the drawing lines a bit strange.

PS: For the purpose of curiosity I riped the cutscenes with the help of a program called jpsxdec.

Last edited by Enigma0456; 24th February 2020 at 18:36.
Enigma0456 is offline   Reply With Quote
Old 19th February 2018, 22:08   #2  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,765
I get a http 403 error when clicking on your script...
Your drawing lines are strange because the warping effect is too strong, set it lower.

If you want to try out vapoursynth, here's a quick & dirty script than looks not that bad. An Avisynth version would look more or less the same. ( I don't have it installed right now)
Sample
Code:
import vapoursynth as vs
import mvsfunc as mvf
import havsfunc as haf
import nnedi3_rpow2 as nn
core = vs.get_core()

clip = core.lsmas.LWLibavSource(source=r"D:\Download\ROCK8.avi")
clip = mvf.Depth(clip, 16)

orig=clip
def mega(clip):
	pre=clip.knlm.KNLMeansCL(d=4, a=8, h=4)
	pre = haf.DeHalo_alpha(pre,  rx=2,ry= 2)
	return  haf.SMDegrain(clip, tr=3, pel=2, contrasharp=True, thSAD = 550, thSADC = 450, blksize = 8, truemotion = False,  RefineMotion=True, prefilter=pre)
	
	
clip = mega(clip)

clip = haf.DeHalo_alpha(clip, darkstr= .6, brightstr=.8,ss=2, rx=2.6,ry= 2.6)
clip = nn.nnedi3_rpow2(clip, nsize =4, qual =2, nns =4)
clip = core.warp.AWarpSharp2(clip, type = 1,  blur=1, depth=4)
clip = clip.f3kdb.Deband(preset="medium", output_depth = 10).rgvs.RemoveGrain(mode=1)

crop = 0
clip = core.std.StackHorizontal([ 
	core.std.CropRel(nn.nnedi3_rpow2(orig).fmtc.bitdepth(bits=10), crop,crop,0,0).text.Text("source"), \
	core.std.CropRel(clip, crop,crop,0,0), \
	])
	
clip.set_output()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository

Last edited by ChaosKing; 19th February 2018 at 22:12.
ChaosKing is offline   Reply With Quote
Old 10th March 2018, 02:11   #3  |  Link
Enigma0456
Registered User
 
Join Date: Feb 2018
Posts: 24
Quote:
Originally Posted by ChaosKing View Post
I get a http 403 error when clicking on your script...
Your drawing lines are strange because the warping effect is too strong, set it lower.

If you want to try out vapoursynth, here's a quick & dirty script than looks not that bad. An Avisynth version would look more or less the same. ( I don't have it installed right now)
Sample
Code:
import vapoursynth as vs
import mvsfunc as mvf
import havsfunc as haf
import nnedi3_rpow2 as nn
core = vs.get_core()

clip = core.lsmas.LWLibavSource(source=r"D:\Download\ROCK8.avi")
clip = mvf.Depth(clip, 16)

orig=clip
def mega(clip):
	pre=clip.knlm.KNLMeansCL(d=4, a=8, h=4)
	pre = haf.DeHalo_alpha(pre,  rx=2,ry= 2)
	return  haf.SMDegrain(clip, tr=3, pel=2, contrasharp=True, thSAD = 550, thSADC = 450, blksize = 8, truemotion = False,  RefineMotion=True, prefilter=pre)
	
	
clip = mega(clip)

clip = haf.DeHalo_alpha(clip, darkstr= .6, brightstr=.8,ss=2, rx=2.6,ry= 2.6)
clip = nn.nnedi3_rpow2(clip, nsize =4, qual =2, nns =4)
clip = core.warp.AWarpSharp2(clip, type = 1,  blur=1, depth=4)
clip = clip.f3kdb.Deband(preset="medium", output_depth = 10).rgvs.RemoveGrain(mode=1)

crop = 0
clip = core.std.StackHorizontal([ 
	core.std.CropRel(nn.nnedi3_rpow2(orig).fmtc.bitdepth(bits=10), crop,crop,0,0).text.Text("source"), \
	core.std.CropRel(clip, crop,crop,0,0), \
	])
	
clip.set_output()
I'm sorry for the link I sent you and also for leaving you waiting. Here is the correct link. You did a good job with image processing. Is it possible to make it even better? For example, would it be possible to increase the the video resolution without affecting quality?
Enigma0456 is offline   Reply With Quote
Old 10th March 2018, 02:44   #4  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by Enigma0456 View Post
I'm sorry for the link I sent you and also for leaving you waiting. Here is the correct link.
Nope. Error: "Server Not Found". Why don't you just paste your script in this thread?

Quote:
Originally Posted by Enigma0456 View Post
would it be possible to increase the the video resolution without affecting quality?
There is no way to increase the resolution. It is what it is. Do you mean sharpen it?
LemMotlow is offline   Reply With Quote
Old 10th March 2018, 10:06   #5  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,765
My script doubles the resolution.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 10th March 2018, 15:26   #6  |  Link
Enigma0456
Registered User
 
Join Date: Feb 2018
Posts: 24
Quote:
Originally Posted by LemMotlow View Post
Nope. Error: "Server Not Found". Why don't you just paste your script in this thread?
Not again! Here is the script (I hope it works this time):

AviSource("C:\Vid\ROCK8.AVI")
Crop(0,0,-0,-4)
BicubicResize(1280,720)
ConvertToYV12
unblock(cartoon=true)
HQDering(255, 255)
DeHalo_alpha(rx=2.0, ry=2.0, darkstr=0.4, brightstr=1.0, lowsens=50, highsens=50, ss=1.5)

As you can see, it is a very simple script. That's because I'm just a beginner.

Quote:
Originally Posted by LemMotlow View Post
There is no way to increase the resolution. It is what it is. Do you mean sharpen it?
I know that. I wanted to say is to place a HD resolution in the video.
Enigma0456 is offline   Reply With Quote
Old 10th March 2018, 16:02   #7  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,765
You will just waste hdd space with a HD resolution and it won't look better! You can't turn a crappy source into gold.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 11th March 2018, 17:12   #8  |  Link
Enigma0456
Registered User
 
Join Date: Feb 2018
Posts: 24
Quote:
Originally Posted by ChaosKing View Post
You will just waste hdd space with a HD resolution and it won't look better! You can't turn a crappy source into gold.
I know that, it was just an example. So there's nothing left to do, right?

Last edited by Enigma0456; 11th March 2018 at 17:21.
Enigma0456 is offline   Reply With Quote
Reply

Tags
avisynth script, virtual dub

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.