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. |
3rd September 2015, 22:24 | #22 | Link |
Registered User
Join Date: Aug 2015
Posts: 96
|
This should be about 6 seconds of my sample. Here is the link. I used Vegas, rendered it as .m2ts
https://www.dropbox.com/s/wpgso9p8aw...load.m2ts?dl=0 |
3rd September 2015, 23:30 | #23 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Wow, that is really grainy. As a result, any attempt to use VideoFred's script will result in a fine mess because his scripts do quite a bit of sharpening. Sharpening grain, even after "degraining" is going to produce bad results. In fact, this is one of the main things that drove me to create my version of his script. If you click on the link below, you can see my post in his original film restoration thread -- complete with several images -- that shows the problems his original script created with my grainy footage:
The power of Avisynth: restoring old 8mm films Also, when you actually do the work, make sure to work with the original MOV. This sample you uploaded has been recompressed using the Sony AVC codec, and there are a lot of additional artifacts added to the grain. Finally, if this clip really accurately represents the original (i.e., you didn't screw up when you rendered it), then you need to decimate half the frames before you do any degraining. This is because the frames are all duplicated, and the degraining will choke when it sees zero motion between half of the frames. Here is the script I just used on your clip. I frameserved it from Vegas, which is what I always do in order to avoid having to figure out how to read dozens of different formats into AVISynth. I let Vegas do that job because uses professional codecs that seldom glitch or fail. Note the "selecteven()" statement in the first line. This gets rid of every other frame, thus eliminating all the duplicates. The Assumefps statement gets you back to the correct playback speed. So, you will need to replace the AVISource() statement with whatever you have found works for getting your MOV files into AVISynth. As I remember from our PMs last week, you did figure that out and got it working. Hopefully other people will provide some additional ideas. I'm sure they will be glad to critique my work Code:
source=AVISource("e:\fs.avi").selecteven() super = MSuper(source,pel=2, sharp=1) backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4) backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4) forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4) forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4) MDegrain2(source,super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=1400) final=assumefps(15/1.001) return final #stackhorizontal (source,final) |
4th September 2015, 00:44 | #24 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
Or possibly some other program? I'd love for these samples I'm uploading to be simply shorter versions with the same quality as what I received. Thank you, Bruce |
|
4th September 2015, 01:34 | #25 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Use Mediainfo or similar tool to find out what codec is used by the MOV file. Vegas may give this to you if your right-click on the media and select "properties."
In general, Vegas does not "smart render" (a.k.a., lossless cuts) most video. It can smart render DV AVI and some forms of MPEG-2, but that's about it. Having said that, if the version of ProRes (I think that's what you said this is) does not do interframe compression, Vegas may well be able to render it losslessly. It is easy to tell: just start the render and watch the preview screen in Vegas while rendering. If the video is not being re-rendered, the display will show "no compression needed." Did my script work for you? |
4th September 2015, 03:51 | #26 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
I also linked it to a .avi render I did, so that it would work with what you gave me as written. Attached are the media info screen caps from the original .mov and also my AVC render, just because. I was curious about this, after reading your explanation about how the degraining process worked, when I suspected that I did have duplicate frames. The reason I suspected that was, when I was trying to find the first frame of a scene in Vegas, using the frame advance button, it always seemed like I needed to click it twice to see any change in the image. |
|
4th September 2015, 05:16 | #28 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
Attached is the media info on the avi. It's huge, it's 4:2:2 and it says it's lossless. I can probably uplaod it if you'd like to see it, better quality than the m2ts maybe? |
|
4th September 2015, 05:54 | #29 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Bruce/Fl,
You can just copy and paste MediaInfo text into post, click 'Go Advanced', and then select text and click on the Hash symbol above the post entry box, it can take a long time for attachments to clear approval. You can see what colorspace Avisynth thinks clip is by pasting Code:
Return Info.ConvertToRGB32
__________________
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 ??? |
4th September 2015, 07:36 | #30 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
And here's some help for cutting down that huge source file.
|
4th September 2015, 16:33 | #31 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
Now I'll upload a few seconds of the original, for anyone wanting to see it un-reencoded. Bruce |
|
4th September 2015, 16:56 | #33 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
And just to be sure there are no mistakes I've made, here is what I have writtin: Code:
source=AVISource("C:\Users\Bruce\Desktop\upload.avi").selecteven() Return Info.ConvertToRGB32 super = MSuper(source,pel=2, sharp=1) backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4) backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4) forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4) forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4) MDegrain2(source,super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=1400) final=assumefps(15/1.001) return final #stackhorizontal (source,final) |
|
4th September 2015, 17:21 | #34 | Link | |
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
|
Quote:
Change your first line like this: Code:
source=AVISource("C:\Users\Bruce\Desktop\upload.avi").selecteven().converttoYV12()
__________________
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 |
|
4th September 2015, 17:47 | #35 | Link | |
Registered User
Join Date: Aug 2015
Posts: 96
|
Quote:
Unfortunately I have to run now, but will return to this later today and see what I can do/see. Again, thanks all. Bruce |
|
4th September 2015, 19:08 | #36 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
Based on my experiences, you definitely want to preclean the clip you analyse motion from if the amount of noise or grain is extreme. I'd try FFT3DFilter or some of those NLMeans-type denoisers.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
4th September 2015, 23:17 | #37 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
return source.info.ConvertToRGB32 I assumed that you have not assigned to any named variable and so would have been assigned to the special 'implied' Last clip variable. What I originally posted was equivalent to this: Code:
AVISource("C:\Users\Bruce\Desktop\upload.avi").selecteven() # Implied assignment to special Last variable. return Last.info.ConvertToRGB32 # return info.ConvertToRGB32 # EDIT: Or use implied Last without explicit naming
__________________
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; 5th September 2015 at 02:52. |
|
5th September 2015, 04:09 | #38 | Link |
Registered User
Join Date: Aug 2011
Posts: 103
|
About thSAD, from what I have read before(just a glance at the mvtools code):
It actually affacts the denoising strength of MDegrain, since MDegrain weighted average the matched blocks, and the weighting is calculated from SAD and thSAD. Thus, a higher thSAD results in dissimilar blocks to have larger weight, and it can increase denoising strength as well as introduce more blending artifacts. As for MCompensate based denoising, thSAD might just be a threshold to determine bad matches. |
5th September 2015, 04:33 | #39 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Code:
inline float DegrainWeight(double thSAD, double blockSAD) { if (blockSAD >= thSAD) return 0.f; return float((thSAD - blockSAD) * (thSAD + blockSAD) * 256 / (thSAD * thSAD + blockSAD * blockSAD)); } Quote:
weight = 256 * (thSAD^2 - blockSAD^2) / (thSAD^2 + blockSAD^2) you got thSAD at both multiplication and division part, who knows what will happen to the weight if you increase it, not doing a monotonicity determination of "y = (x^2 - a)/(x^2 + a)" here |
|
5th September 2015, 05:06 | #40 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
well... I just did it anyways, cuz that's just some 15 years old simple math
turns out "y' = 4ax / (x^2 + a)^2", and y' always > 0 so, guess mawen1250's right, you increase the weight by increasing thSAD EDIT: but that doesn't really matter, you know, it's an "x/x^4" kinda thing... it grows really, really, really, slow, yeah, you know what I mean.... Last edited by feisty2; 5th September 2015 at 05:18. |
Thread Tools | Search this Thread |
Display Modes | |
|
|