How to automate blender video sequencer
Yes, blenders sequencer has full Python API access so it can be used to do quite advanced video editing both from the UI or in background mode (headless).
import os

from bpy import context
scene = context.scene

path = &quot;/my_path/to/images&quot;
files = os.listdir(path)
files.sort()

# create the sequencer data
scene.sequence_editor_create()

seq = scene.sequence_editor.sequences.new_image(
        name=&quot;MyStrip&quot;,
        filepath=os.path.join(path, files[0]),
        channel=1, frame_start=1)

# add the rest of the images.
for f in files:
    seq.elements.append(f)

# reverse if you want
seq.use_reverse_frames = False

# You may want to render the result:
render = scene.render
scene.frame_start = 1
scene.frame_end = 1 + len(files)

render.resolution_x = 1280
render.resolution_y = 720
render.fps = 25

render.image_settings.file_format = 'FFMPEG'
render.ffmpeg.format = 'MPEG4'
render.ffmpeg.codec = 'H264'

render.ffmpeg.constant_rate_factor = 'HIGH'
render.ffmpeg.ffmpeg_preset = 'BEST'

bpy.ops.render.render(animation=True)

The rest I'm sure you can work out as you may want to tweak encoding, frame rate... etc.