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 20th January 2015, 15:02   #1  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
AviSynth Script Alignment (MeGUI)

Somebody help me to order my simple script to enhance the video. I am just the beginner to this! I need your help to enhance the video quality from DVDs for my use!

Code:
SetMemoryMax(682)
<input>
<deinterlace>
<crop>
<denoise>
TemporalSoften(4, 4, 8, scenechange=15, mode=2)
<resize>
sharpen(0.22)
addgrain(0.18)
#Tweak(hue=1, sat=1.0, bright=-12, cont=1.11, coring=true, sse=false)
#ConvertToRGB()
#RgbAdjust(.92,0.78,.71,0)
ConvertToYV12()
ConvertToYUY2()
#ColorYUV(gain_u=5, gain_v=-25)
#ColorYUV(autogain=true, autowhite=true
#ChangeFPS(23.976, linear=true)
fft3dfilter(sigma=1.6)
#Levels(0,1,255,16,240)
#Levels(16,1,240,0,255)
#Levels(0, 1.2, 255, 0, 255)
#LSFmod(Defaults="Slow",strength=150)
#Tweak(hue=3, sat=1.1, bright=-8, cont=1.11, coring=true, sse=false)
Generally, temporal smoothing and noise reduction should be before resizing.
Sharpening and add grain should be after resizing.
I'm not sure about color correction, probably after resizing and before sharpening.

I am using Tweak and Levels more than once in script because it may differ with the source. I don't know more about these! Please help me to order and I am asking the experts to add your knowledge to this!

Last edited by Music Rockz; 22nd January 2015 at 10:39.
Music Rockz is offline   Reply With Quote
Old 21st January 2015, 09:10   #2  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Somebody please help me!
Music Rockz is offline   Reply With Quote
Old 21st January 2015, 17:17   #3  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
You're asking for two complete courses in MEGUI usage and in Avisynth encoding? Few will take you up on this. There are many guides to MEGUI, some are on this wiki page: http://mewiki.project357.com/wiki/Main_Page. Some are at videohelp: http://www.videohelp.com/tools/MeGUI#guides. Here's one at AfterDawn: http://www.afterdawn.com/guides/arch...urce_video.cfm (you can search their Guides for more).

To start:

The code in brackets "< >" will be inserted when you activate other options in MEGUI.

Any line in an Avisynth script that starts with "#" is a comment. It will not be executed. These are the only lines in your script that will be executed:
SetMemoryMax(682)
TemporalSoften(4, 4, 8, scenechange=15, mode=2)
ConvertToYUY2()
ConvertToYV12()
fft3dfilter(sigma=1.6)
sharpen(0.22)
addgrain(0.18)

What's with SetMemoryMax? Are you using an MT version of Avisynth?

Why are you changing colorspace to YUY2 and back to YV12? DVD is YV12 to begin with.

Filters like TemporalSoften and FFT3Dfilter are usually used with progressive video. DVD is interlaced or telecined.

Quote:
Originally Posted by Music Rockz View Post
Somebody help me to order my simple script to enhance the video.
No one here has any idea what your video looks like, so we don't know what "enhance" means.

Quote:
Originally Posted by Music Rockz View Post
I am using Tweak and Levels more than once in script because it may differ with the source.
Sorry to say, and not trying to just be tough on you, but that statement doesn't seem to make sense. Obviously, the results will look different than the source. We don't know what your source looks like, so it's anyone's guess what the result would be.

Quote:
Originally Posted by Music Rockz View Post
I don't know more about these!
Might be a better idea to start with just an Avisynth script by itself to figure out what you're doing and check the results. Writing and running untried scripts in MEGUI isn't just a pain in the neck, it's a waste of time. Once you understand more about Avisynth, you can encode and whatnot with anything including MEGUI.
LemMotlow is offline   Reply With Quote
Old 21st January 2015, 18:55   #4  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by LemMotlow View Post
What's with SetMemoryMax? Are you using an MT version of Avisynth?
SetMemoryMax is an internal function that's been available in the official AviSynth (and its variants) for a long time, read here: internal functions.
Reel.Deel is offline   Reply With Quote
Old 21st January 2015, 19:43   #5  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
Is there any reason to use Megui instead of notepad + Virtualdub + codecs ?
Stormborec is offline   Reply With Quote
Old 21st January 2015, 19:59   #6  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by Reel.Deel View Post
SetMemoryMax is an internal function that's been available in the official AviSynth (and its variants) for a long time, read here: internal functions.
I know. Wanted to know what the O.P. is using. The figure 682 is not mod-4, mod-8, or mod-16. Odd number IMO. Would that work? I thought SMM had to be mod-something.

