#1  
02-14-2015, 10:15 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
Newbie to Vdub and filtering and was curious to know if there was anyway to improve color without the "shadow" effect as I call it. If you look around the band members and wherever color is rich, there's portions of unsaturated video. I added saturation to this via "hue/saturation/intensity" "colormill" and "graduation curves (mode hsv)".

Also , any other filters you can think of to help improve other areas you see would benefit would be greatly appreciated. It looks like to the left and bottom is monochrome.

Just fyi, I transferred from into computer as follows:

AG1980
TBC3000
Studio 1 Proc Amp
ATI AIW7500
Vdub AVI YUY2

...also marching uniform pants and drum major skirt should be dark blue .... drummers pants are black. (mentioning for what its worth in case it helps in giving me tips )


Attached Files
File Type: avi 1981CHS.avi (55.74 MB, 61 downloads)
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
02-15-2015, 06:24 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Thank you for the sample. We would really prefer to work with unprocessed edits from original capture files. Your sample has been converted from interlace YUV to progressive, uncompressed RGB -- which is part of the color problem, aside from the fact that the video was captured at very high IRE (meaning that your black levels are far too high and is largely responsible for the washed-out look you mention). I was wondring why you didn;t use your Studio 1 proc amp to adjust IRE levels and make use of its handy IRE levels meter.

To get an unmodified AVI cut from your original YUV or YUY2 capture, open the AVI in VirtualDub, make your cuts, then save the new sample using "Video..." -> "fast recompress" instead of full processing mode. Please don't deinterlace the sample from your interlaced original.

In any case, you might have to correct some serious problems in YUV before you can work on color. Does your original tape play with the obvious chroma smearing seen here? Some discoloration seems to come from incorrectly converting interlaced YUV to RGB/progressive, but it could just be old tape problems.

You will likely have some brightness level difficulties caused by the original camera's Autogain -- notice that your brightness levels are darker at the start of the clip when the sky is in the image, then gets brighter as the camera zooms in without sky, then gamma decreases when the bright tuba and other whites gain prominence. This is a common problem with consumer autogain; sometimes it can be improved, sometime you just have to live with it.

One small item: the name of the VDub curves filter is the "gradation curve", not "graduation". Or as the pricier software calls it, simply a "curves" filter.


edit;
Oops, I meant to say, "interlaced YUV" to "interlaced RGB". Sorry. However, there's a so-so and a better way of making that conversion for VirtualDub.
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-15-2015)
  #3  
02-15-2015, 11:13 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
I was wondring why you didn;t use your Studio 1 proc amp to adjust IRE levels and make use of its handy IRE levels meter.
Thanks Sanlyn. Well, I'm new to this stuff. I thought the blacks were too black too but I was reading the manual and it says to keep black levels so that the "7.5 LED is on and the 5 LED never comes on" I made sure it didnt ever hit 5 but maybe 7.5 is too much for this video. It also says in the manual that the gain will move around between 60 and 100. I tried adhering to these rules also. Maybe I need to use judgement over levels sometime or maybe am I doing something wrong?

Quote:
Originally Posted by sanlyn View Post
To get an unmodified AVI cut from your original YUV or YUY2 capture, open the AVI in VirtualDub, make your cuts, then save the new sample using "Video..." -> "fast recompress" instead of full processing mode. Please don't deinterlace the sample from your interlaced original.
Will try doing this tomorrow night. Yes, should have just made original clip but I wanted to show what was happening when I tried adding more color. Thanks for the suggestion.

Quote:
Originally Posted by sanlyn View Post
Does your original tape play with the obvious chroma smearing seen here? Some discoloration seems to come from incorrectly converting interlaced YUV to RGB/progressive, but it could just be old tape problems.
I was playing around in the filters to correct some chroma on those blue skies. In the original there is a lot of chroma in the sky portion of the video. Dont know if the forum allows links but if it does, here is a xtube vid I posted several years ago that shows some of what I'm dealing with. I did use Roxio software to do this and yes, I realize the tube has manipulated the heck out of the video but maybe you can get some idea. http://youtu.be/YbTt8giw9ag


Quote:
Originally Posted by sanlyn View Post
One small item: the name of the VDub curves filter is the "gradation curve", not "graduation". Or as the pricier software calls it, simply a "curves" filter.
lol Thanks for correcting me on that! It was late and I'm still learning.

Ok .. I'll try to get a new sample posted tomorrow night sometime . Thanks!
Reply With Quote
  #4  
02-16-2015, 05:34 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
Quote:
Originally Posted by sanlyn View Post
then save the new sample using "Video..." -> "fast recompress" instead of full processing mode.
Why not "direct stream copy"? That's what I use.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: sirbyron (02-16-2015)
  #5  
