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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#61 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
Another way you can do this frame by frame on a single 720p monitor is split screen and in avspmod (e.g. left half YT, right half jm_fps) , but put the reverse in tab 2 (e.g. left half jm_fps, right half YT). So you could advance frame by frame with arrow keys and swap views by hitting number keys (1 for tab 1, 2 for tab 2) It's important to just "watch" it normally for motion issues, but having them superimposed in different tabs and looking frame by frame reveals problems each version too. For example there are worse problems in YT version at the end zooming away from the tower. But overall, the motion "smoothness" is the same, and overall the motion artifacts are very similar; you can tell that some mvtools2 derivative was used for sure because of this |
|
![]() |
![]() |
![]() |
#62 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
|
|
![]() |
![]() |
![]() |
#63 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
It's probably compression differences. But you're not using exactly the same source as they did either, and there are multiple generation (rounding) differences For example, even different studio release versions from the same blu-ray in the same year can have different colors. |
|
![]() |
![]() |
![]() |
#64 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
|
|
![]() |
![]() |
![]() |
#65 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
Code:
FFVideoSource("test1.mkv") jm_fps(59.94) It interpolates from the fps avisynth "thinks" the source is. That is partially determined by the source filter So if you have a source filter that returns an "off" frame rate, you could possibly get the wrong results You can use info() to "see" what avisynth "thinks" the framerate is, with the video only . It will print out an overlay on top. Some source filters have problems with some sources or containers, and you might have to make adjustments . That might have caused some of the issues you were seeing earlier and in the videohelp thread . (But another difference for sure, is the scenechange blending vs. duplicates) eg. Code:
FFVideoSource("test1.mkv") Info() When you align clips, or compare them in different tabs, or stack them - it's very easy to see something is "off" right away . Or that they match. |
|
![]() |
![]() |
![]() |
#66 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
Code:
# 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) 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 = true)#, ml = 200, mask = 2) return out } |
|
![]() |
![]() |
![]() |
#67 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
We probably posted at the same time; have a look at the post above it explains some things
The function is defined in the stuff below in that script. You have to call the function to use it in the script. jm_fps(something) . If I used jm_fps(120) it would interpolate to 120 fps You could have "named" the function anything like jm_fps2 or brads_function() or whatever Quote:
![]() Last edited by poisondeathray; 26th July 2018 at 17:50. |
|
![]() |
![]() |
![]() |
#68 | Link | ||
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
Code:
# 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 LoadPlugin("C:\Users\bradw\Downloads\masktools2-v2.2.17\x86\masktools2.dll") LoadPlugin("C:\Users\bradw\Downloads\mvtools-v2.5.11.22\mvtools2.dll") LoadPlugin("C:\Users\bradw\Downloads\RgTools-0.97\x86\RgTools.dll") LoadPlugin("C:\Users\bradw\Downloads\GRunT101\GRunT.dll") LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow1.dll") LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow2.dll") PluginPath = "C:\Users\bradw\Downloads\MeGUI-2836-32\tools\lsmash\" LoadPlugin(PluginPath+"LSMASHSource.dll") Function jm_fps(clip source, float "fps", int "BlkSize", int "Dct") { fps = default(fps, 23.976) fps_num = int(fps * 1000) fps_den = 1000 BlkSize = default(BlkSize, 16) Dct = default(Dct, 0) 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 = true)#, ml = 200, mask = 2) return out } DCT = 0 # EDIT: 1 is SLOW BLKSIZE = 16 c=LSMASHVideoSource("C:\Users\bradw\Documents\source.mkv") Return jm_fps(c,fps=c.FrameRate*2,blkSize=BLKSIZE,dct=DCT) Quote:
|
||
![]() |
![]() |
![]() |
#69 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
Not the way you have it set up in that script; the blue actually does nothing - it's just a default value. As explained in the post above, the source FPS is determined by what avisynth "thinks" it is from the source filter . Or you can manually override it with AssumeFPS(something) . You have to do that sometimes if the source filter isn't returning a proper value The final fps is in the return line "fps=c.FrameRate*2" "c" refers to the source video as loaded by LSmash in that script So if LSMash returned the proper 23.976 fps for the source, it would be 23.976*2 or 47.952. If it "thought" the video was 30.0 fps, you would get 30.0*2 or 60.0fps So if you wanted output 120.0 FPS for the script as you have it now, you would just change the last line to Code:
Return jm_fps(c,fps=120, blkSize=BLKSIZE,dct=DCT) Last edited by poisondeathray; 26th July 2018 at 18:20. |
|
![]() |
![]() |
![]() |
#70 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
Code:
Return jm_fps(c,fps=59.9401, blkSize=BLKSIZE,dct=DCT) |
|
![]() |
![]() |
![]() |
#71 | Link | ||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,060
|
@ poisondeathray
Quote:
https://forum.doom9.org/showthread.p...25#post1788725 This script did beat everything I had tried before, so I stuck with it and advertised it a little bit. Quote:
Cheers manolito Last edited by manolito; 26th July 2018 at 20:32. |
||
![]() |
![]() |
![]() |
#72 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,635
|
Yes, apparently "jm" refers to the settings I posted in that thread manolito linked to. For the video that was the topic of that post, my script did indeed produce fewer artifacts than other scripts and as a result, in subsequent threads, it became somewhat of a benchmark. I was flattered but I can assure you that I did nothing more than spend a few hours "twiddling the knobs" in all of the MVTools2 functions (MAnalyze, MFlowFPS, etc.) until I got the best result for that video.
I've been doing this for a long time, having first used the old MotionPerfect to create slow motion more than fifteen years ago, and since having used just about every motion estimation program around. My conclusion from this experience? The technology simply can't handle some situations. I listed a few of these earlier in this thread. The only solution is to look for ways to detect when the ME is failing, and use some other method for that frame, or via masking, for part of that frame. MysteryX spent a huge amount of time tackling this problem and made some progress, but IMHO (through no fault of his) his script still doesn't yet work in 99% of all scenes, or anything close to that. I've already stated why this particular animated video is going to be particularly difficult to smooth out without making it look worse. My mantra when doing video restoration is similar to the doctor's mantra: "first of all, do no harm." If the cure is worse than the disease, then you should just forget about it. Which, of course, has been my advice on this one from the beginning. Last edited by johnmeyer; 26th July 2018 at 19:56. Reason: typos |
![]() |
![]() |
![]() |
#73 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
|
|
![]() |
![]() |
![]() |
#74 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
You're right - it's just the default settings for mask, not disabled |
|
![]() |
![]() |
![]() |
#75 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
If I wanted to reproduce the youtube video, should I use the fps = 59.94. Also, can I write is as 60000/1001 in order to be as precise as possible? |
|
![]() |
![]() |
![]() |
#76 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
I already said the difference between those framerates are not going to make a difference here. If you do the math, over the course of a 3 hour movie , the difference between 59.94 vs 59.9401 vs 60000/1001 is not even 1 frame. So you will end up getting the same results either way
There are only minor differences if you use that script. Some of the difference might be from multi generation compression artifacts too. The only major difference is blend=true for the scene change. You can preview the results and adjust the settings, eg. blocksize etc... Some frames will be better some worse. You don't have to encode anything. Preview things before you waste time encoding the whole thing. What I'm saying is you can answer these questions easily yourself . Just open it up in avspmod, preview, change settings, rinse , repeat Or maybe you want to adjust the settings per scene. Or if you want better results, then do some manual masking along with layers and different settings |
![]() |
![]() |
![]() |
#77 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
Also, as seen as I am interpolating 24fps to 60fps, does that mean the file size of the output should be at least 2.5 times that of the input to stop quality loss, or does it not necessarily work like that? |
|
![]() |
![]() |
![]() |
#78 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
CRF doesn't necessarily work like that, and strictly speaking it's not a measure of "quality" ; it's just a rate control method 2.5x the number of frames generated by interpolation usually does not result in 2.5x the bitrate at a given CRF (everything else the same) ; because a) the relationship is not linear and b) the interpolated frames are usually more blurry and lower quality. When you do get much higher bitrate at a CRF value, it's usually indirect evidence that your have more interpolation artifacts than normal. Ugly edge morphing artifacts tend to "eat up" more bitrate, than a clean smooth interpolation. ie. The less differences between frames, the less bitrate at a given CRF value; roughly speaking - it's the differences between frames that are stored. The more differences, the more bitrate |
|
![]() |
![]() |
![]() |
#79 | Link | |
Registered User
Join Date: Jun 2018
Posts: 51
|
Quote:
|
|
![]() |
![]() |
![]() |
#80 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,221
|
Quote:
Take a look at the results first. Look frame by frame. It's the inbetween frames that have problems like edge morphing artifacts. A character might have 3 legs when walking , 3 arms when waving. (its the inbetween frame that isn't calculated cleanly). Because there are large differences, the bitrate will shoot up at a given CRF. But a clean interpolation where everything looks "normal" will have much lower bitrate It's a matter of perspective or opinion; "is the glass half full or half empty" . For example you though the YT video was good. Many people here did not like the artifacts . Some people would rather have a duplicate frame or blend or other options instead of the ugly artifacts. It's a matter of opinion or what type of scenario you're working with I think this was already discussed in some earlier posts - With current technology you can't fix these problems easily. They require a lot of manual work, masking, motion tracking, guiding motion estimation, compositing layers , patching areas. It's not like photoshoping each frame, but there is a steep learning curve on composting techniques tips and tricks. And it's tedious and takes a lot of time. The MysteryX FrameRateConverter script is probably the closest thing that attempts to mask out problems or at least have options to address some of the issues automatically. Realistically it's far from perfect too. There was a link referring to Nvidia AI - that looks very promising if you can believe demos |
|
![]() |
![]() |
![]() |
Tags |
frame rate, framerateconverter, interpolation, smoothness, svp |
Thread Tools | Search this Thread |
Display Modes | |
|
|