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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Jan 2021
Posts: 1
|
Avisynth script to remove grain, spots, lines, scratches and dirt.
I am new to the world of Avisynth coding, but I have managed to create (by reading guides to find and download the various necessary plugins), through AvsPmod, a script for removing grain, dirt, lines, scratches and spots.
I did a lot of research to make sure that I have included in the source code sheet everything necessary for the script to work in the correct order, also thanks to the powerful AvsPmod debugging tool. However, I see no difference in the output of the scripted video file. Did I write something wrong or is the script missing some basic commands (I attach the script I write below)? Let me know! Code:
import("C:\Program Files (x86)\AviSynth\plugins\RemoveDirtMC.avs") DirectShowSource("videosource", fps= 29.97, convertfps=true) ConvertToYV12(matrix="rec709") RemoveDirt(20,false) DirectShowSource("videosource", fps= 29.97, convertfps=true) ConvertToYV12(matrix="rec709") RemoveGrain() TurnRight() RemoveGrain() TurnLeft() DirectShowSource("videosource", fps= 29.97, convertfps=true) LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\despot.dll") ConvertToYV12(matrix="rec709") DeSpot(p1=35, p2=14, mthres=25) DirectShowSource("videosource", fps= 29.97, convertfps=true) ConvertToYV12(matrix="rec709") even = SelectEven().RemoveDirt(80, false) odd = SelectOdd().RemoveDirt(80, false) Interleave(even, odd).RemoveDirt(80, false) |
![]() |
![]() |
![]() |
#2 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Should be like below. Every time you re-source the file, you lose the previous work. Source the file only once.
Code:
import("C:\Program Files (x86)\AviSynth\plugins\RemoveDirtMC.avs") DirectShowSource("videosource", fps= 29.97, convertfps=true) ConvertToYV12(matrix="rec709") RemoveDirt(20,false) RemoveGrain() TurnRight() RemoveGrain() TurnLeft() DeSpot(p1=35, p2=14, mthres=25) even = SelectEven().RemoveDirt(80, false) odd = SelectOdd().RemoveDirt(80, false) Interleave(even, odd).RemoveDirt(80, false) |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,713
|
knack_liek,
FYI, DirectShowSource is probably a "last resort" source filter. It's often not frame accurate (if you jump to a specific frame number you mightn't land on the same frame each time) . Even the DirectShowSource page on the wiki suggests the same. http://avisynth.nl/index.php/DirectShowSource You're also at the mercy of having system codecs doing the decoding. For DVD and mpeg2 video: http://avisynth.nl/index.php/DGDecode For most file types: http://avisynth.nl/index.php/FFmpegSource or http://avisynth.nl/index.php/LSMASHSource |
![]() |
![]() |
![]() |
Tags |
despot, errors, lines, removedirt, removegrain |
Thread Tools | Search this Thread |
Display Modes | |
|
|