02-16-2015, 06:23 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Yep. Direct stream copy works too.

@sirbyron: The first video sample appears to have been captured using composite cable. That's a guess, but that's what some of the chroma noise looks like. Use the s-video output on your AG-1980, not composite. Don't confuse "SVHS" with "s-video". SVHS is a tape format, just as VHS and DVD are formats. s-video is a type of data transmission that can be used with VHS, SVHS, DVD, etc.

What you say about the 7.5 and 100 IRE levels on the proc amp luma meter is correct, but not all scenes aor images will fill up all the lights. The meter is used to avoid dark crushing and bright clipping when scenes hit the extremes. Not all scenes will look that way. This is especially true of home made video and tape, where luma and color changes will vary from shot to shot, and even within scenes. The meter is used for monitoring and correction in worst-case scenarios. There will be lots of post-processing fixes anyway. No one ever made a VHS capture with "perfect" levels everywhere. Some tapes can be ornery, with some segment or other that is so out of whack with the rest of tape tape that it 's often recaptured with better settings and patched into the main video later. After a couple of caps you'll get a feel for what can be fixed later and what's just screwed up. Also, remember that black borders will often make the IRE 5 light 'blink" somewhat. If you see that IRE 5 or the "CLIP" lights are on or blinking all the time, it's trouble.

Losslessly compressed huffyuv or Lagarith will be around 1/3 the size of the same uncompressed clip.
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-16-2015)
  #6  
02-16-2015, 07:19 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
I keep trying to save under the file names you both suggested but anything other than "Full Processing Mode" keeps giving me a green screen with audio. What am I doing wrong?

-- merged --

Ok ... somehow got the "green screen" issue fixed. Recaptured video and saved via "fast recompress"

@sanlyn: I did capture via Svideo. This is a second generation (maybe third) "SP" copy if that makes a difference..I'm sure it does. Really wish I had the original but that just cant be done. I bumped the settings on the proc amp by 1 notch (black and gain to the right one). On the previous edited sample the black was at O and the gain was pretty much zero .. maybe a hair to the right. This is pretty much the same way it comes out of my AG1980. Maybe a hair darker without the proc amp but not much. If I try going any brighter (turning gain or black to the right) it just washes everything out too much. I still see some very dark black areas but as I say, if I try getting rid of them, it washes everything out.

I hope I saved the file correctly. After I cut the areas I went as follows:

>Video>Compression>Huffy v2.1.1 (original setting was uncompressed RGB/YCbCr)
then:
>Video>Fast Recompress
then:
>File>Save As AVI

Hope this helps.

ALSO... Is it common to then take the saved file in VDub and then edit it more in another editor like Adobe or one similar? If so, do you recommend one or better yet a free one? Vdub has got a ton of stuff so I dont know if what I am asking even makes sense! Avisynth comes to mind. Like I say I am new to this but does Avisynth work pretty much like Vdub or more of a totally different application?


Attached Files
File Type: avi Chs1981Sampleb.avi (94.68 MB, 22 downloads)
Reply With Quote
  #7  
02-17-2015, 06:54 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
Some serious hobbyists are a bit too anal when it comes to re-encoding. Yes, avoid it when you can, but some of them make an already-difficult project *more* difficult by trying to avoid more encode passes. Yes, it may save some time or space, but I'm more worried about human time, not CPU time. I'm not at all worried about space.

As long as re-encodes are lossless, it's fine. Video allows for quite a few re-encodes before damage takes place. The key is to learn what kind of re-encodes are okay, and which are not. Even high-end lossy encodes like ProRes422 are fine.

For example:
Capture
> Avisynth > VirtualDub, re-encode
> more VirtualDub, re-encode
> Premiere, re-encode
> MPEG-2 final encode

^ This is typical for tape work, and plenty fine if it stays in the lossless domain.

Frameserving to Premiere, for example, trying to avoid re-encodes, is a giant PITA. The project will take *much* longer that way!

Do pay attention to colorspaces. That's what gets you.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: sirbyron (02-17-2015)
  #8  
02-17-2015, 01:27 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by sirbyron View Post
This is a second generation (maybe third) "SP" copy if that makes a difference..I'm sure it does.
It sure does. Great way to bork a video. Ouch!! But work with what you have, there's no other source.

Thanks for the new sample. However....

