Log in

View Full Version : MVtools slowing a clip to a specific length


znowman
13th August 2019, 21:14
Hi,

Apologies if this has been answered elsewhere, i have looked but cant find anything that helps me out...

I'm trying to slow a clip down from 1.268 seconds to match another clip that is 4.116 seconds, and wondered if it's possible?

I've used MVtools to double or half the framerate, but i still can't figure out how to do the above, can anyone help?

Thanks for reading, and any help is much appreciated.

StainlessS
13th August 2019, 21:38
What are the frame rates of each clip, and framecounts.

I'm heading out of the door in a minute, so cant say much except not to have any great expectations.

I wrote this somewhere (here):= https://forum.doom9.org/showthread.php?p=1857740#post1857740

It may be possible to up framerate to a non multiple of source whilst keeping all source frames verbatim, where eg source
is 24 FPS and required = 25 FPS, and using,
Src24.ChangeFPS(25) to produce a new clip at 25 FPS with an exact duplicate every 24 source frames and save new source as eg Src25.avi.
Process new source with eg src25.Duplicity2(ThG=0.1,DBase="D:\Src25_Det.DB"), to produce a DBase (perhaps with MaxDupLen=1, perhaps not).
Then use Src25.DropDeadGorgeous("D:\Src25_Det.DB",ScanAhead=12) to interpolate dupe frames achieving 25.0 and with all original
source frames. With a ScanAhead of eg 12, will locate dupes and then backwards scan up to 12 frames before the dupes looking for
frame of greatest movement, insert an interpolated frame prior to that greatest movement frame and shove all following frames along one
to remove the dupe. Might be worth someone experimenting.
Or, you could just use eg Duplicity2(Mode=2,ThG=0.1) to interpolate the exact dupes directly and without DropDeadGorgeous but that might
produce a more rhythmic stutter every 25 frames.


Might be able to make it assist.
Use ChangeFPS() to make same number of frames [with duplicates] and then run through Duplicity2() creating the DBase,
then throught DropDeadGorgeous() to do the Mvtools interpolation stuff.

I the mean time, you could be trying to figure out what ChangeFPS() arg provides the same frame count as target clip.

EDIT: Just using MvTools, you would likely end up with few original frames, at least as above you would keep all source frames.
EDIT: Offhand, cant remember if above ThG=0.1, should better be eg 0.000000000001 or 0.0.

EDIT: Can you post clips on a file host, eg MediaFire.

johnmeyer
13th August 2019, 23:41
Just read the documentation for MVTools2. You use MFlowFPS and the key parameters are num and den (numerator and denominator). You have a ratio of 3.24605678233438 between your two clips' lengths. If your original clip is 25 fps, then set the num and den to give you 3.24605678233438 * 25 = 81.15141956.

StainlessS
14th August 2019, 00:19
Yip, but pretty much all output frames will be interpolated.

znowman
26th August 2019, 00:13
Thanks for getting back to me about this, and sorry for my late reply...

I did use MFlowFPS but it doesnt like floating point numbers, so i tried to multiply the number accordingly to get rid of the decimal, but this didnt seem to work correctly, i'll give it another go and let you know if it works.

StainlessS, the clips i were using are deleted now, i just cut something random into smaller pieces to see if i could get them to have the same duration, but i'll have a look through the thread you suggest and see if i can gleen anything from it.

Thanks again for the replies.

johnmeyer
26th August 2019, 00:46
Just use two integers that give you the right ratio, very much like 1000/1001 is used to go from 24 fps to 23.976 or from 30 fps to 29.97 fps.

znowman
30th August 2019, 20:58
Finally had another chance to play around with this and managed to get two clips to the same duration, thanks to your help johnmeyer.

I'll try the suggestions you have made StainlessS for keeping the original frames in tact, but i've not used Duplicity or DropDeadGorgeous before so will have to do a bit of research.

StainlessS
31st August 2019, 08:57
To setup Duplicity2, just tune with the ThB [Block] setting, can almost certainly leave other threshold settings alone,
ie dont touch ThG, ThP, IgP, ThK, maybe set MaxDupLen=3, DBase="D:\MyDBase.DB" or whatever (use same created DB in DropDeadGorgeous).

EDIT: In this case, Duplicity2 just for creating DB for DDG, its DropDeadGorgeous that does the magic.