Last edited by LemMotlow; 21st January 2015 at 20:07.
LemMotlow is offline   Reply With Quote
Old 21st January 2015, 22:07   #7  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LemMotlow View Post
I know. Wanted to know what the O.P. is using. The figure 682 is not mod-4, mod-8, or mod-16. Odd number IMO. Would that work? I thought SMM had to be mod-something.
Whatever you set SetMemoryMax to, it will always be mod-1048576 and therefore also mod-16, mod-8, ..., since the unit is MB (MiB). No mod-something required.
Maybe you're confusing this with frame dimensions?
Groucho2004 is offline   Reply With Quote
Old 21st January 2015, 22:29   #8  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Thanks for clarifying those parameters. But, not frame size. I've never seen it that way. 682? I guess it's OK, then.
LemMotlow is offline   Reply With Quote
Old 21st January 2015, 22:51   #9  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LemMotlow View Post
682?
Yes, it's an unusual value. I don't know if the gui sets it or if the OP did. Whatever works...
Groucho2004 is offline   Reply With Quote
Old 22nd January 2015, 04:25   #10  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Quote:
Originally Posted by Groucho2004 View Post
Yes, it's an unusual value. I don't know if the gui sets it or if the OP did. Whatever works...
I set this as 1/3 of my physical memory and it did work for me! Does it need changes?
Music Rockz is offline   Reply With Quote
Old 22nd January 2015, 04:34   #11  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Quote:
Originally Posted by LemMotlow View Post
The code in brackets "< >" will be inserted when you activate other options in MEGUI.
I can't understand this what you mean! Please clear!

Quote:
Originally Posted by LemMotlow View Post
Any line in an Avisynth script that starts with "#" is a comment. It will not be executed. These are the only lines in your script that will be executed:
SetMemoryMax(682)
TemporalSoften(4, 4, 8, scenechange=15, mode=2)
ConvertToYUY2()
ConvertToYV12()
fft3dfilter(sigma=1.6)
sharpen(0.22)
addgrain(0.18)
These are common for all sources... And scripts starts with '#' is for different sources! I remove the '#' to activate the script!

Quote:
Originally Posted by LemMotlow View Post
Filters like TemporalSoften and FFT3Dfilter are usually used with progressive video. DVD is interlaced or telecined.
According to the Analysis my dvd is progressive!

Quote:
Originally Posted by LemMotlow View Post
No one here has any idea what your video looks like, so we don't know what "enhance" means.
I mean the color corrections...Basic...To enhance the video quality color correction may be helpful for some DVD sources! Just I need common scripts, then I'll adjust them with the "AvsPmod"
Music Rockz is offline   Reply With Quote
Old 22nd January 2015, 04:38   #12  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Somebody order this script! The order of script may give a good quality! "This is said by an expert"

Generally, temporal smoothing and noise reduction should be before resizing.
Sharpening and add grain should be after resizing.
I'm not sure about color correction, probably after resizing and before sharpening.

And I just edited the script...Look above! Please add your knowledge to this with more filters!

Last edited by Music Rockz; 22nd January 2015 at 04:55.
Music Rockz is offline   Reply With Quote
Old 22nd January 2015, 05:44   #13  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Here is a sample of TC Rip movie downloaded from a website...
http://www.mediafire.com/download/4i...+TC+Sample.mp4

Anybody enhance this TC quality and post the (MeGUI) avisynth scripts you used for it...
Music Rockz is offline   Reply With Quote
Old 22nd January 2015, 10:42   #14  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Help about downloaded material it's not allowed in this web, if you want help to rip your DVD we need a sample from your source.

Don't exist a generic script to recode all DVD's, each one need their script.

A chain of filters like:

TemporalSoften(4, 4, 8, scenechange=15, mode=2)
<resize>
sharpen(0.22)
addgrain(0.18)
fft3dfilter(sigma=1.6)

don't have any sense for me, maybe work for a specific movie but with a good source you only destroy the initial quality.

Apply Denoisers/Degrain (TemporalSoften, fft3dfilter) before resize only if is needed.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 22nd January 2015, 14:13   #15  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Quote:
Originally Posted by tebasuna51 View Post
Help about downloaded material it's not allowed in this web, if you want help to rip your DVD we need a sample from your source.

Don't exist a generic script to recode all DVD's, each one need their script.

A chain of filters like:

TemporalSoften(4, 4, 8, scenechange=15, mode=2)
<resize>
sharpen(0.22)
addgrain(0.18)
fft3dfilter(sigma=1.6)

