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 11th August 2014, 23:20   #821  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
I use AVISynth 2.60, build:Mar 9, 2013 (2000-2011 Ben Rudiak-Gould). It works with both Fred's script, as well as my multi-threaded script that is an offshoot of his work.
johnmeyer is offline   Reply With Quote
Old 12th August 2014, 02:55   #822  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Ultimist View Post
Can someone tell me which version of Avisynth these scripts are compatible with? I've tried the 2.5 and 2.6 MT versions... and Avisynth+, but I keep getting multiple errors and crashes no matter what I try.
The plugins that this script requires (and supplies) are all Avisynth 2.5 plugins so the script should work with 2.5.8, 2.6, and Avisynth+ without any problems (I use 2.6 Alpha5/2.6 MT and it works). Maybe it would best if you can post the exact error messages.
Reel.Deel is offline   Reply With Quote
Old 12th August 2014, 04:32   #823  |  Link
Ultimist
Registered User
 
Join Date: Dec 2011
Posts: 18
Most programs I've tried (Virtualdub, etc.) just crash out without giving me much info.

But AvsPmod generates the following error messages using johnmeyer's altered script on a video:

Traceback (most recent call last):
File "avsp.pyo", line 9379, in OnMenuVideoToggle
File "avsp.pyo", line 14234, in ShowVideoFrame
File "avisynth.pyo", line 464, in GetFrame
WindowsError: exception: access violation reading 0xFFFFFFFF

This happens no matter which version of Avisynth I have installed, it seems.

Could the problem be that I'm on Windows 8.1 x64? Maybe Avisynth doesn't work with this OS?
Ultimist is offline   Reply With Quote
Old 12th August 2014, 04:50   #824  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Are you using the plugins provided with the script in the first post?
Reel.Deel is offline   Reply With Quote
Old 12th August 2014, 19:01   #825  |  Link
Ultimist
Registered User
 
Join Date: Dec 2011
Posts: 18
Yes, I even double checked to be sure. I'm using the provided plugins & dll's.

I'm wondering if it is K-Lite Codec pack or that damn LAV Decoder/Splitter/Virus

I've tried enabling and disabling all sorts of codecs/splitters, etc. using the codec tweak tool from K-Lite.

The video I'm trying to use with Avisynth is compressed with Lagarith, no audio. In Windows 7 x64 it worked just fine with Avisynth (same video) but since upgrading to Windows 8.1 x64 (clean install) I can't get these cleaning scripts to work... also having trouble with QTGMC and AnimeIVTC as well. Ugh... I want to pull all my hair out. I *need* these to work.

Last edited by Ultimist; 12th August 2014 at 19:44.
Ultimist is offline   Reply With Quote
Old 12th August 2014, 22:25   #826  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Using what source? FFVideoSource, LWLibavVideoSource, and Avisource (with Lagarith VFW installed) would be preferred for that; DirectShowSource is generally the option of last resort. (That's the only way K-Lite or Lav filters would be used.)
foxyshadis is offline   Reply With Quote
Old 15th October 2014, 17:23   #827  |  Link
jriker1
Registered User
 
Join Date: Dec 2003
Posts: 485
If I wanted to use Fred's or John's modified version of the script and my video won't load properly using AVISource and needs DirectShowSource can the script be modded to work? I know using AVISource and just passing .killaudio() works, but there must be something in the script stopping it from working. Have seen in the past with DV content that DirectShowSource usually loads better for me. If I try loading the avs file in Windows Media Player it just crashes.

Note the computer I'm working on has no working soundcard so have seen it cause issues in the past but not sure if that's the case here when as mentioned AVISource works fine with the killaudio flag, just not here.

Another note, loads in VirtualDub but the minute I try to move thru the video it crashes with "An out-of-bounds memory access (access violation) occurred in module 'ntdll'...
... reading address DDDDDDDD."

If I open it in VirtualDubMOD I get: "Couldn't locate decompressor for format 'YV12' (unknown)". Then also get a memory error.

JR

Last edited by jriker1; 15th October 2014 at 17:51.
jriker1 is offline   Reply With Quote
Old 16th October 2014, 11:02   #828  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by jriker1 View Post
If I open it in VirtualDubMOD I get: "Couldn't locate decompressor for format 'YV12' (unknown)". Then also get a memory error.