Quote:
Originally Posted by sirbyron View Post
I bumped the settings on the proc amp by 1 notch (black and gain to the right one). On the previous edited sample the black was at O and the gain was pretty much zero .. maybe a hair to the right.
Oh my. The opposite of what you should have done. The new sample is brighter. Remember, the black borders are going to stay near the left side of a histogram (that's where black is). Adjust "black" counter-clockwise or whatever to adjust blacks, then adjust gain to increase/decrease the brights. The two controls interact, so you often have to juggle a bit between them. With most tapes it'll never be perfect. Correct more later in post-processing. All you accomplished by turning up both controls was to brighten darks and brights alike, and make gamma correction all but impossible.

However, it should have been obvious in the preview window that the frame below (frame 166) and all the others are far too bright:


Histograms and other 'scopes make it very clear. Below, the left-hand image is the simplest of Avisynth histograms ("Levels" mode) is , the right-hand image is VirtualDub's ColorTools RGB histogram:


[above, left]: The left-ward pointing pink arrow on the left side shows the shaded "unsafe range" below RGB 16 -- OK for a black border to be in this area. The pink arrow pointing to the right of the graph shows the unsafe area over RGB 235 -- data in this area for frame 166 shows bright clipping. When brights are clipped, it's another term for "per5manently destroyed". The downward pink arrow in the middle of the Avisynth Levels 'gram shows that the blackest point for objects in the image are around RGB 40, way too high. Note that the highest peaks in the histograms (midpoints) are shoved to the right -- midpoints should usually be closer to the middle, dashed line. Flesh tones normally would be in the mid area.

[above, right]The RGB histograms show the black border at the far left. Midtones and everything else are shoved to the right. The up-pointing pink arrow shows where the black point lies, which is nowhere near "black". It's not just darks that are washed out, it's almost everything in the image.

Below, an RGB waveform monitor. In this type of display, darks are at the bottom of each channel, brights are at the top. The pink left-arrow points to RGB-0 black, which is where the video's black border is. Along the bottom of each horizontal channel, note the gap with no specs or other info along the bottom of the channels (darks are too bright). Four pink arrows point upward to the top of each channel, showing how luma and colors are shoved to the top and flattened out -- indicating hard clipping.


Attached is a video of the sample clip, showing another problem. Consumer camera autogain is the work of the devil. Causes no end of grief. As the video plays, you'll see on the right side how a histograms tracks level and saturation changes every time the camera moves. The histogram has a frame counter. At one point the histogram values zoom off to the right, outside valid video range. At the very end of the clip, note how the big peak in the middle (gamma) snaps visibly darker when the gal turns away and brighter objects take over.

You can correct some of this later with filters, but not all of it. Don't ever try to correct it with another autogain filter during capture -- it will just make it worse.


Attached Images
File Type: jpg frame 166 - original.jpg (37.2 KB, 446 downloads)
File Type: png frame 166 - original YUV-RGB.png (31.5 KB, 444 downloads)
File Type: png frame 166 - RGB waveform.png (223.2 KB, 442 downloads)
Attached Files
File Type: mp4 CHS_histogram_play.mp4 (5.64 MB, 24 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: bar72 (08-21-2023), sirbyron (02-17-2015)
  #9  
02-17-2015, 02:39 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by sirbyron View Post
ALSO... Is it common to then take the saved file in VDub and then edit it more in another editor like Adobe or one similar? If so, do you recommend one or better yet a free one? Vdub has got a ton of stuff so I dont know if what I am asking even makes sense! Avisynth comes to mind. Like I say I am new to this but does Avisynth work pretty much like Vdub or more of a totally different application?
Edit and make other mods in just about anything, but keep it lossless huffyuv or Lagarith until the final encode. Most free editors don't offer much in the line of features, and none offer VirtualDub's color filters except for the big "pro" guys from Adobe and SONY, etc.

Avisynth is a scripted utility. Scripts are most easily run in VirtualDub (for me, anyway). There are currently several threads in progress that use Avisynth. I had to use Avisynth to make levels corrections and other cleanup with these samples, with most of the color attempts in Virtualdub.

The captured samples are, basically, overexposed. This means more than just a bright picture and makes many corrections look weird because you're using filters to try to overcompensate for capture errors. Trying to stretch distorted luma and chroma almost always look, well, overworked.

original frame from sample-b. It should have been obvious during capture that the image is too bright. And take note of the lighting in this image. It's late afternoon sunlight from off right, so the lighting itself should look at least slightly warmish, some areas would be tinted with Fall colors. Autocolor on the camera twisted the histogram around rather crudely -- and, yeah, the color balance changes slightly but visibly during the zoom. Pretty tough to work with.


Overwroughrt effort at correction, involving 6 Avisynth plugins and three chained gradation curves:



Where you end up will be a matter of (a) personal preference, (b) using the right tools, (c) learning to work with histograms, and (d) patience. Much better to get as close as you can during capture and avoid a lot of hard work.


Attached Images
File Type: jpg frame 251 original.jpg (60.0 KB, 442 downloads)
File Type: jpg frame 251 new.jpg (81.6 KB, 440 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-17-2015)
  #10  
02-17-2015, 06:17 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
That's probably oversaturdated some.
The blacks are little too crushed. Is your monitor IPS and calibrated?
Align the chroma.
Did you remove that black comet (magnetic dropout)?
Yes, crude, but good sample of where the color can go. VHS has many possibilities.

I really need to get that guide for Avisynth usage done. I may try to do that this weekend finally.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: sirbyron (02-17-2015)
  #11  
02-17-2015, 08:27 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by lordsmurf View Post
That's probably oversaturdated some.
Yep. I thought so too, later. Official Standard Operating Procedure:
1. work 'til it looks about right.
2. come back half a day later and check.
3. go to step 1.

Quote:
Originally Posted by lordsmurf View Post
The blacks are little too crushed.
They're crushed in the original. See darkish gray "patches" in earlier image.

Quote:
Originally Posted by lordsmurf View Post
Is your monitor IPS and calibrated?
Yes. both of 'em. Corollary #5 to Official SOP: don't work in bright light.

Quote:
Originally Posted by lordsmurf View Post
Align the chroma.
ChromaShift(c=-6,u=-2,L=-4)
MergeChroma(awarpsharp2(depth=30))
MergeChroma(awarpsharp2(depth=20))
(Tried dehalo's and some masking too, but some edges are just too ragged to hold up).

Quote:
Originally Posted by lordsmurf View Post
Did you remove that black comet (magnetic dropout)?
Yes. A few thinned-out, short pale whities survive here and there. Mostly gone.


Quote:
Originally Posted by lordsmurf View Post
Yes, crude, but good sample of where the color can go. VHS has many possibilities.
LOL, if see it again 2 days from now it'll look different again.

Quote:
Originally Posted by lordsmurf View Post
I really need to get that guide for Avisynth usage done. I may try to do that this weekend finally.
Great! A fairly rough draft will likely do. As soon as it's posted, 2000 readers will want to change it anyway.

Thanks for the feedback. As usual, lordsmurf keeps us slackers on the ball.

Last edited by sanlyn; 02-17-2015 at 08:42 PM.
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-17-2015)
  #12  
02-17-2015, 08:32 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
Quote:
Originally Posted by sanlyn View Post
1. work 'til it looks about right.
2. come back half a day later and check.
3. go to step 1.
Yep.

Quote:
Yes. both of 'em. A lesson neglected: don't work in bright light.
And let you eyes adjust afterwards! Learn from my mistakes.

Quote:
Great! A fairly rough draft will likely do. As soon as it's posted, 2000 readers will want to change it anyway.
If the readers have good advice, I'm always open to it.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: sirbyron (02-17-2015)
  #13  
02-17-2015, 10:01 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
Well, first off thanks again to you both. I'm really "slowly" learning stuff here and love it.

The edited still looks super Sanlyn! ...maybe a "tad much saturation" but hey .. I like it. I didnt know about the "colortools" plugin and the histogram. Heard of it before but didnt know exactly what it was. I did run several passes through and checked it before I uploaded it here. Is this one ok before going on to the processing round? As much as I tried working to get those dark blacks out, I just couldnt. I turn it one way and they get worse along with every other dark shade turning black (meters at 5 and even worse). Then turn the other way and they dont really even change much. The video just gets too white like the first "sampleb", even when trying to adjust the gain with it. Is it just the tape condition causing this or am I still doing something wrong? I dont see how though as much as I've been working it.

I dont have Avisynth so I couldnt run that histogram. Ok, let me know about this one. Thanks.


Attached Files
File Type: avi Chs1981Samplecc.avi (85.95 MB, 11 downloads)
Reply With Quote
  #14  
02-18-2015, 07:53 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Thanks for the new Sample C and your patience. Looks better and will be easier to work with. So, from this capture I get a clearer idea that the original tape is pretty well washed out to begin with. We've seen worse -- a dupe tape-to-tape made at the wrong IRE setting is pretty common. But the image below shows that brights have better detail and colors don't look as weird:



Doesn't look that much different than earlier, but nevertheless it is. I guess you learned a little about the proc amp as well, seems that you used settings that pulled darker detail down to a workable level and kept brights from blowing away in that big spike during the zoom. Good work. The RGB histogram ain't perfect, but it's a better starting point and can be fixed in post processing. Crushed blacks and clipped brights, though, would be irreparable.

A note on these histograms. There are a whole slew of histogram types. They all show the same thing, just in different ways. The histogram shown here is common. It breaks down each color and the overall brightness level, making things a little more intuitive. YUV histograms are used to show how video data in a YUV colorspace is stored. Most RGB histograms show video data as displayed on a PC or TV. The type of YUV data storage in VHS/DVD/BluRay uses a colorspace that can contain a wider range of contrast and chroma levels than sRGB (PC's) or TV-RGB. When converting from YUV to RGB, YUV values that exceed RGB 0-255 (RGB 16-235 for TV) will get clipped in RGB. So, that conversion should be managed with some care. Avisynth has simple DOS-like conversion filters and settings that do it properly. It's usually the case that bad levels in YUV can best be corrected in Avisynth using the original YUV data. I do most color work in RGB (VirtualDub, After Effecfts, etc.), but I use Avisynth for prep work. TMPGenc's encoders have excellent color filters that work in YUV and RGB.

I guess you see Avisynth mentioned all over the place. Don't be intimidated. It can be used on a super-arcane geek level, but also on a more basic level for simple but often essential tasks that otherwise must be managed with high-priced stuff that most of us mere mortals can't afford. Many hobbyists on the planet use it and -- surprise, surprise -- so do many pros. An Avisynth script is simply a text file that can be opened in VirtualDub like a regular video, and VirtualDub can be used to monitor Avisynth's output so you can see exactly what's going on.

I'll work with this Sample C critter today. I'm capturing a tape right now on another PC. So I guess today is another day for multi-tasking!

Quote:
Originally Posted by sirbyron View Post
I dont have Avisynth so I couldnt run that histogram. Ok, let me know about this one. Thanks.
It's actually simple. Might not seem that way at first, but folks do it all the time. The Avisynth text script opens the AVI, and somewhere in that script you add this statement:
Code:
Histogram(mode="Levels")
The Histogram function can be set for other modes that display different kinds of 'scopes. Avisynth's help file on that function or command explains it all. Not all that complicated.


Attached Images
File Type: jpg frame 311 - sample C RGB.jpg (66.7 KB, 433 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-19-2015)
  #15  
02-18-2015, 11:47 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
I'll work with this Sample C critter today. I'm capturing a tape right now on another PC. So I guess today is another day for multi-tasking!
Thanks! I'm getting in pretty late so tomorrow night I'll read through this post some more. Lots of good info I am soaking up here and much appreciative!

So I guess I need to "download" an Avisynth file(program) to use it?
Reply With Quote
  #16  
02-19-2015, 08:03 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by sirbyron View Post
So I guess I need to "download" an Avisynth file(program) to use it?
It has a learning curve, depending on how deeply you want to get into it. Give yourself time. There are several versions. Stick with 32-bit only (there's a 64-bit version but hardly any 64-bit filters, so don't even go there).

The very latest version is RC1, but it hasn't been around long enough for a final judgment. The preferred download for newbies (which includes all of us perpetual newbies, I think!) is Avisynth 2.6.0 Alpha 5. They're all listed here: http://sourceforge.net/projects/avis...lpha_Releases/ . Look for "AVS 2.6.0 Alpha 5 [130918]" near the top of the list. Create a new folder in your PC -- call it "AVS26" for short -- so you can keep it in that separate folder. Don't worry, you'll soon have some subfolders in that main folder.

Click on the link to AVS 2.6.0 Alpha 5 and you go to a new page to download "Avisynth_130918.exe" into your new folder. This is the installer, which is pretty straightforward. When it runs, take the defaults, but further down in the default list you can check an item to associate .avs scripts with Notepad -- which means that if you have an avs script in your computer and you double-click, it will open in Notepad. Don't associate it with other stuff like media players.

The default install location is "C:\Program files\Avisynth 2.5". If you're using 64-bit Windows, the default is "C:\Program files (x86)\Avisynth 2.5). Yes, it likely says "2.5" instead of 2.6, but that's a convenience for those who have 2.5 versions already on their computer. If the default location says "2.6", accept it and don't worry about it. The default drive location is your C: drive, but you can change that (mine is installed in "D:\Avisynth 2.5" in case I lose my operating system but want to keep my Avisynth plugins folder separate and intact). If you have no other drives or partitions, then C: is your only choice. Wherever you install it, that drive and location will be a registry entry, so don't move or rename that installed folder.

The Avisynth program folder will be rather small one with a handful of files and a couple of subfolders. One thing you won't see there is something called "Avisynth.exe" because there's no such file name. The main engine for Avisynth is Avisynth.dll, which will be in your Windows system32 or Windows SYSWOW64 in 64-bit systems. Don't save your home-made .avs scripts in Avisynth's folder. Most people keep their scripts in a folder with their video project.

In your Windows program listings you'll see a program group for Avisynth. There's a subfolder in that program group for the online documentation. The same documentation is on the 'net at the Avisynth Wiki (http://avisynth.nl/index.php/Getting_started).

First script: First timers are told they can make the simple "version" script and run it in a media player. Well, that depends on the player and the system. Just use VirtualDub to run .avs scripts to avoid a hassle. You'll do it that way most of the time anyway. Yes, you can use other apps -- for example, there's an After Effects plugin for Avisynth.

If you want to open one of your videos with Avisynth in VirtualDub, make a script for it in Notepad. In Notepad be sure to use "Format" -> and turn off Word wrap. When you save the script, look at the bottom of Notepad's window for the "Save as type" entry panel. Change it from "Text documents (.txt)" to "all files". Then save the script with whatever name you want, but be sure to add ".avs" at the end of the file name so that Windows won't automatically append ".txt" to the name.

To run the script, open VirtualDub, go to "File..." -> "Open video file...", find the .avs script, and open it. Voila!

If you have a problem, it's usually a typo. You can leave VirtualDub open, open the script in Notepad in a separate window, make changes, then in VirtualDub use "File..." and the open dialog again to re-run it.

I used this script to open your sample C just to watch it without doing anything:

Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
Note the path statement in quotes. That's where your video is located on my 'puter. Change that drive and path statement to match the location of the video in your system.

If you wanted to prepare that YUY2 video for use with VDub's RGB filters, you should do it this way:

Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
ConvertToRGB32(matrix="Rec601",interlaced=true)
Again, don't forget to change the path to match your system. The AviSource() and "ConvertToRGB32()" functions are built-in Avisynth commands, so no extra filters are needed.

To view that YUV histogram I mentioned, you'll have to add a few lines:

Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
ConvertToYV12(interlaced=true)
Histogram(mode="levels")
ConvertToRGB32(matrix="Rec601",interlaced=true)
You can bypass that YV12 and Histogram change by deleting them -- Or, to keep it around for later use you can comment-out the two lines. A comment is indicated by "#". Comments are not executed. I show the # in blue here:

Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
# ConvertToYV12(interlaced=true)
# Histogram(mode="levels")
ConvertToRGB32(matrix="Rec601",interlaced=true)
While you have that script open in VirtualDub, stop it on any frame. Leave VirtualDub open as-is, and in Notepad, change the script to the following and save it:

Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
ColorYUV(off_y=-8)
ConvertToRGB32(matrix="Rec601",interlaced=true)
In VirtualDub use "File..." -> "reopen video file". After a second or two the same frame will display and will show the darker frame as adjusted in the script.

ColorYUV() is a built-in filter. Have fun.
Reply With Quote
The following users thank sanlyn for this useful post: sirbyron (02-19-2015)
  #17  
02-19-2015, 09:01 PM
sirbyron sirbyron is offline
Free Member
 
Join Date: Jun 2012
Location: NC, USA
Posts: 46
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
Code:
AviSource("E:\forum\sirbyron\Chs1981Samplecc.avi")
ColorYUV(off_y=-8)
ConvertToRGB32(matrix="Rec601",interlaced=true)
In VirtualDub use "File..." -> "reopen video file". After a second or two the same frame will display and will show the darker frame as adjusted in the script.

ColorYUV() is a built-in filter. Have fun.
Ahh.. Very interesting changing the ColorYUV values around. Dont really know what I'm doing yet but as I change the value + or - certain degrees I see it does brighten and darken the clip. Will continue to experiment and try reading up on some scripts.

Just to make sure I am understanding correctly... The first line of the code will be the file location and the last line will always be "ConvertToRGB32(matrix="Rec601",interlaced=tru e)" when opening up the file in Vdub. Anything in between these lines is an edit script or a "viewer ... ie histogram".

So I would never alter the "ConvertToRGB32(matrix="Rec601",interlaced=tru e)" line if I always edit my videos as I am currently doing? Just for curiousity, what does matrix="Rec601" mean?

As I understand it, anything done in Vdub is "after" it is being edited in Avisynth? In other words, if it were a chain it would be:
1) Avisynth opens up. (Inside of Vdub)
2) Edits are performed in Avisynth using scripts
3) Avisynth Converts to RGB (per script in code)
4) Then Vdub takes it from there to perform more edits.

