Hi, I'm a ***
and however. What is the best way to convert a 25P source to 50 ?!??![]()
+ Reply to Thread
Results 1 to 18 of 18
-
-
Best? Usually done with MVTools2. I think you can use QTGMC (which uses MVTools2) as a front end, but here is the basic AVISynth code:
Code:# Convert 25p progressive camera movies to 50i loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll") blocksize=16 source=AVISource("E:\fs.avi") superfps= MSuper(source,pel=2) backward_vec2 = MAnalyse(superfps, isb = true,blksize=blocksize) forward_vec2 = MAnalyse(superfps, isb = false,blksize=blocksize) MFlowFps(source,superfps, backward_vec2, forward_vec2, num=50, den=1, ml=200) SeparateFields() SelectEvery(4,0,3) output=Weave() #stackhorizontal(source.separatefields(),output.separatefields()) #For troubleshooting and determining if field order is correct. return output
I adapted this from a 30p to 60i script I wrote years ago. It is possible that you might have to change the SelectEvery statement to selectevery(4,1,2). Someone who knows PAL video better than I do will have to provide guidance. -
It's questionable whether interpolated motion is "best". It depends on the particular video. With some it will generate gross distortions. With others it may look fine. It's something to try though.
Here's a bad case example with simple interlaced encoding on the left, with motion interpolation (johnmeyer's code) on the right.
Code:function Spin(clip v, float angle) { Rotate(v, angle) } BlankClip(width=640, height=30, color=$ffffff) black = BlankClip(last, color=$000000).PointResize(width, 2) StackVertical(last,black,black,black) StackVertical(last,last,last,last) StackVertical(last,last,last,last) Blur(1.0) Animate(0,90, "Spin", last,0.0, last,180.0) Trim(0, 90) ConvertToYV12() AssumeFPS(25) source = last blocksize = 16 superfps= MSuper(source,pel=2) backward_vec2 = MAnalyse(superfps, isb = true,blksize=blocksize) forward_vec2 = MAnalyse(superfps, isb = false,blksize=blocksize) MFlowFps(source,superfps, backward_vec2, forward_vec2, num=50, den=1, ml=200) SeparateFields() SelectEvery(4,0,3) output=Weave() StackHorizontal(source, output)
Last edited by jagabo; 18th Jun 2020 at 23:10.
-
I'm usually the one warning people about the artifacts you can get with motion estimation. And, if you create what we engineers call a "pathological case" (something not found in real-life), as Jagabo did, then you can demonstrate the fault of pretty much any approach.
Moving vertical lines, like a horizontal pan over a picket fence, is the worst thing for motion estimation to handle, so Jagabo's example did indeed show the limitations of any motion estimation algorithm, not just MVTools2, and not just my particular script.
I will admit that using the word "best" (which is banned over at doom9.org, for this very reason) was not a good choice. Perhaps I should have simply said that my script shows one of the more advanced techniques.
You can search the web, but you will find that most of the tutorials do recommend what I posted. Here is one such tutorial:
https://library.creativecow.net/articles/solorio_marco/interlacing_progressive_footage.php
Finally, while Jagabo did a great job showing how motion estimation can blow up, what he really should have done was to create some other way to go from 25p to 50i and then compare that result with the motion estimation result, both using real-life video. With that comparison, I think you will find that the motion estimation approach holds up pretty darned well.
Anything which creates the missing points in time and then weaves them together into a 50 field per second interlaced video is going to have some sort of artifact. A one example, any approach which blends adjacent frames, then separate fields and weaves is going to produce a very soft result. -
-
-
I must be slow this morning because I don't see how the left side of the frame shows 50i video. After all, you input the result of your animation directly into my script ("last" via the "source" variable). My script then creates 50i interlaced video. If "last" were interlaced, then my script would create a mess.
Since I don't see progressive to interlaced code operating on the "last" variable between the point where it is created, and when it is used in the final "stack" line, I can only conclude that "last" is 25p and the output of my script is 50i.
This has nothing to do with the artifacts created by my script; those are quite real, and quite expected when fed this torture test.Last edited by johnmeyer; 19th Jun 2020 at 10:24.
-
Last edited by jagabo; 19th Jun 2020 at 10:57.
-
Increase the blocksize to 32 and johnmeyer's interpolation is almost perfect for jagabo's "pathological" testclip
-
That doesn't negate the fact that motion interpolation sometimes messes up badly. I could easily make another pattern that blocksize=32 screws up on. Or blocksize=8. Or any other value. And patterns like his aren't completely unrealistic. You often see shots in movies that include elements like this. Especially animated films. I made that particular pattern because I know something like that would be particularly obvious, even a full speed playback.
-
@jagabo
Agree with everything. My 'blocksize=32' was meant with grain of salt, not as a general recommendation or even solution to the problem.
A while ago a member over at doom9 took huge efforts to improve interpolation by introducing masks for deciding when to prefer interpolation or blending etc. It helped in some cases; his script and .dll are available from here
https://github.com/mysteryx93/FrameRateConverter/releases.
I don't think that I have ever tested it for synthesizing a missing field as discussed here though. -
-
These days one would probably prefer RIFE for motion interpolation (synthesizing the missing fields for 25p->50i).
Similar Threads
-
FFMPEG convert 50P to 25P?
By marcorocchini in forum Newbie / General discussionsReplies: 17Last Post: 29th Dec 2019, 16:02 -
avisynth 50p to 50i: how to avoid the flickering artifacts?
By marcorocchini in forum Newbie / General discussionsReplies: 15Last Post: 20th Jul 2019, 10:58 -
Having slow motion in 50p playback - destructive convert to 25p film?
By larioso in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 0Last Post: 4th Jun 2019, 05:26 -
Convert to 25P or 50P using interlaced footage
By Sir_Loin in forum Video ConversionReplies: 10Last Post: 6th May 2016, 18:08 -
50i or 50p?
By Mabel in forum Newbie / General discussionsReplies: 23Last Post: 3rd Mar 2016, 03:06