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 7th September 2020, 12:43   #1  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
How do I speed up AviSynth processing a VideoFred script?

I am copying 8 and 16mm cine using a Flir Blackfly MV camera and reversed Schneider-Kreuznack Companon lens (with very good results)

I can capture 2448x2048 stills:

TIFF 24 bit depth 14.7MB ea
png 24 bit depth 4.5MB
jpeg at 250KB

or an MJPEG avi video stream at 136Mb/s

I am processing the captures with a VideoFred script and AviSynth 2.6 with Virtualdub.

The problem is that processing 4 mins of cine from small jpeg's is taking 20 hours! (png's would take many times longer)

I have tried to process an AVI video stream of 1.9 GB and AviSynth crashed with memory warnings. I can cut the video stream into smaller clips but that would play havoc with the stabilising.

It wouldn't be so bad if I were copying only a couple of films but I have 24 hours of both 8 and 16mm to copy!

The results are so good after the VideoFred treatment that I have to find a way of speeding things up.


I am sure that all of this has been discussed before so please exuse me for repeating the question.

All help WILL be useful

Martin
MartinS is offline   Reply With Quote
Old 7th September 2020, 13:19   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
You could try my variations on VideoFred's work. They are designed to take advantage of the multi-threading available in some versions of AVISynth and are 3-5 times faster.
johnmeyer is offline   Reply With Quote
Old 7th September 2020, 13:27   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
AVS+ x64 would be a good idea, rather than avs v2.60 standard [avoid low memory problems].

EDIT: https://forum.doom9.org/showthread.php?t=181351
The Avs+ installer can install both x86 and x64 versions. [which one is used depends upon using eg x86 or x64 version of Vdub2].
You need x86 plugins for x86 version, and x64 plugins for x64 version.

External x86 plugins on wiki, link to x64 plugins follow introduction. http://avisynth.nl/index.php/External_filters
Or direct link to x64 plugs:- http://avisynth.nl/index.php/AviSynth%2B_x64_plugins

EDIT: Not sure if video freds script works under x64, maybe john could advise. [if not work under x64, what are the missing plugins]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th September 2020 at 14:38.
StainlessS is offline   Reply With Quote
Old 7th September 2020, 13:54   #4  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
Code:
You could try my variations on VideoFred's work. They are designed to take advantage of the multi-threading available in some versions of AVISynth and are 3-5 times faster.
Could you point to where this could be found John?

Thanks StainlessS...I'll have a look at your post shortly.....I wasnt sure if there was an x64 version of VideoFred's plugins.

The other thought that I had was that someone might have modified Fred's script to work under x64......maybe that's what John is teferring to.
MartinS is offline   Reply With Quote
Old 7th September 2020, 14:29   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Johns script mod is (so far as I remember) always hard to find, is buried somewhere in VideoFred's thread.
Would be not a bad idea if John were to have his own thread for his version, he can point link at master VideoFred thread in first post,
but also have somewhere that he can point others to when referring to his own mod.

Would also be easy to find, just look for threads started by John [via his profile], intead of ploughing through significant sized VF's thread.

EDIT: Note, John suggests his mod, but does not provide a link to it, perhaps he cannot find it either
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th September 2020 at 14:35.
StainlessS is offline   Reply With Quote
Old 7th September 2020, 16:03   #6  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
StainlessS

Does this look like the scrips of John Mayer that you refer to?

https://forum.doom9.org/showthread.php?t=144271&page=11 #216
MartinS is offline   Reply With Quote
Old 7th September 2020, 16:56   #7  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I've posted about five versions of the script, all of them in VideoFred's threads. This is the latest one:

John Meyer's Branch of VideoFred's Fim Restoration Script Including GamMac


I would strongly recommend that you try to get this working by setting Result to either 4 or S4 (the latter gives you a before/after look at the film). Do NOT use GamMac initially because it slows things down.

Stability can be an issue. I have not tested this with 4K scans and I suspect that you are going to have problems with crashes. This isn't caused by my script, or VideoFred's script, but has to do with AVISynth and its memory management. You will also have to play around a lot with all the parameters of the "newer" AVISynth+ multi-threading model. I recently upgraded my CPU to a 6-core, 12-thread model and even with that, I usually have to keep the thread count down to 4-6 in order to keep it stable. Also, I turn off multi-threading when I am scrubbing back and forth, while figuring out the best settings for each reel, and then only turn on the multi-threading when I actually create the final output. Lower resolution will reduce or eliminate the stability issues and will dramatically decrease the time it takes to get through your project.

