Skip to content

Commit 3a19a1a

Browse files
author
arch
committed
improve ffmpeg stream
1 parent b3b0bae commit 3a19a1a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

funscript_editor/data/ffmpegstream.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,15 @@ def run(self) -> None:
366366
self.logger.error("FFmpeg Frame Buffer overrun!!!")
367367

368368
if 'zoom' in self.config.keys():
369-
self.frame_buffer.put(frame[
369+
frame = frame[
370370
int(self.config['zoom'][1]):int(self.config['zoom'][1]+self.config['zoom'][3]),
371371
int(self.config['zoom'][0]):int(self.config['zoom'][0]+self.config['zoom'][2])
372-
])
373-
else:
374-
self.frame_buffer.put(frame)
372+
]
373+
374+
if 'resize' in self.config.keys():
375+
frame = cv2.resize(frame, self.config['resize'])
376+
377+
self.frame_buffer.put(frame)
375378
self.current_frame += 1
376379

377380
self.stopped = True

0 commit comments

Comments
 (0)