JR
Simple solution: install a YV12 decompressor.
Hint: Helix

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 17th October 2014, 17:10   #829  |  Link
papcom
Registered User
 
Join Date: Feb 2002
Location: Southwest Germany
Posts: 169
visible Halo's around moving objects

I have processed several 8mm movies with the scripts of Videofred and JohnMeyer. I am really astonished about the good results I get with my 8mm films and these script-processing. I was able to restore, decoloured, grainy, shakey, jittery films with great success. Thanks to VideoFred and JohnMeyer.

But one thing bothers me often: I always get a certain halo of not removed grain around all moving objects (faces, hands, cars etc.) . This can be very ugly. Especially if I recompress the uncompressed AVI source to and MPEG2 DVD file. Then these sequences are not anymore usable. The grainy halo is strongly visible, which is very nasty.

I tried to lower the degrain but the good Overall Impression gets worse, which is a pitty.

Has anyone a remedy against this "halo - thing"? Thank You for Your estimated help.
__________________
Lenovo Intel i7Quad/WIN8 - Virtual Dub 1.10.4/Avisinth 2.6MT- MacMini I7 QuadCore

Last edited by papcom; 17th October 2014 at 17:12.
papcom is offline   Reply With Quote
Old 17th October 2014, 17:37   #830  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
It's the sharpening. VideoFred processes film that is very pristine and new, and the initial sharpening settings in his script are designed for that source material. For many other types of film, you need to reduce the sharpening settings, sometimes by quite a lot. The degrain and dirt removal are different than the sharpening, so you may not need to reduce those. Try setting all the sharpening settings to zero, or near-zero and see if you like the results better. I think in VideoFred's latest scripts the sharpening parameters are in the section of the script labeled "Four step sharpening parameters."

Less is more.
johnmeyer is offline   Reply With Quote
Old 17th October 2014, 19:08   #831  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by johnmeyer View Post
It's the sharpening.
Yep

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 17th October 2014, 19:59   #832  |  Link
papcom
Registered User
 
Join Date: Feb 2002
Location: Southwest Germany
Posts: 169
i noticed the difference with the sharpening when I used JohnMeyer's Script instead of VideoFred's.. The halo effect was almost gone, but of course the sharpness too.

It would be very helpfull if You could provide certain values regarding the sharpening. Actually I use the following (see below), which is fairly near to my the original captured film. Although I would prefer a bit more sharpness, how can I achive it without the halo's?

Generally spoken I sometimes prefer using Videofred's Script because it does not Crash so often! Sorry John Meyer, dont get me wrong... on the other side Your script has more explanations and produces very nice results... Also when I use 2.6 Multithreading it it kills the process on my WIN7 machine too often.

Code:
#FOUR STEP SHARPENING PARAMETERS
#--------------------------------------------------------------------------------------------------------------------------------
PRE_sharp_ness= 120   PRE_radi_us= 3              #presharpening (UnsharpMask) just after first denoising
#PRE_sharp_ness= 85   PRE_radi_us= 3              #presharpening (UnsharpMask) just after first denoising

LSF_sharp_ness=160 LSF_radi_us=2  LSF_sub=1.5     #second sharpening parameters (LimitedSharpenFaster) sub=subsampling

#Sharp_Strength = 0.4
Sharp_Strength = 0.1
probably I do note quite understand everything the right way, and there could be eliminated some passages out of the code of JohnMyer's script in order to Speed up the Rendering process. My source is a uncompressed video with 25 fps, 720x576 Pixel size, progressive, where each videoframe represents a filmframe!
__________________
Lenovo Intel i7Quad/WIN8 - Virtual Dub 1.10.4/Avisinth 2.6MT- MacMini I7 QuadCore

Last edited by papcom; 17th October 2014 at 20:30.
papcom is offline   Reply With Quote
Old 17th October 2014, 20:29   #833  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by papcom View Post
It would be very helpfull if You could provide certain values regarding the sharpening. Actually I use the following (see below), which is fairly near to my the original captured film. Although I would prefer a bit more sharpness, how can I achive it without the halo's?
Every reel of film is different, and therefore you have to change the settings to fit your particular situation.

