yukichigai
20th July 2013, 02:23
One of the most maddening bits of conversion that I see frequent threads on is content that is a mix of 24p and 30i. The simplest method is to just prioritize one over the other and accept that some of it going to have some pretty bad ghosting, blended frames, and/or jerky motion. But what about content where it's somewhat evenly split, content where the 30i and 24p parts are equally important? What do you do then?
This isn't a new problem, and there aren't a shortage of solutions to it. A lot of them may be a bit hard to grasp though, or may only be useable for certain portions of the content. Another thing I've noticed is that some very nice, workable solutions haven't been updated for the newer tools which are available, or the syntax used by new editions of the plugins they rely on. To that end, I've cobbled together and tweaked two very excellent routines: MVBob and MVFPS (http://forum.doom9.org/showthread.php?p=615027#post615027) by scharfis_brain (http://forum.doom9.org/member.php?u=30929), and ivtc_txt60mc (http://forum.doom9.org/showthread.php?p=1466105#post1466105) by cretindesalpes (http://forum.doom9.org/member.php?u=163021). I've put them together in two avs scripts you can drop in your plugin directory for import, as well as automatically loading the various plugins those functions need in said scripts. I've also put together an example script that you can use to help figure out the breakpoints and so on that the functions will need to work properly.
Now before I go further, a few disclaimers:
These routines are incredibly slow. Currently I have an 8-core 3.6Ghz machine and it takes me about 14 hours to render an hour and a half of 480p video. Could this be sped up? I have no idea, which leads me into my second disclaimer....
I am not an expert. Really, I'm just sharing something that worked for me and worked remarkably well. I didn't see a very good thread outlining anything like what I'd done, so I thought I'd make one. If this thread is redundant or someone has made a way better method, "oops", I guess.
So with that out of the way, let's get to how this works. The basic idea is that you use MVBob + MVFPS to turn any "pure" 30i content into 24p video, ivtc_txt60mc for any mixed 30i/24p content, and whatever IVTC routine works for you to handle any pure 24p content. Using MVBob + MVFPS is pretty straightforward, as are most IVTC routines for pure 24p video. It's only ivtc_txt60mc that requires some careful usage. The test script I will post below helps to figure that out.
ivtc_txt60mc is dependent on you telling it which frame in the segment is the last "whole" frame before two "mixed"/interlaced frames in the sequence. It means you have to know what the precise pulldown pattern is in the video. If it changes at some point, perhaps due to a scene change, then you'll need to use trim to make another segment once the pattern stabilizes (i.e. goes back to standard 3:2 pulldown) and call ivtc_txt60mc on the new segment.
(Sidenote: one of the nice features of ivtc_txt60mc is that it can handle brief little "blips" in pulldown pattern. The first thing I ran these scripts on was an episode of MST3K (Mystery Science Theater 3000), a prime example of a situation where the 30i content is just as important as the 24p stuff. The movie they were riffing had a few awful, awful crossfade scene changes where the pulldown pattern started dropping mixed frames or even adding extras, where the frame order would be something like Aa Bb Bc Cd De EE or Aa Bc Cd Dd Ee. ivtc_txt60mc handled that like a champ, to the point where I had to squint really hard to see where it had motion-blended frames to account for the issue.)
The point of the text script is to simulate the breaks where you'd call the different functions. MVBob + MVFPS is simulated by a basic Bob + SelectEvery, and ivtc_txt60mc is simulated by a blood-simple IVTC using DoubleWeave and Pulldown. The script is simple enough that you can scroll through it in realtime, making it easier to detect situations where you need to make another break because the pulldown pattern has changed. See a bunch of interlace artifacts/jaggies, means the pulldown pattern changed somewhere and you need to use Trim to make another segment. Repeat until the thing is mostly jaggie free. Once you do that, it's a simple matter of cut-and-paste to replace the placeholder functions with the real deal. Then you can set your computer to render your video for the next 14+ hours and go do something else, like sleep.
Like I said, I'm not sure how useful this is, or if I'm just reinventing the wheel. I found it useful at least, and hopefully you will too.
This isn't a new problem, and there aren't a shortage of solutions to it. A lot of them may be a bit hard to grasp though, or may only be useable for certain portions of the content. Another thing I've noticed is that some very nice, workable solutions haven't been updated for the newer tools which are available, or the syntax used by new editions of the plugins they rely on. To that end, I've cobbled together and tweaked two very excellent routines: MVBob and MVFPS (http://forum.doom9.org/showthread.php?p=615027#post615027) by scharfis_brain (http://forum.doom9.org/member.php?u=30929), and ivtc_txt60mc (http://forum.doom9.org/showthread.php?p=1466105#post1466105) by cretindesalpes (http://forum.doom9.org/member.php?u=163021). I've put them together in two avs scripts you can drop in your plugin directory for import, as well as automatically loading the various plugins those functions need in said scripts. I've also put together an example script that you can use to help figure out the breakpoints and so on that the functions will need to work properly.
Now before I go further, a few disclaimers:
These routines are incredibly slow. Currently I have an 8-core 3.6Ghz machine and it takes me about 14 hours to render an hour and a half of 480p video. Could this be sped up? I have no idea, which leads me into my second disclaimer....
I am not an expert. Really, I'm just sharing something that worked for me and worked remarkably well. I didn't see a very good thread outlining anything like what I'd done, so I thought I'd make one. If this thread is redundant or someone has made a way better method, "oops", I guess.
So with that out of the way, let's get to how this works. The basic idea is that you use MVBob + MVFPS to turn any "pure" 30i content into 24p video, ivtc_txt60mc for any mixed 30i/24p content, and whatever IVTC routine works for you to handle any pure 24p content. Using MVBob + MVFPS is pretty straightforward, as are most IVTC routines for pure 24p video. It's only ivtc_txt60mc that requires some careful usage. The test script I will post below helps to figure that out.
ivtc_txt60mc is dependent on you telling it which frame in the segment is the last "whole" frame before two "mixed"/interlaced frames in the sequence. It means you have to know what the precise pulldown pattern is in the video. If it changes at some point, perhaps due to a scene change, then you'll need to use trim to make another segment once the pattern stabilizes (i.e. goes back to standard 3:2 pulldown) and call ivtc_txt60mc on the new segment.
(Sidenote: one of the nice features of ivtc_txt60mc is that it can handle brief little "blips" in pulldown pattern. The first thing I ran these scripts on was an episode of MST3K (Mystery Science Theater 3000), a prime example of a situation where the 30i content is just as important as the 24p stuff. The movie they were riffing had a few awful, awful crossfade scene changes where the pulldown pattern started dropping mixed frames or even adding extras, where the frame order would be something like Aa Bb Bc Cd De EE or Aa Bc Cd Dd Ee. ivtc_txt60mc handled that like a champ, to the point where I had to squint really hard to see where it had motion-blended frames to account for the issue.)
The point of the text script is to simulate the breaks where you'd call the different functions. MVBob + MVFPS is simulated by a basic Bob + SelectEvery, and ivtc_txt60mc is simulated by a blood-simple IVTC using DoubleWeave and Pulldown. The script is simple enough that you can scroll through it in realtime, making it easier to detect situations where you need to make another break because the pulldown pattern has changed. See a bunch of interlace artifacts/jaggies, means the pulldown pattern changed somewhere and you need to use Trim to make another segment. Repeat until the thing is mostly jaggie free. Once you do that, it's a simple matter of cut-and-paste to replace the placeholder functions with the real deal. Then you can set your computer to render your video for the next 14+ hours and go do something else, like sleep.
Like I said, I'm not sure how useful this is, or if I'm just reinventing the wheel. I found it useful at least, and hopefully you will too.