Ok.. enough for the brain tonight. I'll read up on some Avi scripts.

Quote:
Originally Posted by sanlyn View Post
Overwroughrt effort at correction, involving 6 Avisynth plugins and three chained gradation curves:
On the sample b you worked on, you mentioned "plugin". Is this the same as a script? And were the 3 gradation curves in Vdub?

Also wanted to ask... are the "TMPGenc's encoders" for the final output file? Or are they additional editing encoders?

And just visited 'Smurfs post on Avisynth scripts here ... cant wait: http://www.digitalfaq.com/forum/news...-avisynth.html Thanks Lordsmurf!

Ok... starting on the "fun".

Last edited by sirbyron; 02-19-2015 at 09:26 PM.
Reply With Quote
  #18  
02-19-2015, 11:12 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,631
Thanked 2,458 Times in 2,090 Posts
I hate color correcting in Avisynth, and almost never do it.

I'd rather use:
- VirtualDub, especially Color Mill
- Adobe Premiere, and I use CS4

For me, Avisynth is only used for specific errors that are not as easily done in Vdub or Premiere.

Script-based corrections take forever. This really is a GUI workflow.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: sirbyron (02-20-2015)
  #19  
02-20-2015, 07:09 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Quote:
Originally Posted by sirbyron View Post
Ahh.. Very interesting changing the ColorYUV values around. Dont really know what I'm doing yet but as I change the value + or - certain degrees I see it does brighten and darken the clip. Will continue to experiment and try reading up on some scripts.
The sample script above contains what you'd call stock tools (functions) with commonly used settings. I'd do most color work in VirtualDub, After Effects, or often with TMPGenc encoders' color filters. Filters like ColorYUV are generally used to fix invalid video levels in the original colorspace before moving on. http://avisynth.nl/index.php/ColorYUV

