Recoding 16fps Playback on a 20fps Clip

I am digitizing old 8mm film, the machine outputs at 20fps, I would like to recode to 16fps as is the normal playback speed for the film. My project settings are set to 16fps, but when I import the 20fps clip, and deny the attempt to change the project settings to 20fps, it just imports it with 4fps missing, every 5th frame is just removed, resulting in 26272 total frames instead of 32840 frames played at 80% speed. (27m 22s) I don’t know how, or if it’s even possible to do this. Any help is appreciated, thanks.

I found an old thread that’s similar but it was never really resolved: Forcing frame rate • KDE Community Forums

What you’re really trying to solve is frame loss, and you’re looking to convert wrong fps file to the original fps. If you have a 14 fps video and force the framerate to 20, going back is tricky.

This means some keyframes are duplicated.

Removing those with software shouldn’t be super tricky, because some frames will have identical data, except digitized version of an analog film does not. Every frame is unique, even the duplicated ones.

I don’t think Kdenlive was made for this specific use-case.

Try a piece of software where you can delete individual frames, by yourself, by hand. Or something with AI that can detect what frames look similar.

There is no loss happening in this situation. The source file has all of the correct frames, the digitizing machine just encodes it to be 20fps for some reason and I need it to be 16fps.

Thanks

There was a miscommunication, you see do see frameloss. I’m talking about the conversion of the 20fps file to the 16fps file. You’re trying to solve that problem. I’m not saying your 20fps file has lost some of the original frames.

The core of the issue is that the digitizing machine recorded at the wrong fps, and solving it is harder than you might think. See the explanation visual I made here:

You want to correct the digitized film: “recode to 16fps” (as you said), but that is not possible with normal software, because there they assume the original material has the correct FPS.

The visual example above assumes there was a slight 1/40th of a second offset in the recording of the film. This causes issues with re-encoding the material.

Let’s assume now there was no offset though, and the machine perfectly aligned the start of the film with the recording. Then there wouldn’t be an issue:

But perfect timing is not feasible. 0.03 seconds of offset would mess it up.
If the digitization used 16 FPS to record, any offset would have been fine. The way you digitized it is the problem.

In your scenario, because the 20 FPS file only contains duplicated frames, you just need to use a workflow that allows you to remove individual frames.
Kdenlive allows you to export to individual frames:

Then, manually remove duplicated frames. I advice using an image viewer that allows you delete things quickly.

Then, reimport into Kdenlive as Image Sequence. Tweak some settings so the speed is right, because by default it might be quite slow or fast.


Then export that to normal video file (mp4, mkv, webm, whatever you prefer).

That should be it.

I really appreciate the help, but there is still a miscommunication.

This is how the machine encodes the film, no loss, no dupes, all the correct frames in the correct order, just playing at 20fps instead of 16. I know I can just take the 20fps file and play it at 80% speed, but I would get dupe frames in the export and I would like these to be 1:1 to the originals for the reasons you described above.

When I import the 20fps digitized file into my 16fps project, this is what kden does to it, removing every 5th frame totaling 4 missing frames per second. Over the course of the whole 27m 22s film that results in 6568 missing frames total, originally (32840 cut to 26272)

The way the footage is imported maintains the timecode of the video at the cost of frames, I am just trying to import it so all the frames are intact but the timecode is ignored.

I could try to convert the video in to an image sequence and reimport it at the correct fps, I’m just curious if there is any Kden setting/function that would accomplish this natively.

Thanks

If I understand correctly, you don’t want to drop or duplicate any frames, you just want the same 32840 frames to play at 16 fps instead of 20 fps (so the clip gets 25% longer, i.e. 80% speed). Putting a 20 fps clip into a 16 fps Kdenlive project can’t do that, because the project timeline resamples the clip and drops frames.

The cleanest way is to re-time the file once with ffmpeg before importing it:

ffmpeg -i input.mp4 -filter:v “setpts=1.25*PTS” -r 16 -an output.mp4

setpts=1.25*PTS stretches the timestamps by 20/16, so every frame is kept, and -r 16 sets the output rate. -an drops the audio, which is probably fine for digitized 8mm film. If there is audio you want to keep, add -filter:a “atempo=0.8” (and remove -an) so it stays in sync, though it will be slowed down too.

Then import output.mp4 into a 16 fps project and the frame count should match your source.

This is what I was looking for, thanks!