Sharpening without creating halos is the holy grail of sharpening, and so far such a creature does not exist. However, you might try removing the sharpening used by the existing script and use instead a more sophisticated sharpener, like the LimitedSharpenFaster.avs script created by Didée.

Quote:
Originally Posted by papcom View Post
Generally spoken I prefer using Videofred's Script because it does not crash all the time and it is 5 time faster JMH's script! Sorry John Meyer. Your script has more and clearer Information and produces very nice results...
Parts of what you say are puzzling to me. I'll admit that my version of the script can be a little unstable, although usually only when you seek on the timeline. The instability is due to the multi-threading, and the fact that some of the plugins used in the script were not designed with multi-threading in mind. So what I do to avoid the instability is temporarily comment out the SetMTMode() statements while doing my tweaking for each reel of film, but then put them back in just before doing the render. Also, you have to use a version of AVISynth that is compatible with multi-threading if you want the multi-threading to work.

The part of your statement that is puzzling, however, is your claim that my script is slower. The whole reason I created my version of the script, and added the multi-threading was to improve performance, and in that effort, I succeeded. I did extensive tests several years ago, and my version should be about 2-3 times faster, i.e., a very big difference.

The fact that you are getting slower performance with my version of the script leads me to believe that you don't have your system set up correctly to use multi-threading. Only certain versions of AVISynth work with the SetMTMode() architecture.

VideoFred's version has a lot more settings for color correction and sharpening which I didn't take forward into my version.

You pays your money and you takes your choice.
johnmeyer is offline   Reply With Quote
Old 18th October 2014, 00:13   #834  |  Link
papcom
Registered User
 
Join Date: Feb 2002
Location: Southwest Germany
Posts: 169
@John Meyer - thank You for Your reply.

If You check my posting before, You see that i did not write anything about speed. (message edited!)

Actually I completely refrain from using any script in a MT - environnement (AVISynth 2.6). I had too much difficulties, and I could not find out why. So I use Your script and VideoFred's script both in the normal manner.

When I load Your script in Vdub 1.9.x it does the Job if I do not scrub on the timeline, but it crashes immediately when I click reopen video (e.g. after editing the script in AVSedit.)... also it crashes when I quit VDub.

Unfortunately I do not understand Your Phrase: "You pays your money and you takes your choice. "

It would be really helpful if there would be some kind of manual for these scripts, how to use all the Parameters and how they correspond. The inline help is good, and in Your script even more informative, so I learned a lot. On this base I have worked for many dozens of hours with the scripts, but I always have my difficulties with the sharpening and the denoising Parameters, as I have written in my posting before.
__________________
Lenovo Intel i7Quad/WIN8 - Virtual Dub 1.10.4/Avisinth 2.6MT- MacMini I7 QuadCore

Last edited by papcom; 18th October 2014 at 00:23.
papcom is offline   Reply With Quote
Old 18th October 2014, 01:49   #835  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by papcom View Post
If You check my posting before, You see that i did not write anything about speed. (message edited!)
OK, so you removed the part of your post that I quoted.

Quote:
Originally Posted by papcom View Post
Actually I completely refrain from using any script in a MT - environnement (AVISynth 2.6). I had too much difficulties, and I could not find out why. So I use Your script and VideoFred's script both in the normal manner.
That is fine, but if you don't use the MT features, then you really should not bother using my version of the script because, as I stated before, that was one of the main reasons I undertook the re-write. I also added the dirt removal using RemoveDirt(), and in my latest version, I spent a LOT of time fine-tuning the function to improve the quality of the dirt removal. VideoFred did adopt some of that original dirt-removal code, but I don't know if he adopted any of my later changes and improvements.

Quote:
Originally Posted by papcom View Post
Unfortunately I do not understand Your Phrase: "You pays your money and you takes your choice. "
Sorry, that is my fault. I forget that this is an international forum, and many people aren't familiar with American idioms. It means that it is up to you to make a commitment ("pay your money") and at that point, you are going to get the benefits -- or the problems -- associated with that choice.

It was a lame attempt at being light-hearted.

