I'm struggling with my converter from mp4 to gif.
Its basically been put together from imageio website and YouTube, but cant get it to work.
#[python converter.py]
import imageio
import os
clip = os.path.abspath('six.mp4')
def gifMaker(inputPath,targetFormat):
outputPath = os.path.splitext(inputPath)[0] + (targetFormat)
print(f'converting {inputPath} \n to {outputPath}')
reader = imageio.get_reader(inputPath)
fps = reader.get_meta_data()['fps']
writer = imageio.get_reader(outputPath, fps=fps)
for frames in reader:
writer.append_data(frames)
print (f'frame {frames}')
print('Klart')
writer.close()
gifMaker (clip, '.gif')