logo Sign In

Motion Compensated Frame Rate Conversion -- free/cheap alternative?

Author
Time

I recently used a trial of a Snell’s Alchemist to convert some 50p material to 60p via “motion compensation”. Needless to say, it looked wonderful and far superior to anything I’ve ever tried in all the NLE’s I’ve used.

Example: https://www.youtube.com/watch?v=K2oU65eR1s0

Being that the software costs loads of money – $15,000 for a single license, I was wondering if there was a way to do this via AviSynth, VirtualDub, or even some much. much cheaper software? I understand I won’t get the same high quality result, but I would love to have something to convert the rest of my 50p assets to 60p for DVD output.

“That said, there is nothing wrong with mocking prequel lovers and belittling their bad taste.” - Alderaan, 2017

MGGA (Make GOUT Great Again):
http://originaltrilogy.com/topic/Return-of-the-GOUT-Preservation-and-Restoration/id/55707

Author
Time
 (Edited)

How did you make your 25i footage 50p in the first place?

EDIT: Please post an untouched sample from your source file.

Author
Time
 (Edited)

Chewtobacca said:

How did you make your 25i footage 50p in the first place?

EDIT: Please post an untouched sample from your source file.

I bobbed the frame rate in Handbrake. Here’s a raw sample of the 25i footage. However, Snell did take the original 25i file and make it 60p without any additional processing on my part.

Here’s an untouched clip: https://drive.google.com/open?id=0B1-W6ByLSZVKR1F2eDREN1Y4YXc

“That said, there is nothing wrong with mocking prequel lovers and belittling their bad taste.” - Alderaan, 2017

MGGA (Make GOUT Great Again):
http://originaltrilogy.com/topic/Return-of-the-GOUT-Preservation-and-Restoration/id/55707

Author
Time
 (Edited)

How does this look? It’s wrong from the point of view of physics because each sixth frame is an interpolated one, so the result is jerky.

EDIT:This is technically better (smoother), but almost every frame is an interpolated one, so the quality of each individual frame is not as high.

Author
Time
 (Edited)

Several AviSynth-based options available: mvtools, Interframe (uses SVPflow plugins), MSU FRC, …

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time
 (Edited)

For the second option in my post above, I deinterlaced the clip with QTGMC and then used SmoothFPS2, which uses MVTools.

function SmoothFPS2(clip source, int num, int den) { 
super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4)
backward_1 = MAnalyse(super, chroma=false, isb=true, \
blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
forward_1 = MAnalyse(super, chroma=false, isb=false, \
blksize=16, searchparam=3, plevel=0, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, \
blksize=8, searchparam=1, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, \
blksize=8, searchparam=1, search=3)
backward_3 = MRecalculate(super, chroma=false, backward_2, \
blksize=4, searchparam=0, search=3)
forward_3 = MRecalculate(super, chroma=false, forward_2, \
blksize=4, searchparam=0, search=3)
MBlockFps(source, super, backward_3, forward_3, num, den, mode=0)
}

MPEG2Source("25i Thomas.d2v")
QTGMC()
SmoothFPS2(60000,1001)

EDIT: Here’s an improvement. Replace the second part (that is, after the function) with what follows.

MPEG2Source("25i Thomas.d2v")
QTGMC()
SmoothFPS2(60,1)
ChangeFPS(60000,1001)

This is better (as far as I’m concerned) because the video goes from 50p to 60p before being brought down to 59.94fps, resulting in fewer interpolated frames. Using ChangeFPS() results in one frame in every 1001 being discarded, but with so many interpolated frames, it hardly matters. And it’s better than calling AssumeFPS() and having to adjust the audio (at least to me).

Author
Time
 (Edited)

I’m assuming this would go on the same page, just because I’m having trouble with frame rates myself. I’m trying to preserve one of my favorite shows, “Theodore Tugboat”, and I managed to get them from a reliable source. However, I’m facing a few difficulties, so I’ll point out the “to-knows” in a bullet list:
-The show was filmed in 60i.
-My initial source for these is in 25p.
-The files I have are in 30p, resulting in a duplicate frame.

Is there any way to get rid of the duplicate frame, going back to 25p, and possibly restoring some lost motion by interpolating that to 60p? If there is, I’d love to know. (I am also very inexperienced with AVISynth, so if that is required, I’ll need a lift on that as well!) 😃

Here’s a clip of the untouched file (cropped in Vegas, original file size is 1280x720).

https://drive.google.com/file/d/0BylDvPOkKHsmMFhhV0JDYmxZWUE/view?usp=sharing

Author
Time

If the sample’s been cropped in Vegas, it’s not a sample of the untouched file. What format is the original in? We’ll need a sample of that. If the episodes aren’t too big, just upload one and PM me the link.

TheStarSwitcher said:
-My initial source for these is in 25p.
-The files I have are in 30p, resulting in a duplicate frame.

…Is there any way to get rid of the duplicate frame, going back to 25p…?

I don’t understand this. Whatever you did that changed the frame-rate was the wrong thing to do if you’re now asking how to to undo it. Don’t handle your initial source in that way: find some other way.

…and possibly restoring some lost motion by interpolating that to 60p?

Motion interpolation won’t restore lost temporal resolution. You’ll probably find the result smoother in terms of motion, and the interpolated frames might resemble the lost ones superficially, but there’s no getting them back. What’s gone is gone for good unless you find another source that’s not been (mis)handled in the same way.

Author
Time