Quote:
Originally Posted by papcom View Post
It would be really helpful if there would be some kind of manual for these scripts, how to use all the Parameters and how they correspond.
I won't defend my documentation -- or lack of it -- but I will say that I think VideoFred did a much better job documenting his work than what I have found in most scripts posted here. Each section is well-labeled. Also, he did an excellent job of grouping the various settings so, for example, if you need to reduce sharpening, just go to that section of the script and set everything to zero, or almost zero.

Speaking of sharpening, which is your main problem, I just searched VideoFred's entire script using the search term "sharp" and in addition to three "USM_sharp_ness" parameters (all of which I'd recommend you set to 1, until you get sharpening you like) there is what looks like a "hard-wired" sharpening step in this line:

stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5)

I'd delete everything to the right of the period, i.e., remove:

.sharpen(0.5)
johnmeyer is offline   Reply With Quote
Old 18th October 2014, 10:12   #836  |  Link
papcom
Registered User
 
Join Date: Feb 2002
Location: Southwest Germany
Posts: 169
Thank You JMH for Your hints.

I'll go on trying different parameters on the sharpening etc. Anyway I am feeling a little bit in the mist, because I do not understand it. Why use 16 in blocksize and 8 in blockover ...and not 11 and 7 ?. What is the explanation behind this figures. These dependencies I am interested in.
The similar Problem I do have with the Auto Level Parameters: What is X and X2 ... I tried extreme values like 50 and 100 but I did not see any difference.

Another Thing ist the Output videoformat. Which one is the recommended Output Format?
I do not understand the relation to YV12 in the script? I thought YV12 is 8bit Yuv Format but finally it is e.g. Vdub which determines the Output ...isn't it? So what is the reason and/or the function of YV12 in the script?

Until today I choose the Output Format in the Video Compression of Vdub and I save the AVI with the choosen compression or lossless uncompressed.

As I often work on a Mac I need to import the Output file from Vdub Win PC to Mac which can be very tricky because the Mac does not accept any Format. E.g. I was not able to Import an uncompressed AVI and use it in the Mac.

It worked with BMD-422-10bit codec, because I have BMD devices in both Computers and this codec is on the machine. But of course I would prefer uncompressed .

Does anyone have any suggestions?
__________________
Lenovo Intel i7Quad/WIN8 - Virtual Dub 1.10.4/Avisinth 2.6MT- MacMini I7 QuadCore

Last edited by papcom; 18th October 2014 at 15:33.
papcom is offline   Reply With Quote
Old 18th October 2014, 17:26   #837  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
You have a lot of different questions, and I don't think I can answer them all, but I'll try to answer a few of them.

Block Size and Block Overlap are used by the MVTools (or MVTools2 for my script) motion estimation code. These functions analyze groups of pixels ("blocks") that are 4x4, 8x8, or 16x16 size. These are the only values allowed (4, 8, 16). Thus, you cannot use numbers like 7 or 11.

The "overlap" parameter causes the estimation to create blocks of pixels which overlap each other so that you get smoother results (i.e., no discontinuity between blocks of pixels). The more overlap, the slower the script. It can be no larger than one half the block size. I either use no overlap, or the smallest overlap allowed. In my latest version of the script, I do a two-step version of motion estimation, using two different block sizes. This seems to operate slightly faster, and provide very slight improvement in results.

X2 is a parameter that temporarily creates a small border around the video prior to applying the Autolevels filter. This border is then immediately removed after applying that filter. It provides a way to "fool" the Autolevels filter into creating the correct levels by creating a pure black reference around the frame. VideoFred later completely re-wrote his script to change how the automatic levels are created. So, his script no longer uses the Autolevels filter, and therefore no longer uses this variable. I have still never found any auto level filter that works consistently well, and therefore edit levels by hand in my editing program (Sony Vegas Pro) before exporting the video to the script, so I never use this function, and therefore never spent any time trying to improve on VideoFred's work. If you want to use the Autolevels function, then you should use his versions of the script, not mine.

All that is needed is to create a border, so changing the values of X2 and X will not do anything useful. I am therefore not sure why VideoFred created these as a variables.

The color space that you use depends, first of all, on the filters in the script. Most AVISynth filters require YV12. Many codecs work with this color space, so I usually don't need to make any further color conversions.