Quote:
Originally Posted by sirbyron View Post
Just to make sure I am understanding correctly... The first line of the code will be the file location and the last line will always be "ConvertToRGB32(matrix="Rec601",interlaced=tru e)" when opening up the file in Vdub. Anything in between these lines is an edit script or a "viewer ... ie histogram".
Well...Not exactly, but close. The first line isn't always "AviSource" -- but, naturally, if you want to do anything in Avisynth, you first have to open the video. A script is executed line-by-line, in order as they appear in the script. Most Avisynth filters run in YUV; you want to stay in that colorspacxe until time for something else.

AviSource is a function that accesses a video source. You have to tell AviSource the filename and location. The stuff in parentheses is the value we give a function to work with (technically known as the "argument", but we just call it parameter, value, setting, etc.). AviSource opens specific video types. It requires that the video's codec is installed on your PC. If your source files are compressed with huffyuv, and huffyuv is in your system, you're safe so far.

AviSource can also open many DV-AVI files. It assumes you have a proper DV codec installed, or it gets really upset. Other internal and external functions open other formats: DirectShowSource, FFMS2, NicAudio, QTSource, MPEG2Source, etc.

Quote:
Originally Posted by sirbyron View Post
So I would never alter the "ConvertToRGB32(matrix="Rec601",interlaced=tru e)" line if I always edit my videos as I am currently doing? Just for curiousity, what does matrix="Rec601" mean?
You can alter that line if necessary. If the file isn't interlaced, you don't need "interlaced=true". The default interlace value is false. "Rec601" is an RGB 16-235 color matrix for conversion and scaling between color systems. There are other possibilities. You might not need VDub filters, so you wouldn't need RGB conversion. Avisynth's developers have optimized those conversions, something that many apps -- including some very big names -- don't do properly.

