Skip to content

Commit b3b0bae

Browse files
author
arch
committed
ffmpeg stream add option for zoom
1 parent 3873ef5 commit b3b0bae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

funscript_editor/data/ffmpegstream.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,13 @@ def run(self) -> None:
365365
if self.current_frame - self.queue_size > 2 and wait_counter == 2500:
366366
self.logger.error("FFmpeg Frame Buffer overrun!!!")
367367

368-
self.frame_buffer.put(frame)
368+
if 'zoom' in self.config.keys():
369+
self.frame_buffer.put(frame[
370+
int(self.config['zoom'][1]):int(self.config['zoom'][1]+self.config['zoom'][3]),
371+
int(self.config['zoom'][0]):int(self.config['zoom'][0]+self.config['zoom'][2])
372+
])
373+
else:
374+
self.frame_buffer.put(frame)
369375
self.current_frame += 1
370376

371377
self.stopped = True

0 commit comments

Comments
 (0)