|
|
Converting 8.515fps to 25fps, need help
I am creating a DVD for one of my brothers and have been downloading some Nike commercials from Nike's website. One of them is encoded in Quicktime and I opened it in VDubMod with the following line:Code:
QTInput(quot;X:\wherever\Joga Bonito.movquot;,color=0,audio=true)
Apparently, it runs at only 8.515fps. I want to make a PAL DVD and was wondering what options do I have for converting it to 25fps and what are the pros and cons of each one.
Is it really 8.515fps? Could you check it with the Quicktime-player?
Quicktime players reports 8.51fps, yes. By the way, the following script:Code:
QTInput(quot;X:\wherever\Joga Bonito.movquot;,color=1,audio=true)
Levels(0,1.1,255,16,235)
ConvertToYV12()
DeBlock_QED()
Crop(2,4,478,356,align=true)
FFT3DFilter(sigma=1,bw=32,bh=32,bt=3,ow=16,oh=16,sharpen=0.7)
Lanczos4Resize(672,544)
dull=last
sharp=dull.LimitedSharpenFaster(SMode=4,LMode=3,strength=200)
Soothe(sharp,dull,20)
AddGrain(2,0,0)
AddBorders(16,16,16,16)
Nets me an access violation error message at line 51 of DeBlock_QED_MT2. Any idea why that could be happening?
Strange, I used the MT2 version myself yesterday and worked like a charm. Too many filters maybe in your plugin dir? That's usually the case with these strange errors.
I also used it before with no troubles, but I keep all the plugins in a separate folder and load them manually so that can't be the problem.
Yes, well, dctfilter is not the most robust of plugins and would tend to cause that sort of mischief. Non-mod8 has been the reason for failure I most often experience, since it doesn't check and throw an error, but it may be some other interaction as well.
Well, 480x360 (which is where deblock_qed is applied) is MOD8. Should I change deblockers then?
deblockers require mod 16
Adding borders before deblocking and altering the cropping parameters worked wonders. Now, how would you recommend me to change the framerate to 25fps (I'm guessing some kind of interpolation method) and where should it be put in the script?
Try motion/mvtools and see where it gets you, if you have steady enough motion, at least they're worth a shot. Are you going to be reinterlacing after upconverting?
I can't imagine how the video ended up being such a bizarre framerate (especially since it doesn't evenly go into any of the normal framerates; 23.97, 24, 25 and 29.97), but here's my suggestion:
You could do a straight ChangeFPS(25) but 8.515 does not go evenly into 25 (the ratio is approx 2 and nine-tenths so in doing a conversion directly each frame would be repeated three except for the tenth time where it would be repeated twice).
8 and one-thirds fps goes into 25fps evenly (The slowdown from 8.515 to 8.33 will be totally unnoticable). We can't use AssumeFPS to change it to that, however, because it is not an even number so rounding errors would cause us to end up with something stupid like a 24.99fps file. So, do this:Code:
AssumeFPS(8, true) #Slow down to 8fps, keeping audio in sync by adjusting sample rate.
ChangeFPS(24) # Repeat 8 into 24 frames by playing each original frame 3 times
AssumeFPS(25, true) #Speed up to 25fps, audio synced
Ssrc(48000) # Resample audio back to standard sample rate
.. this is equivilent to 8 2/3fps into 25fps, without having to deal with those nasty rounding issues.
End result is a converted video which does not stutter.
For smoother results, you could try using MotionProtectedFPS (do a search) instead of ChangeFPS but I don't think you're going to be satisfied with the results since there is probably not enough source material to work with for the motion compensation algorithm to make much sense of what is going on.
The advert is progressive as far as I can tell, there are no signs of interlacing anywhere nor dupe frames. How would I go about using MVTools for the framerate conversion? I never used it before.
[edit]Thanks for the suggestion, iantri. I'll try that ASAP.
[edit2]Apparently it works, I'm going to make an encode soon. By the way, the audio also has a wierd samplerate: 43161Hz. I wonder why would Nike host such a strangely encoded advert.
Okay, now i'm intrigued. Can you post a link one of these ads?
Sounds like they've totally butchered the encoding.
The very latest versions of MVTools have a new function called MVFps that does a framerate conversion by motion estimation. You just call it like MVFps(25) and it does it's thing.
MotionProtectedFps from the Motion package does the same thing,. Personally, I prefer the results from Motion but it can depend very much on the source material.
So, I should change ChangeFPS(24) for MotionProtectedFPS(24), right?
Here's the link to the advert: Joga Bonito.[edit]MotionProtectedFPS doesn't use MaskTools v2.x?
MotionProtectedFPS seems to cause some kind of ghosting, I'll try MVFps instead.
Usage would be then
Code:
AssumeFPS(8,true)
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=24,idx=1,idx2=2)
AssumeFPS(25,true)
,right? What effect would have ditching the assumefps lines and replacing the 24 in the MVTools lines with a 25?[edit]The audio was actually encoded at 44100Hz, it's the assumefps lines that changed it to 43161Hz. I'm just going to use srcDrop to change it to 48Khz.
with mvtools you can skip all the mess with assumefps!
just give mvflowfps2() the desired framerate and become happy.
everything else is nonsene.
even without mvtools it is nonsense, cause with 8,5.. fps to 25 fps you won't notice a big difference in terms of motion judder than when changing 8.333 fps to 25fps (8,5.. -gt; 8 -gt; 24 -gt; 25).
the framerate factor (about 3) is far to high to be able do tell any difference.
So it would just be Code:
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=25,idx=1,idx2=2)
, right? Will the audio stay in synch?
of course
also the samplerate won't be touched anymore.
EDIT: is there a direct link to that file?
I am not able to access that site, cause of its dependance on flash.
Quicktime high resolution version.
WMV high resolution version.
PSP version.
iPod version.
IMO, the quicktime version is the best looking one. |
|