Skip to content

Commit 72c6d45

Browse files
author
arch
committed
2D-Video param for rotation, adopted from Zalunda
1 parent 496741a commit 72c6d45

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

funscript_editor/config/projection.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,35 @@ vr_he_180_ou:
104104
increase: "-"
105105
decrease: "+"
106106

107+
107108
flat:
108109
name: '2D Video'
109-
video_filter: 'scale=${width}:${height}'
110+
video_filter: "scale=${width}:${height}"
110111
parameter:
111112
height: 720
112113
width: -1
114+
115+
116+
flat_with_parameters:
117+
name: '2D Video with Filters'
118+
video_filter: "pad='max(ih,iw):max(ih,iw):max(ih,iw)/2:max(ih,iw)/2',scale=${width}:${height},rotate='(PI/180)*${rotation}',crop='iw*1/max(1, ${zoom}/5):ih*1/max(1, ${zoom}/5):2*${x}:2*${y}',scale=${width}:${height}"
119+
parameter:
120+
height: 1024
121+
width: 1024
122+
zoom: 5
123+
x: 0
124+
y: 0
125+
rotation: 0
126+
keys:
127+
y:
128+
increase: "s"
129+
decrease: "w"
130+
x:
131+
increase: "d"
132+
decrease: "a"
133+
zoom:
134+
increase: "+"
135+
decrease: "-"
136+
rotation:
137+
increase: "e"
138+
decrease: "q"

funscript_editor/data/ffmpegstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_projection(
170170
command = [
171171
FFmpegStream.get_ffmpeg_command(),
172172
'-hide_banner',
173-
'-loglevel', 'warning',
173+
'-loglevel', 'error',
174174
'-y',
175175
'-f', 'rawvideo',
176176
'-vcodec','rawvideo',

funscript_editor/ui/opencvui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def get_video_projection_config(self, image :np.ndarray, projection: str) -> dic
622622

623623
self.clear_keypress_queue()
624624

625-
self.logger.info("Show VR Menu")
625+
self.logger.info("Show ROI Menu")
626626
if len(ui_texte) > 0:
627627
# we need an user input
628628
parameter_changed, selected = True, False
@@ -650,7 +650,7 @@ def get_video_projection_config(self, image :np.ndarray, projection: str) -> dic
650650
if config['parameter']['height'] == -1:
651651
scaling = config['parameter']['width'] / float(w)
652652
config['parameter']['height'] = round(h * scaling)
653-
elif config[projection]['parameter']['width'] == -1:
653+
elif config['parameter']['width'] == -1:
654654
scaling = config['parameter']['height'] / float(h)
655655
config['parameter']['width'] = round(w * scaling)
656656
parameter_changed = True

0 commit comments

Comments
 (0)