So, I strongly recommend that you capture at lower resolution, or that you downscale prior to doing restoration. 8mm and Super 8 really don't need much more than 720x480 to capture all the detail. I capture with an HD camcorder at 1440x1080, but then have the camera downscale to SD as it outputs to my computer.

I do this for 16mm as well, although with that larger gauge you can sometimes get more detail with HD (1920x1080) resolution.

You certainly don't need to use 4K resolution for 8mm or Super 8 home movies and probably not 16mm as well.

I had a chance to prove this with some 16mm B&W film I transferred for a client that was taken in 1935 of the Nazis in Dresden, Germany. The man taking it owned a movie camera factory and knew how to use his equipment, so the film was sharp, steady, correctly exposed and properly developed. I transferred all the film and we donated the results to the Wiesenthal Museum in L.A. Years later, the Smithsonian Channel found it and wanted to use it. However, they wanted to have the film re-scanned by their lab in L.A. I arranged for the film to be sent there, scanned, and then had the lab send the digital files to me, so I could review the results prior to sending them to the production company.

This gave me a chance to compare my transfers, done on a modified Eiki 16mm projector to a camcorder mounted at point blank range capturing the image prior to the focal point (i.e., upside down).

What I found was exactly what I expected: their scans (done on a $100,000 Spirit) did a better job of extracting shadow details (which your capture device should do as well since you can adjust the gamma) but I saw no evidence of new detail revealed in the normally-exposed sections of each frame, nor did I sense any additional sharpness (i.e., the illusion of more detail by having sharper edges).

So, I recommend that you spend some time doing transfers at lower resolution, or simply down-resn'g some clips from material you've already transferred, and see if you can detect any loss of detail. With 8mm, there is no way you'll be able to see any difference. That tiny little piece of celluloid simply cannot store that much detail.

Last edited by johnmeyer; 7th September 2020 at 17:09.
johnmeyer is offline   Reply With Quote
Old 8th September 2020, 16:58   #8  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
Thanks John

Quote:
You certainly don't need to use 4K resolution for 8mm or Super 8 home movies and probably not 16mm as well.
The Blackfly camera is less than 4K at 2448x2048 and I was going to look at starting with 1080 high for a final HD film. The Blackfly camera and Spinview software is new to me and there seems to be a lot to figure out in the mass of settings available.

The trials I did with my Nikon D810 photographing the cine film in the 8mm gate, and the subsequent AviSynth processing told me that this is the way to go. Now for 16mm I have modified a Bell & Howell projector adding a stepper motor and Arduino for control. I removed the glass from the lens and turned up two aluminium adapters so that the reversed Schneider enlarger lens and C mount camera could be mounted in-line and focussed with the B & H (seems to work well).

But the format of what the Spinview capture software will produce is quite different to my Nikon, so hence the AviSynth questions.

I shall be experimenting with your script John vs the various outputs of the new camera system.

A lot to learn and many ways to head off in the wrong direction!!

So all
MartinS is offline   Reply With Quote
Old 11th September 2020, 10:46   #9  |  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 MartinS View Post

I can capture 2448x2048 stills:

Martin
Hi Martin, you do not need 2448x2048 stills for 8mm film capturings, it's overkill. It's even overkill for 16mm film.

I always capture at 1392x1032 straight to AVI.
Then, I even reduce this to 1296x960, to speed up the script. It runs at 4fps now, with Avisynth+ and multitasking enabled.
After running the script with all all filters, , I upscale to HD: 1440x1080 with black borders to preserve 4:3 aspect ratio.

See my example clip: please set Youtube quality to full HD.
https://www.youtube.com/channel/UC_k...CujwT_fZHN6jlg

Many greetings,
Fred.

PS: example files?
__________________
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

Last edited by videoFred; 12th September 2020 at 12:02.
videoFred is offline   Reply With Quote
Old 13th September 2020, 14:50   #10  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
Quote:
Hi Martin, you do not need 2448x2048 stills for 8mm film capturings, it's overkill. It's even overkill for 16mm film.
You are quite correct VideoFred.....I am assessing and amending the scripts using a 720v480 size and then working at 1440x1080 for the final version.

I now have John Meyer's script working with Avs+ and your VideoFred script with Avs (probs with Avs+, there does not seem to be a MVtools x64 dll)