Hi there,
Thanks for getting back to me. Sorry I didn’t clarify this further- I’m obtaining these episodes off of a video streaming site in the Philippines. I’m capturing them off of my iPhone, since I can view them offline, without streaming, providing the best quality. The way I’m getting these to my PC is with an Elgato Game Capture (does only 30p, hence the problem), via an IPhone output-HDMI cable. The captures are in .mp4 from the raw file, each episode roughly 3gb each. The only other sources of (a select few) of these episodes are VHS rips. Only 35/130 have been released on Home video, over 30 not even available on the internet but here (my reasoning for preserving these). Screen capture is not an option, as the site will lag and provide jumpy quality via VPN on a desktop.

Author
Time

Oh, I see. You have the files on your iPhone and are recompressing them to transfer them to PC. Is there no way of transferring them without recompressing them? I’ve no experience with iPhones, so I can’t suggest a method, but I’d imagine that there’s a way of copying them onto some sort of drive and from there to the PC.

Failing that, please provide a sample that’s not been through Vegas, because that’s adding another step to the process and another lossy recompression. It might be best if you upload an episode. 3GB isn’t that big.

Author
Time

I’ve tried Androids and many other devices to see if there’s any way to just copy the raw file stored in the database, but it isn’t possible 😦 . As for your requested links, here they are:

CAPTURE OF FULL EPISODE FROM PHONE:
https://drive.google.com/file/d/0BylDvPOkKHsmc1FqaW96aXl6ZVk/view?usp=sharing

SMALL SNIPPET FROM VHS CAPTURE (what I’m trying to aim for, these tapes are in an amazing 60p if this helps. It’s presented here in 30 from a basic capture):
https://drive.google.com/file/d/0BylDvPOkKHsmNVNsOHJQam9DNzA/view?usp=sharing

Author
Time
 (Edited)

Thanks for the full episode and for the additional information about the files. I think that the next step is to find something other than the Elgato to capture these because it seems to be creating some abnormality in the header (and because there must be a better way).

Frame rate mode                          : Constant
Frame rate                               : 29.970 (29970/1000) FPS
Original frame rate                      : 29.970 (30000/1001) FPS

The conversion from 25fps to 29.97fps is being achieved by duplicating every fifth frame – and, I think, a frame every 1001 frames (or not): the abnormality in the header makes it difficult to tell exactly what frame-rate the Elgato wants this to be. That’s quite common, and usually one uses TDecimate(Mode=2,Rate=25) to restore the video to 25fps, but in this case, it returns a non-standard rate: 25.0005fps. I tried to account for the abnormality in the header, but it didn’t make any practical difference to the output.

To do what I did, install AviSynth (the latest non-MT 32-bit version) and FFMS.

FFVideoSource("My Great Game - OilRig - 2016-09-04 21-40-20.mp4")
TDecimate(Mode=2,Rate=25)

But as I said, it would be better to find another way to capture, one that enables you to stay in 25fps. Nonetheless, HCenc seems to accept the input for DVD, even at 25.00005fps. What is your intended delivery format?

EDIT:

TheStarSwitcher said:
SMALL SNIPPET FROM VHS CAPTURE (what I’m trying to aim for, these tapes are in an amazing 60p if this helps. It’s presented here in 30 from a basic capture):

I don’t understand how a tape can be 60p. As you say, the sample is 30i – when deinterlaced, it’s 60p.

Author
Time

Apparently the tape is 60 frames per second. I have never seen tapes aside from the Theodore ones do this, they look absolutely gorgeous on the TV. I know JawsTDS has a few tapes, and I think he could agree with me on this haha. I’m trying to aim for .mpg files of the finished product, so I’d like to see how we might get with this. Thanks for the scripting, will update to see how that goes.

Author
Time
 (Edited)

Aiming for .mpg files is unusual. They are for MPEG-2 (or MPEG-1). Unless you want to make DVDs, pick something that offers better compression. I’d encode with x264 and make MKVs.

And I’m curious as to what was made at 60fps and put on a tape. I’d be grateful if you’d send me one such file. 😃

EDIT: By the way, the episode has a levels issue but only with the white text on the purple border: the rest of the video looks all right.

Author
Time

Hi everyone,
Been a while since my last post - I took Chewtobacca’s advice on ditching the Elgato, and managed to get a Capture Card that does many frame rate options. Now that I have a few captures, i would like to hear from any of you if there is anything to do to make it look good how it was on VHS… below are examples from two different episodes, with two different targets from a NTSC VHS and a PAL VHS, which I would like to aim for.

THEODORE & THE OIL RIG:
Recorded in 50 frames per second (whole HDMI episode) - https://drive.google.com/file/d/0Bzhc7EQ2CezIcExKRE51dVZIZlE/view?usp=sharing

Target (From a USA NTSC VHS, partial clip)- https://drive.google.com/file/d/0Bzhc7EQ2CezITWp3VzBVbVB4Z0U/view?usp=sharing

THE COLD SNAP:
Recorded in 50 frames per second (whole HDMI episode) - https://drive.google.com/open?id=0Bzhc7EQ2CezIemVkM3d3bzQtN1E

Target (From a Swedish PAL VHS, Partial Clip) - https://drive.google.com/file/d/0Bzhc7EQ2CezIVGZfeXl2SGNENG8/view?usp=sharing

25p Capture (In case this is at all necessary) - https://drive.google.com/file/d/0Bzhc7EQ2CezIb0hrRnlXT281LXc/view?usp=sharing

Thank you so much in advance.