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. |
21st May 2019, 19:13 | #1121 | Link | |
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Quote:
You mean like this: Code:
cropped_source=source1.crop(in_bord_left,in_bord_top,-in_bord_right,-in_bord_bot,align = true) #temporarily remove any black borders on input video |
|
21st May 2019, 19:18 | #1122 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Align = true,
its lovely that avs+ made things a bit faster/better, but woulda been even nicer if mod whatever were not an additional issue. Lots more work for Devs, but who the hell cares bout them !
__________________
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 ??? |
21st May 2019, 19:25 | #1123 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
21st May 2019, 19:25 | #1124 | Link |
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Avisynth Script Test Example - Rough Cut
Anyway, last post for today.
Quick example of a rough cut taken from the script tests: Using @johnmeyer (VideoFred) script 2017 (Avisynth+ GamMac, etc) https://youtu.be/UD0tTJLIrK8 |
21st May 2019, 20:32 | #1125 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Using AVS 2.6 and Crop without align=true I got the message from RgTools 0.97: "RemoveGrain: Invalid memory alignment. Unaligned crop?" Put the missing ", align=true" lines and the script was working for Avisynth 2.6 as well. Regarding the slowish avs+ 32-bit run: Even for a single thread Avisynth+ needs 1300M memory for a basic out-of-box side-by-side comparison script (if not limited). My sources are 1600x1200 scans. In Avisynth+ when the size of internal frame caches have to be shrunk due to low memory, it has much bigger penalty on speed than it happens in classic Avisynth 2.6. Quick AvsMeter tests with Avisynth+ 2772 x86, using the formerly attached "JM2017" script: Single thread SetMemoryMax(1024): 0.26 fps Single thread SetMemoryMax(2048): 0.46 fps (actually 1350M used) Prefetch(2) SetMemoryMax(1024): 0.43 fps (actually used 1384M) Prefetch(2) SetmemoryMax(2700): 0.50 fps (actually used 1770M) In this case an x64 workflow and thus the virtually limitless memory can help a lot for Avs+. Such videos with full-HD resolution and a complex filter chain require huge amount of memory. Too bad there are still filters without x64 version, but it's just a question of time to have them. (Did not run x64 tests because of the missing unsharpmask function) |
|
22nd May 2019, 10:25 | #1126 | Link |
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Thank you, found those now.
So now testing John's 2012 script using AVS2.6 MT and the newer plugins that are available, gives the following with 4 Threads and 2048M. On the Parade Example AVI (1920x1080 16fps) with Result S4 AVSMeter 2.9.1 (x86) - Copyright (c) 2012-2019, Groucho2004 AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5) Number of frames: 241 Length (hh:mm:ss.ms): 00:00:15.063 Frame width: 2560 Frame height: 720 Framerate: 16.000 (16/1) Colorspace: YV12 Active MT Mode: 2 Frames processed: 241 (0 - 240) FPS (min | max | average): 1.073 | 122698 | 3.818 Process memory usage (max): 2507 MiB Thread count: 17 CPU usage (average): 77.3% Time (elapsed): 00:01:03.122 Thank you for the detail regarding the differences in memory handling between Avisynth+ and earlier versions. This has helped me understand why the significant difference in performance between the latest version of the cine film restore script and earlier ones. So, in a better position now with everyone's input, I am hoping you marvelous code mechanics can come up with the x64 ports of the few remaining external plugins required to give a full 64bit test a run. Understand that you will all have other priorities (days jobs to do), so no rush, I'll just keep a watching brief here. |
22nd May 2019, 13:06 | #1127 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
And here is Deflicker 0.5 for x64. Not optimized yet for x64 but at least exists.
https://github.com/pinterf/Deflicker/releases |
22nd May 2019, 13:13 | #1128 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Ooooooo Lovely, thanx P.
__________________
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 ??? |
23rd May 2019, 09:00 | #1130 | Link | |
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
|
Quote:
But aspect ratio is not good: it looks to narrow. Also, if there is no flicker in the original scan, you can disable deflicker() in the script. 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 |
|
23rd May 2019, 11:56 | #1131 | Link | |
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Quote:
I agree on the aspect ratio. This was from an initial test, based on recommendations from Johnmeyer Post #1095 for improving fps processing of the scripts and Avisynth, he was making the point that 8mm would see little benefit from anything above SD resolutions, so this example was done at 1024x576, but yes I think with the borders added back it makes the frame too "square". Have you found something that works best for standard 8 and is it the same for Super 8? (most of the footage I have is standard 8). Scans have been supplied full HD 1920x1080. Its funny, I have some footage from early 60's (like this example) that the original film quality is still pretty good, yet some much later stuff (80's) that has aged nowhere near as good, down to handling and equipment I guess. So some footage will require a lot more attention than others. Sadly I've come across a couple of bits of footage that have been double exposed and I think will have to be consigned to the "too difficult" pile as they will be way beyond my skill set. Good to hear from you, it was seeing examples of your work that provided the inspiration for doing this. |
|
23rd May 2019, 16:06 | #1132 | Link | |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Your fps, at around 3.5, is starting to look reasonable if your input is really:
Quote:
You want to do two things if you are going to somewhat reduce the resolution prior to feeding the result to your script. The first is to crop off any black bars on the side. Even if you are going to keep everything at HD resolution, it is pointless to process all those black/blank pixels. Which brings me to a key point: You never want to feed black borders into any of these scripts (see my last comment below).If you still want to process in HD, crop first to remove all borders (including any on top and bottom); then run the script; and then at the end, pad out the result by adding pixels on the side until you get to a standard 1920x1080 resolution. Getting rid of borders should make a huge difference in performance. So, if you want to process in a lower resolution, resize down to the lower resolution after doing the crop recommended above. Don't include any borders in the resize operation. If you do re-size, you'll want to pay attention to the aspect ratio of the film compared to the aspect ratio of standard PAL or NTSC SD video. I actually added some parameters for this, which I don't think Fred ever added to his script. I did this primarily for handling 8mm film which is almost perfectly square, unlike NTSC SD video which at 656x480 (square pixel) or 720x480 (non-square pixel) is 4:3. So when you deliver 8mm scans using the SD DVD format, you will always end up with black bars on the side. It's just the way the math works. However, these inevitable borders must be temporarily stripped out before feeding the film transfer to the script, and then added back. I did this with the "in_bord_left" etc. border variables. It lets you easily remove borders and then, as the very last step, adds back black borders so you end up with the same video size you started with, but without ever processing the black pixels. This is needed not only to reduce processing time, but also to avoid having funky borders from the motion stabilization. If you leave the black borders, the black from the borders will wander into the frame of the final video. P.S. Your scans look good, although it looks like you may be losing some highlights (that is the fault of the scan) and it also looks like you might need to do more work in post on gaining the shadows, as exhibited by the walk in the square starting at the 0:13 second mark. I do scene-by-scene gamma adjustments in Vegas, using a custom histogram, but others have used a combination of HDRAGC and GamMac in AVISynth to do this automatically. I posted my GamMac results, but I don't have it working well enough to rely on, so I run the script twice: once with, and once without GamMac and then cut between them just before I deliver the final result. I need to get back to trying HDRAGC. It has been upgraded a lot since I first tried it a decade ago. It produce some really good results, but was prone to go AWOL on some scenes and really mess things up. When it was working, this is what the results looked like: HDRAGC good results |
|
23rd May 2019, 16:24 | #1133 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Also, vast black borders will screw with any auto color correction stuff.
__________________
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 ??? |
23rd May 2019, 17:50 | #1134 | Link | |||
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Quote:
Your comments on borders sort of brings me back to my question up thread which think you've perhaps missed? Quote:
To confirm with testing the scripts, have the border crop functions: Code:
in_bord_left=208 in_bord_top=0 in_bord_right=208 in_bord_bot=0 #Borders around input that must be removed cropped_source=source1.crop(in_bord_left,in_bord_top,-in_bord_right,-in_bord_bot) #temporarily remove any black borders on input video However are you saying here Quote:
Yes I anticipate that when I get into the details of the post edit I'll have scene by scene correction to do. I've never used Vegas and likely will use PPro as I have some experience with it, although some time ago but at least GUI is familiar. So anticipating having to cut some scenes for further AVS processing or something similar in PPro to adjust. Interested about your comment that some have managed this automatically though. As I know I have a lot of scenes to deal with like the example you picked out - Bless dear old Dad, he did used to like to get his moneys worth by shooting with the same speed film in camera indoors & out, guess film was a good chunk of a working mans wage back then. |
|||
23rd May 2019, 18:05 | #1135 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
John probably just means that there is no included pre-cropping in given scripts, so add your own after source filter and before rest of script, you
can just insert a Return Last before the rest of script whilst getting coords correct. EDIT: Or Return Source, or whatever the cropped clip is called.
__________________
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 ??? |
23rd May 2019, 18:41 | #1136 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
23rd May 2019, 18:56 | #1137 | Link |
Registered User
Join Date: Jan 2019
Location: Lake District UK
Posts: 48
|
Sorry that's why I'm confused, as I'm reading them as John's scripts do include pre-processing crop: as all his scripts have these relevant parts (have only changed the relevant bord pixel parameters):
Code:
#VIDEO FILE #Change the following line to point to your video file film="D:\VideoSource\**SOURCEFILE**.avi" ...........> #SIZE, CROP AND BORDERS PARAMETERS CLeft=4 CTop=4 CRight=4 CBottom=4 #crop values after Depan and before final resizing W=1280 H=720 #final size after cropping bord_left=0 bord_top=0 bord_right=0 bord_bot=0 #720p= borders 150 in_bord_left=208 in_bord_top=0 in_bord_right=208 in_bord_bot=0 #Borders around input that must be removed ...........> source= Avisource(film).killaudio().assumefps(play_speed).trim(trim_begin,0).converttoYV12() trimming= framecount(source)-trim_end source1= trim(source,0,trimming) cropped_source=source1.crop(in_bord_left,in_bord_top,-in_bord_right,-in_bord_bot,align = true) |
23rd May 2019, 19:30 | #1138 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
No not yet, busy at present, maybe tomorrow.
I muchly doubt that john expects you to do an entire pass just for cropping, do as you deem fit.
__________________
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 ??? |
24th May 2019, 06:34 | #1140 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
John, Fred,
Anybody ever use AutoLevels(autoGamma=true), if so any problems crashes at all ? Kaboom! Code:
K=BlankClip.Trim(0,-100) W=K.Invert K++W++K++W++K++W++K++W #AutoLevels(autolevel=true,debug=true) AutoLevels(autogamma=true,debug=true) return last Autolevels::adjust() called with gamma=0.0, and so 1/gamma produces Divide by Zero.. I probably will not get time to look further today, but maybe get back to it tomorrow. Got it compiling x64 OK, thought that I had borked it, but bug in original dll too. EDIT: Seems to only be RGB24 and RGB32.
__________________
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; 24th May 2019 at 06:44. |
Thread Tools | Search this Thread |
Display Modes | |
|
|