But there is something that I don't yet understand, (it is likely to be a simple answer, but so far it evades me)

I am copying the 16mm films at present

I have copied one with a 0 EV and again with a -1 EV applied by the capture software. Obviously the -1EV is one stop darker througout.

I set up the 0EV film in both the VideoFred and John Mayer script with option 1 Autolevels, Autowhite/GamMac.

If I change the script film for the -1EV one, hit F5, the brightness of the film in the output window decreases, with both scripts.

Is this to be expected? Am I misunderstanding something?

I thought that "Autolevels" or "GamMac" would have compensated for the -1EV.

I can fiddle the brightness via gamma and saturation but that doesn't seem correct.

Is there an option or switch that I haven't found? Or has one to obtain a perfect grey point in the capture software?
MartinS is offline   Reply With Quote
Old 13th September 2020, 15:18   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
there does not seem to be a MVtools x64 dll
https://github.com/pinterf
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 13th September 2020, 16:09   #12  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
Well I never!

Thanks SS
MartinS is offline   Reply With Quote
Old 13th September 2020, 18:23   #13  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I recommend doing most of your levels and color correction in your NLE, rather than relying on GamMac, Autolevels, or any other AVISynth "automatic" compensation. None of them work all that well for the major types of corrections you find in amateur film, much of which was badly exposed because movie cameras did not normally have automatic exposure until the advent of Super 8 cameras.

My workflow is to edit the film in Vegas, and do exposure and color correction, as best I can, scene-by-scene. I then frameserve into the AVS script and if I still have residual color and level issues, I let GamMac sort that out. I usually create two restored versions of the movie, one with the auto color correction and one without. I then line these up in Vegas and cut between them, taking the better of the two. I do this because GamMac screws up just about as often as it helps. I don't fault anyone for that, because all the other plugins I've tried, including expensive ones for Vegas, get it wrong as often as they get it right.

There is a reason that color timing for "Hollywood" films is still done by having a person with a practiced eye twiddling knobs.

Last edited by johnmeyer; 13th September 2020 at 20:26.
johnmeyer is offline   Reply With Quote
Old 13th September 2020, 19:44   #14  |  Link
MartinS
Registered User
 
Join Date: Mar 2020
Posts: 16
Hmmmmm......I need to re-think my workflow now.

but

I have just discovered that Premiere Pro CC has Scene Detect in their beta plan. I am just downloading it.

Seems like my 20-odd thousand feet of cine might take some time.........

Thanks John
MartinS is offline   Reply With Quote
Old 13th September 2020, 20:27   #15  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Quote:
Originally Posted by MartinS View Post
Hmmmmm......I need to re-think my workflow now.

but

I have just discovered that Premiere Pro CC has Scene Detect in their beta plan. I am just downloading it.

Seems like my 20-odd thousand feet of cine might take some time.........

Thanks John
I have several AVISynth scene detection scripts, and StainlessS has spent a LOT of time perfecting his, and just posted an update within the last week.
johnmeyer is offline   Reply With Quote
Old 14th September 2020, 11:16   #16  |  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
I do this because GamMac screws up just about as often as it helps.
Hi John,

First of all, thank you again you for all your useful comments in my threads!

For the GamMac false results I have found a pretty good solution:
https://forum.doom9.org/showthread.p...28#post1803528

many greetings,
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 14th September 2020, 11:35   #17  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
For the GamMac false results I have found a pretty good solution:
I would have thought that setting arg Scale=0, would accomplish same thing.

Adding small white and black block would just disable automatic setting of input_low and input_high
for all 3 red green and blue, ie would set all 3 channel inputs at 0 and 255. Same as Scale=0.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th September 2020 at 11:40.
StainlessS is offline   Reply With Quote
Old 14th September 2020, 13:56   #18  |  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 StainlessS View Post
I would have thought that setting arg Scale=0, would accomplish same thing.

Adding small white and black block would just disable automatic setting of input_low and input_high
for all 3 red green and blue, ie would set all 3 channel inputs at 0 and 255. Same as Scale=0.
Hi StainlessS, I have just tried it and for some reason, it is not the same. I will show some examples later.

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 14th September 2020, 16:01   #19  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
I will show some examples later.
Yes please, but provide sample that can reproduce result, ie without subtitles or histogram.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 14th September 2020, 16:19   #20  |  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 stainlesss View Post
yes please, but provide sample that can reproduce result, ie without subtitles or histogram.
ok
__________________
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
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 15:15.


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