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) folder = os.path.dirname(frame)
if redo or not exists(frame): if redo or not exists(frame):
ox.makedirs(folder) ox.makedirs(folder)
if video.endswith('.mp4'): if video.endswith('.webm'):
cmd = ffmpeg_frame_cmd(video, frame, position, height)
else:
cmd = ['oxframe', '-i', video, '-o', frame, cmd = ['oxframe', '-i', video, '-o', frame,
'-p', str(position), '-y', str(height)] '-p', str(position), '-y', str(height)]
else:
cmd = ffmpeg_frame_cmd(video, frame, position, height)
run_command(cmd) run_command(cmd)
def ffmpeg_frame_cmd(video, frame, position, height=128): def ffmpeg_frame_cmd(video, frame, position, height=128):