0

I recorded some of my work with Krita Recorder, but removed some of the frames afterwards manually by deleting them in the folder. Now I have frequent "jumps" in the frames, for example from 0000052.jpg to 0000068.jpg. When I use the export function now, it detects all frames fine and tells me the resulting video should be 2 minutes long. However, once I actually watch the video it stops before the first jump.

Is there a way to solve this within Krita? Or instead, perhaps a way to rename all images easily with some command in a terminal?

1 Answer 1

0

There's a plugin for this specifically: https://krita-artists.org/t/plugin-rebeccas-krita-tools/79845?u=sooz

I didn't test it because I made a Python script instead. Run it in a folder containing an input folder with the Krita frames, and an empty output folder. The resulting correctly named frames are then in the output folder.

import os
import shutil

def int_to_filename(i):
    result = ".jpg"
    j = i
    for _ in range(7):
        x = j % 10
        j = j // 10
        result = str(x) + result
    return result
    

myFiles= os.listdir('input')
myFiles.sort()
i=0
for file in myFiles:
    shutil.copyfile("./input/" + file, "./output/" + int_to_filename(i))
    i=i+1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.