don't have any sense for me, maybe work for a specific movie but with a good source you only destroy the initial quality.

Apply Denoisers/Degrain (TemporalSoften, fft3dfilter) before resize only if is needed.
Thanks for your support!

I use this filters as example only! Then I'll adjust with the source using "AvsPMod"

Can you suggest me some examples for Denoisers/Degrain!

I still don't know the usage of RGBAdjust and YUY2, YV12 Color spaces! Can somebody guide me!

Last edited by Music Rockz; 22nd January 2015 at 14:16.
Music Rockz is offline   Reply With Quote
Old 22nd January 2015, 21:32   #16  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
We have no sample of your video, so there is no single answer. But apparently you have to learn more about the basics of video and processing. Not everyone will be a video engineer, but you must start somewhere.

Many beginners start at the AMV website, which has many articles related to video. The website is mostly about anime, but the principles apply to all types of video. You can start here: Improving Visual Quality with AviSynth Filters. The linked page has many examples of the use of Avisynth filters.

Another page is about color storage and colorspace: Colorspace. It is about RGB, YUY2, and YV12.

The main index to AMV articles and tutorials is here: A&E's Technical Guides to All Things Audio and Video.

If you want advice about a specific video, you must submit a link to a video sample. You can use free tools to make a sample of about 10 seconds or so. The sample should have motion or someone moving. Two free tools for making samples from DVD are MG2Cut2 and the DGIndex utility in DGMPGDEC. Both are free. You can also make a short sample with the free trial version of VideoReDo.
LemMotlow is offline   Reply With Quote
Old 23rd January 2015, 07:39   #17  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Quote:
Originally Posted by LemMotlow View Post
We have no sample of your video, so there is no single answer. But apparently you have to learn more about the basics of video and processing. Not everyone will be a video engineer, but you must start somewhere.

Many beginners start at the AMV website, which has many articles related to video. The website is mostly about anime, but the principles apply to all types of video. You can start here: Improving Visual Quality with AviSynth Filters. The linked page has many examples of the use of Avisynth filters.

Another page is about color storage and colorspace: Colorspace. It is about RGB, YUY2, and YV12.

The main index to AMV articles and tutorials is here: A&E's Technical Guides to All Things Audio and Video.

If you want advice about a specific video, you must submit a link to a video sample. You can use free tools to make a sample of about 10 seconds or so. The sample should have motion or someone moving. Two free tools for making samples from DVD are MG2Cut2 and the DGIndex utility in DGMPGDEC. Both are free. You can also make a short sample with the free trial version of VideoReDo.
I already been to this site! I learned many things from here! Some of my filter scripts are also taken from this!
Music Rockz is offline   Reply With Quote
Old 23rd January 2015, 11:45   #18  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by Music Rockz View Post
I already been to this site! I learned many things from here! Some of my filter scripts are also taken from this!
Then you should already know from reading those articles that YV12 is the colorspace almost always used for DVD. You should also know from reading that site that most of the filters shown will require YV12 color.

You can use your sample script for any video. If the script does not do what you want it to do, then change your script. We can't tell you which filters or which script to use for video that we haven't seen. Without a sample of what you want to do, our guess would be no better than your guess.

Last edited by LemMotlow; 23rd January 2015 at 11:49.
LemMotlow is offline   Reply With Quote
Old 23rd January 2015, 14:52   #19  |  Link
Music Rockz
Registered User
 
Music Rockz's Avatar
 
Join Date: Nov 2014
Location: Sri Lanka
Posts: 40
Quote:
Originally Posted by LemMotlow View Post
Then you should already know from reading those articles that YV12 is the colorspace almost always used for DVD. You should also know from reading that site that most of the filters shown will require YV12 color.

You can use your sample script for any video. If the script does not do what you want it to do, then change your script. We can't tell you which filters or which script to use for video that we haven't seen. Without a sample of what you want to do, our guess would be no better than your guess.
Here is a 1min sample of a DVD! In my DVD Collections this the worse one! Source : DVD5
http://www.mediafire.com/download/68...lxb/Sample.mkv

try your best guys and post the script!
Music Rockz is offline   Reply With Quote
Old 23rd January 2015, 17:20   #20  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Thank you for a sample, but...

Your sample is not an original cut from a DVD. It it is an mkv and appears to be re-encoded. The audio is over modulated and distorted. It has not been cut on a key frame or with smart rendering. It does not play correctly.

You don't have the original DVD?

Last edited by LemMotlow; 24th January 2015 at 11:39.
LemMotlow is offline   Reply With Quote
Reply

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 13:48.


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