Quote:
Originally Posted by sirbyron View Post
As I understand it, anything done in Vdub is "after" it is being edited in Avisynth? In other words, if it were a chain it would be:
1) Avisynth opens up. (Inside of Vdub)
2) Edits are performed in Avisynth using scripts
3) Avisynth Converts to RGB (per script in code)
4) Then Vdub takes it from there to perform more edits.
You can apply VDub filters to incoming results from Avisynth -- in fact, while the results come in. But it does slow the overall process, maybe a little, maybe a lot. Some Avisynth industrial-strength filters are so pokey you'll go bonkers trying to tweak your VDub stuff and waiting for a frame to refresh. You can save Avisynth output to another lossless AVI, then open in VDub later.

Quote:
Originally Posted by sirbyron View Post
On the sample b you worked on, you mentioned "plugin". Is this the same as a script? And were the 3 gradation curves in Vdub?
"plugin" = "filter". You put your VirtualDub filters in your VirtualDub "plugins" folder, right? Same with Avisynth. VirtualDub filters have .vdf file names. Avisynth has .dll, .avs, and .avsi. Many Avisynth filters are actually scripts, for techy reasons best known to their developers.

Quote:
Originally Posted by sirbyron View Post
Also wanted to ask... are the "TMPGenc's encoders" for the final output file? Or are they additional editing encoders?
They're standalone encoders for final output. Ye olde TMPGenc Plus 2.5 is still a good MPEG encoder with nice color filters. Newer versions have more edit functions but basically they're encoders. Another good MPEG encoder (free) is HCenc, which takes its input from AVisynth.

