Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opencv webengine support #3658

Merged
merged 20 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d4e88ec
added preprocessing dialog window
BrennoCaldato Jul 14, 2020
83f6e41
Added better integration with stabilizer effect
BrennoCaldato Jul 15, 2020
6f5855a
added comunication with CV processing effects
BrennoCaldato Jul 17, 2020
2b71b61
Merged with dynamic effects UI dialog
BrennoCaldato Jul 18, 2020
e3001da
Added interval to apply OpenCV effects
BrennoCaldato Jul 23, 2020
55f6103
Added integration with Object Detector effect
BrennoCaldato Jul 26, 2020
fddd047
Updating region widget selection, and fixing cancel effect which brok…
jonoomph Jul 27, 2020
612b1ea
Fixed objectDetection wrong file path
BrennoCaldato Jul 29, 2020
d5e9786
fixed bug with effects when cutting a clip
BrennoCaldato Jul 29, 2020
38411b0
Error handler for OpenCV effect not compiled with library
BrennoCaldato Aug 1, 2020
6ade049
minor fixes
BrennoCaldato Aug 1, 2020
1ee194d
Fixed effects bug on cut clips
BrennoCaldato Aug 8, 2020
cf7157f
Changed protobuf saving path and check OpenCV compatibility
BrennoCaldato Aug 8, 2020
f3c1985
Error handler for OpenCV effect not compiled with library
BrennoCaldato Aug 8, 2020
27d4325
Merged changes
BrennoCaldato Aug 8, 2020
8b34e26
Branch for merging with new-webengine-suppor
BrennoCaldato Aug 8, 2020
e0dc88c
Merge branch 'new-webengine-support' into opencv-webengine-support
BrennoCaldato Aug 8, 2020
be6422b
Correction bad path in pre-processing effects
BrennoCaldato Aug 8, 2020
5166926
Fixed file that was changed after merging with webengine branch
BrennoCaldato Aug 8, 2020
49e5cd6
removed unnecessary file
BrennoCaldato Aug 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ doc/_build
build
dist
openshot_qt.egg-info

protobuf_data/
187 changes: 187 additions & 0 deletions src/classes/effect_init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
"""
@file
@brief This file contains some Effect metadata related to pre-processing of Effects
@author Jonathan Thomas <jonathan@openshot.org>
@author Frank Dana <ferdnyc AT gmail com>

@section LICENSE

Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-source project
dedicated to delivering high quality video editing and animation solutions
to the world.

OpenShot Video Editor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

OpenShot Video Editor is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
"""

# Not all Effects support pre-processing, so for now, this is a hard-coded
# solution to providing the pre-processing params needed for these special effects.

effect_options = {
# TODO: Remove Example example options
"Example": [
{
"title": "Region",
"setting": "region",
"x": 0.05,
"y": 0.05,
"width": 0.25,
"height": 0.25,
"type": "rect"
},
{
"max": 100,
"title": "Volume",
"min": 0,
"setting": "volume",
"value": 75,
"type": "spinner"
},
{
"value": "blender",
"title": "Blender Command (path)",
"type": "text",
"setting": "blender_command"
},
{
"max": 192000,
"title": "Default Audio Sample Rate",
"min": 22050,
"setting": "default-samplerate",
"value": 44100,
"values": [
{
"value": 22050,
"name": "22050"
},
{
"value": 44100,
"name": "44100"
},
{
"value": 48000,
"name": "48000"
},
{
"value": 96000,
"name": "96000"
},
{
"value": 192000,
"name": "192000"
}
],
"type": "dropdown",
}
],

"Tracker": [
{
"title": "Region",
"setting": "region",
"x": 0.05,
"y": 0.05,
"width": 0.25,
"height": 0.25,
"first-frame": 1,
"type": "rect"
},

{
"title": "Tracker type",
"setting": "tracker-type",
"value": "KCF",
"values": [
{
"value": "KCF",
"name": "KCF"
},
{
"value": "MIL",
"name": "MIL"
},
{
"value": "BOOSTING",
"name": "BOOSTING"
},
{
"value": "TLD",
"name": "TLD"
},
{
"value": "MEDIANFLOW",
"name": "MEDIANFLOW"
},
{
"value": "MOSSE",
"name": "MOSSE"
},
{
"value": "CSRT",
"name": "CSRT"
}
],
"type": "dropdown",
}
],

"Stabilizer": [
{
"max": 100,
"title": "Smoothing window",
"min": 1,
"setting": "smoothing-window",
"value": 30,
"type": "spinner"
}
],

"Object Detector": [
{
"value": "../yolo/yolov3.weights",
"title": "Model Weights",
"type": "text",
"setting": "model-weights"
},
{
"value": "../yolo/yolov3.cfg",
"title": "Model Config",
"type": "text",
"setting": "model-config"
},
{
"value": "../yolo/obj.names",
"title": "Class names",
"type": "text",
"setting": "class-names"
},
{
"title": "Processing Device",
"setting": "processing-device",
"value": "GPU",
"values": [
{
"value": "GPU",
"name": "GPU"
},
{
"value": "CPU",
"name": "CPU"
}
],
"type": "dropdown",
}
]
}
4 changes: 3 additions & 1 deletion src/classes/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
USER_PROFILES_PATH = os.path.join(USER_PATH, "profiles")
USER_PRESETS_PATH = os.path.join(USER_PATH, "presets")
USER_TITLES_PATH = os.path.join(USER_PATH, "title_templates")
PROTOBUF_DATA_PATH = os.path.join(USER_PATH, "protobuf_data")
# User files
BACKUP_FILE = os.path.join(BACKUP_PATH, "backup.osp")
USER_DEFAULT_PROJECT = os.path.join(USER_PATH, "default.project")
Expand All @@ -70,7 +71,8 @@
for folder in [
USER_PATH, BACKUP_PATH, RECOVERY_PATH, THUMBNAIL_PATH, CACHE_PATH,
BLENDER_PATH, TITLE_PATH, TRANSITIONS_PATH, PREVIEW_CACHE_PATH,
USER_PROFILES_PATH, USER_PRESETS_PATH, USER_TITLES_PATH, EMOJIS_PATH ]:
USER_PROFILES_PATH, USER_PRESETS_PATH, USER_TITLES_PATH, EMOJIS_PATH,
PROTOBUF_DATA_PATH ]:
if not os.path.exists(os.fsencode(folder)):
os.makedirs(folder, exist_ok=True)

Expand Down
Binary file added src/effects/icons/objectdetector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/effects/icons/stabilizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/effects/icons/tracker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/windows/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class MainWindow(QMainWindow, updates.UpdateWatcher):
FoundVersionSignal = pyqtSignal(str)
WaveformReady = pyqtSignal(str, list)
TransformSignal = pyqtSignal(str)
SelectRegionSignal = pyqtSignal(str)
ExportStarted = pyqtSignal(str, int, int)
ExportFrame = pyqtSignal(str, int, int, int)
ExportEnded = pyqtSignal(str)
Expand Down
Loading