Skip to content

Commit 5152448

Browse files
author
arch
committed
allow low res vr videos
1 parent 6f32e4c commit 5152448

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

funscript_editor/data/ffmpegstream.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def get_projection(
142142
Returns:
143143
np.ndarray: projected opencv image
144144
"""
145+
# Ensure the image is large enough to get an output from ffmpeg v360 filter
146+
scale_w = 1.25 * config['parameter']['width'] / frame.shape[1]
147+
scale_h = 1.25 * config['parameter']['height'] / frame.shape[0]
148+
scale = max((scale_w, scale_h))
149+
if scale > 1.0:
150+
frame = cv2.resize(frame, None, fx=scale, fy=scale)
151+
145152
dimension = '{}x{}'.format(frame.shape[1], frame.shape[0])
146153

147154
video_filter = config['video_filter']
@@ -168,6 +175,7 @@ def get_projection(
168175
'-'
169176
]
170177

178+
# print('cmd', command)
171179
pipe = sp.Popen(
172180
command,
173181
stdin = sp.PIPE,

funscript_editor/ui/opencvui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ def get_video_projection_config(self, image :np.ndarray, projection: str) -> dic
620620

621621
self.clear_keypress_queue()
622622

623+
self.logger.info("Show VR Menu")
623624
if len(ui_texte) > 0:
624625
# we need an user input
625626
parameter_changed, selected = True, False

0 commit comments

Comments
 (0)