Hello! so I was trying to export a recording where i had manually deleted all white empty frames (caused by isolation mode most probably) but now it stops just before the first frame i deleted since it can’t find it (i double checked that with the log file it generates) …
Is there anyway I can configure it to manually skip frames that are not there? Or have it somehow rename all the frames soo that there are no gaps between them??
Hey, I have often a similar issue because I often blink my top ‘paint-over’ layer during the process and it put a lot of flickers on my timelapse. Sometime it is too strong and I have to remove the bad frames and then mass rename all files.
Maybe we could “Feature Request” Krita to get this mass renaming done before launching a video export to auto-repair the gaps.
I’m not sure if a ffmpeg argument in the source code could change the behavior of ffmpeg.
sooo i ended up making a quick python script that does it. You must have python isntalled, and then you past it into a .py file and run it it will ask for your directory and will rename the files according to the naming convention krita has, however it would be very useful if it was somehow an option!
I haven’t test it a lot, so please do back up the folder just in case, but it worked in my case!
import os
def rename_files_sequentially(directory):
# List all files in the directory and sort them by their numerical value extracted from the filename
files = sorted([f for f in os.listdir(directory) if f.endswith('.jpg')], key=lambda x: int(x.split('.')[0]))
total_files = len(files)
print(f"Total files to rename: {total_files}")
# Keep track of the new file number
new_file_number = 0 # Start with 0 for the first file to be '0000000.jpg'
# Go through all files and rename them
for file in files:
# Define the new file name with seven leading zeros
new_file_name = f"{str(new_file_number).zfill(7)}.jpg"
# Create the full file paths
old_file_path = os.path.join(directory, file)
new_file_path = os.path.join(directory, new_file_name)
# Rename the file
os.rename(old_file_path, new_file_path)
# Increment the file number
new_file_number += 1
# Print the progress
print(f"Renaming {file} -> {new_file_name} ({new_file_number}/{total_files})")
print("Renaming complete.")
# Ask for the directory from the user
directory = input("Enter the directory path where your images are located: ")
# Check if the directory exists
if os.path.isdir(directory):
# Call the function
rename_files_sequentially(directory)
else:
print("The directory does not exist. Please check the path and try again.")
I will do so! I think its an important little feature as i almost always want to edit some small parts of the recording by manually deleting the frames. I usually also sort the frames by size and then delete all the white ones all in once!