Don't forget: lots of documentation is installed by Avisynth. Go to "Start" -> "All programs" -> "Avisynth 2.5". Expand that program group and click on "Avisynth documentation". On the first page, at the top left you'll see a top banner labeled "OVERVIEW". Just under that is a small grid with the letters "a b c d" to z. Click on a letter to see the grim details about functions whose names start with those letters. You'll never use most of those functions. The page's left-hand margin lists other goodies, like how to use "#" and "\" and other tricks. The same content is available at this website: http://avisynth.org.ru/docs/english/.

Don't try to grasp everything. You can get worn out quickly. Let it "drip" in as it's needed. You definitely will not need 100% of this stuff, not by a long shot.

Been busy here lately, but I'm working on your sample C and will post soon. Maybe others will come up with something as well.
Reply With Quote
The following users thank sanlyn for this useful post: ragu0012 (03-24-2018), sirbyron (02-20-2015)
  #20  
02-20-2015, 12:03 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,308 Times in 982 Posts
Okay. What follows might be tough, ir easy, but you have to start somewhere.

Working with crappy video requires heavy hitters from Avisynth. People will have different idfeas about exactly how to handle something, but one of the essential tools in Avisynth is QTGMC. It comes as a script ending in .avsi, and it's a long, long piece of text. It does a lot of work. Mainly it deinterlaces, but also denoises. It can generate some repairs, too. To do all that it depends on a several support files (plugins), most of which are standalone filters in their own right.

