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. |
8th June 2018, 02:15 | #41 | Link | ||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
From MysteryX
Quote:
Quote:
https://forum.doom9.org/showthread.p...39#post1800439 and the artifacts were identical to the ones caused by FramerateConverter. And the johnmeyer script does not do any frame blending. Cheers manolito |
||
8th June 2018, 02:29 | #42 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
Quote:
I also tried ffmpeg minterpolate https://ffmpeg.org/ffmpeg-filters.html#minterpolate The default settings, are a lot like mvtools2, and you end up with frame blending, but occlusion and morphing artifacts with the default mode (There are many other settings you can play with, but only had time to play with a few) And butterflow https://github.com/dthpham/butterflow All command line driven (well I guess ffmpeg minterpolate is too... ) but this can use OpenCL . This resulted in almost pure blending, so meh.. but I used the 0.2.4 dev version, not sure if something got broken, I'll revisit 0.2.3 stable when I have time Blending might be "bad" for realtime playback; but sometimes blobby edge morphing occlusion artifacts are worse. At least blending is consistent. pros/cons |
||
8th June 2018, 21:02 | #43 | Link | |
Registered User
Join Date: Mar 2018
Posts: 447
|
Quote:
[EDIT] Or should it work without Libav installation? I got Code:
AviSynth open failure: [Fatal]: Failed to avformat_open_input. [EDIT2] I'm dumb. I had the file name wrong. Works perfectly now. Last edited by zorr; 8th June 2018 at 21:46. |
|
9th June 2018, 16:30 | #45 | Link |
Registered User
Join Date: Mar 2018
Posts: 447
|
I tried John Meyer's frame doubling script with that hand waving video. MediaInfo says
Code:
Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS For some reason the result doesn't have all the original frames. It goes "out of sync" after frame 55, every frame (or at least most of them) are interpolated after that. Using AssumeFPS doesn't help either. I also tried setting num=48000 and den=1001 but that made it go out of sync slightly faster, after frame 53. Here's the script I tried, it should display nothing but black if the result has original frames. Can anyone spot an error? Code:
LWLibavVideoSource("d:\process\hand wave.mkv") orig = last fps = jm_fps(last, 2*23.976, 32, 2) orig_only = fps.SelectEven() #orig_only.AssumeFPS(23.976) return orig.Subtract(orig_only).Histogram("luma") # Motion Protected FPS converter script by johnmeyer from Doom9 # Slightly modified interface by manolito # Requires MVTools V2 and RemoveGrain # Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0 function jm_fps(clip source, float "fps", int "BlkSize", int "Dct") { fps = default(fps, 25.000) fps_num = int(fps * 1000) fps_den = 1000 BlkSize = default(BlkSize, 16) Dct = default(Dct, 0) # fps_num = 48000 # fps_den = 1001 prefiltered = RemoveGrain(source, 22) super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4) # all levels for MAnalyse backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct) forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct) forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100) backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100) out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2) return out } |
9th June 2018, 17:02 | #46 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
Code:
#return orig.Subtract(orig_only).Histogram("luma") Code:
orig = last fps = jm_fps(last, 2*23.976, 32, 2) orig_only = fps.SelectEven() #orig_only.AssumeFPS(23.976) #return orig.Subtract(orig_only).Histogram("luma") fps |
|
9th June 2018, 17:16 | #47 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
If you want to double your frame rate and make sure that every other frame will be an original frame then you should edit the johnmeyer script like this:
Before: Code:
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2) return out Code:
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2) out=out.selectodd() interleave(source,out) return last Cheers manolito Last edited by manolito; 9th June 2018 at 17:19. |
9th June 2018, 17:16 | #48 | Link |
Registered User
Join Date: Mar 2018
Posts: 447
|
That's what I tried first, but I noticed the above mentioned problem. This script is just demonstrating the problem clearly, by taking every second frame from the fps clip and comparing it to the original. They should be identical but they're not.
|
9th June 2018, 17:24 | #50 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Yes, that's the problem. You ccan check with info()
LWLibavVideoSource returns an off framerate 23.9752 . Probably jitter in the timecodes. Add AssumeFPS(24000,1001). Framecount is correct Or use FFMS2, which returns 24000/1001 |
9th June 2018, 21:27 | #51 | Link | |
Registered User
Join Date: Mar 2018
Posts: 447
|
Quote:
I thought it couldn't be a problem with the source because I also converted the mkv to Huffyuv-encoded avi and the problem occurred with that file as well. But obviously the error in framerate just propagated there. So is FFMS2 better than LWLibavVideoSource in every way? |
|
9th June 2018, 21:33 | #53 | Link |
Registered User
Join Date: Mar 2018
Posts: 447
|
That's certainly a way to achieve it, but it seems like it's just covering the real problem which is the incorrect frame rate reported by the source filter. I think the interpolation quality will suffer (perhaps not much, but who knows) when MFlowFps is working with incorrect frame rate.
|
9th June 2018, 22:57 | #54 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Also, AssumeFPS(24000,1001) is better than AssumeFPS(23.976), as 24000/1001 is actually 23.97602398. EDIT: To below, Quote:
__________________
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; 10th June 2018 at 10:12. |
||
10th June 2018, 06:01 | #55 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
AssumeFPS(23.976) is an alias for AssumeFPS(24000,1001) in Avisynth 2.57 and up, along with a number of other common framerates. Still good practice to use the real fraction in case you need a non-standard framerate, though.
|
10th June 2018, 21:48 | #56 | Link | |
Registered User
Join Date: Mar 2018
Posts: 447
|
Quote:
I started to wonder why is it reported as 23.976 (by MediaInfo and even by AviSynth) when that's not what the correct ratio is. Maybe it's because 32bit float can only represent about 7 decimals and the correct ratio needs 8. |
|
10th June 2018, 23:48 | #57 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Maybe I should have said something akin to "as 24000/1001 is actually more like 23.97602398." EDIT: Using WinXP Calculator, Scientific mode, 23.976023976023976023976023976024, 239760 sequence recurring.
__________________
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; 11th June 2018 at 00:31. |
|
11th June 2018, 00:22 | #58 | Link | |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
Quote:
Online calculators end up repeating "976023", even if use some unbound decimal points/etc. 23.976023976023976023976023976023etc
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
|
11th June 2018, 00:35 | #59 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Actually sequence starts right at the beginning, ie 239760, etc
__________________
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 ??? |
11th June 2018, 01:00 | #60 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
I see what happened. The coffee cup is always half empty.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
Tags |
motion interpolation |
Thread Tools | Search this Thread |
Display Modes | |
|
|