I always avoid using uncompressed. There are so many good alternatives, that I see no reason to ever do this. For me, I always use frame serving to pass video from one process to another. That provides all the benefits of uncompressed, without the two major downsides: disk performance bottlenecks, and disk space.

The simplest alternative to uncompressed is to use a lossless codec, like HuffYUV or its newer alternative, Lagarith. Better yet, there are some very high quality lossy codecs that are so good that they are called "intermediate codecs," meaning that they are designed to be visually "virtually lossless," meaning that it will be very difficult to see any visual difference between the original and the rendered result, even when the video is rendered several times. The GoPro company purchased the best-known of these intermediates, Cineform, and this can be downloaded for free from the GoPro site as part of their small GoPro Studio editing package.

Since I don't use a Mac, I am not familiar with what codec types it accepts, and how easy it is to add additional codecs. However, I am pretty sure you can get Cineform codec if you download the Mac version of the GoPro Studio editing software. That should let you exchange video between your PC and Mac using video rendered using the Cineform codec. Once you install Studio, the Cineform codec will show up in VirtualDub as one of the compression codecs.
johnmeyer is offline   Reply With Quote
Old 18th October 2014, 17:40   #838  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Another option for Mac is to use the vdub external encoder feature with ffmpeg. This allows you to export a variety of formats, including MOV, prores, etc... If you still want uncompressed 8bit 4:2:2, Mac's are picky about which fourcc's and planar arrangements they will accept. "2vuy" or "uyvy" tend to be the most compatible

If you are using avs only, (nothing in vdub like deshaker or other filters), then you can use the avs directly with ffmpeg and skip vdub altogether to export various MOV formats

Quote:

It worked with BMD-422-10bit codec, because I have BMD devices in both Computers and this codec is on the machine. But of course I would prefer uncompressed .
v210 IS uncompressed. It's 10bit 422 uncompresse
poisondeathray is offline   Reply With Quote
Old 18th October 2014, 20:42   #839  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 357
Quote:
Originally Posted by papcom View Post
Another thing is the output video format. Which one is the recommended output format?
I do not understand the relation to YV12 in the script? I thought YV12 is 8-bit YUV format but finally it is e.g. VirtualDub which determines the output... isn't it? So what is the reason and/or the function of YV12 in the script?

Until today I chose the output format in the video compression of VirtualDub and I save the AVI with the chosen compression or lossless uncompressed.
Note that a lossless codec is like using WinRAR or 7zip, but optimized for video data. It should always be preferred unless you can't open the format on another computer.

VirtualDub by default converts all video data to RGB because its filters can only operate in RGB color space. You need to set it to "fast recompress" ("direct stream copy" would just save the raw data to a file) so that it passes the input data without changes to the encoder (e.g. Lagarith in YV12 mode or x264vfw in lossless mode). The encoder is the one who determines the color space.

(Personally I use VirtualDubMod because it lets me save the "fast recompress" option so that I don't have to select it every time.)

Last edited by creaothceann; 18th October 2014 at 20:44.
creaothceann is offline   Reply With Quote
Old 19th October 2014, 09:54   #840  |  Link
papcom
Registered User
 
Join Date: Feb 2002
Location: Southwest Germany
Posts: 169
@JMH - thank You for all the Details. I am constantly learning and Your hints help a lot.

My actual "problem zone" always is that grainy "halo" around faster moving objects (e.g waving Hands, or a fast moving head in front of a blue sky etc). I tried to reduce sharpness, or degrain or both, but at the end I could not yet get a satisfying solution for this.

BTW ... how can I adjust the Blacks and the Whites for the autoloevels in Your script? I could not find it yet. (In Videofred's script there are the parameters: "autolev_low and _high)

What denoising parameters do you use? I operated with values such between 90 and 600 (strenght) and 6 (denoising Frames). I adjusted it from a subjective point of view.

@poisondeathry - thank You for the hint with the ffmpeg. I wonder whether it will be able to output a prores mov file from within a Win PC?

Thanks to @creaothceann too. I will try fast recompress
__________________
Lenovo Intel i7Quad/WIN8 - Virtual Dub 1.10.4/Avisinth 2.6MT- MacMini I7 QuadCore

Last edited by papcom; 19th October 2014 at 09:58.
papcom 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 14:22.


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