only use oxframe for webm

This commit is contained in:
j 2026-01-12 19:06:52 +00:00
commit ac0a3df9a7

View file

@ -405,11 +405,11 @@ def frame(video, frame, position, height=128, redo=False, info=None):
folder = os.path.dirname(frame)
if redo or not exists(frame):
ox.makedirs(folder)
if video.endswith('.mp4'):
cmd = ffmpeg_frame_cmd(video, frame, position, height)
else:
if video.endswith('.webm'):
cmd = ['oxframe', '-i', video, '-o', frame,
'-p', str(position), '-y', str(height)]
else:
cmd = ffmpeg_frame_cmd(video, frame, position, height)
run_command(cmd)
def ffmpeg_frame_cmd(video, frame, position, height=128):