There are three types of Avisynth plugins:
- A .dll file, which Avisynth can find automatically when it starts.
- An .avsi text file, a script that Avisynth can find when it's needed.
- A plain .avs script, which you have to load manually with the Import() function.

All plugins belong in Avisynth's plugins folder. Many plugins download as a package containing multiple files, such as the plugin itself and some documentation. Don't downlodd these directly into Avisynth plugins. Make yourself a folder on your PC and call it "AVS" or "filters" or whatever you want. Inside that folder, make subfolders for every Avisynth filter that you download (you'll soon have utter chaos without those little subfolders, as you will discover today!). Download the package to a subfolder you create for it, then unzip it in there. All you need to copy into Avisynth's plugins will be the plugin itself. Don't put html's, read-me's, or other stuff in the plugins folder. When you later find more info on that filter, you'll have a place where you can keep and quickly find your notes.

Many cleanup filters work only with deinterlaced video. Never fear; you can reinterlaced later. For VirtualDub color work, it can usually be interlaced. There are many Avisynth deinterlacers, but for repair and sharp output you need QTGMC. No substitute, really. So we may as well start with that.

I started work on Sample C by trying to clean some color corruption. This is almost always done in Avisynth in the video's initial colorspace, which for sample C is YUY2. You'll have to change that colorspace for some filters, but there's a proper way to do it.

I started with this deinterlaced frame (370). Its original interlaced frame number is 185. To help you s ee what's being worked on, I added color saturation to the orighinal frame. Eventually you'll have add saturation anyway:


Four pink left-pointing arrows indicate chroma smear, bleed, and displaced color (chroma shift). In the lower right, note that the curved logo on the podium seems to have 5 color bands -- there should only be 4 -- and the "C" has some blue bleeding into it. The left border has some cute pink and blue lines we can do without. If you later sharpen this junk, it looks worse.

Below, after running some Avisynth plugins. It'll never get completely clean, but this will do for a start. Can do more later in RGB for better color.


In the next post I'll show the script I used and how to load the filters.


Attached Images
File Type: jpg frame 185 - original -saturated.jpg (65.4 KB, 384 downloads)
File Type: jpg frame 185 - after -saturated.jpg (66.9 KB, 382 downloads)
Reply With Quote
The following users thank sanlyn for this useful post: Delta (04-19-2023), sirbyron (02-20-2015)
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
VHS restore filters using Avisynth and VirtualDub - advice? Zoink187 Restore, Filter, Improve Quality 13 07-24-2014 09:38 PM
Applying different filters to different parts of the video in VirtualDub naripeddi Restore, Filter, Improve Quality 2 03-13-2013 03:22 AM
Unfolding fields before applying Virtualdub filters unclescoob Restore, Filter, Improve Quality 10 10-02-2011 09:18 PM
VirtualDubMPEG - applying different filters to different sections, color correction unclescoob Restore, Filter, Improve Quality 10 09-28-2011 10:05 AM
VirtualDub (with Filters Pre-loaded) for Restoring [DOWNLOAD] admin Restore, Filter, Improve Quality 0 12-11-2010 06:11 AM

Thread Tools



 
All times are GMT -5. The time now is 06:26 AM