add passthrough editor
This commit is contained in:
parent
174a828988
commit
d83aeba336
8
main.py
8
main.py
@ -14,13 +14,14 @@ check_ffmpeg()
|
|||||||
|
|
||||||
from src.editors.amplitude.editor import AmplitudeEditor
|
from src.editors.amplitude.editor import AmplitudeEditor
|
||||||
from src.editors.sentiment.editor import SentimentEditor
|
from src.editors.sentiment.editor import SentimentEditor
|
||||||
|
from src.editors.passthrough.editor import PassthroughEditor
|
||||||
from src.math.cost import quadratic_loss
|
from src.math.cost import quadratic_loss
|
||||||
from src.mediautils.audio import extract_audio_from_video
|
from src.mediautils.audio import extract_audio_from_video
|
||||||
from src.mediautils.video import render_moments
|
from src.mediautils.video import render_moments
|
||||||
|
|
||||||
log = structlog.get_logger()
|
log = structlog.get_logger()
|
||||||
|
|
||||||
EDITORS = {"amplitude": AmplitudeEditor, "sentiment": SentimentEditor}
|
EDITORS = {"amplitude": AmplitudeEditor, "sentiment": SentimentEditor, "passthrough": PassthroughEditor}
|
||||||
|
|
||||||
ERROR_FUNCS = {"quadratic": quadratic_loss}
|
ERROR_FUNCS = {"quadratic": quadratic_loss}
|
||||||
|
|
||||||
@ -158,6 +159,11 @@ if __name__ == "__main__":
|
|||||||
choices=["base", "tiny", "small", "medium", "large"],
|
choices=["base", "tiny", "small", "medium", "large"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser_passthrough = subparsers.add_parser(
|
||||||
|
"passthrough",
|
||||||
|
help="The passthrough editor simply cuts the video to the target length provided",
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-p",
|
"-p",
|
||||||
"--parallelism",
|
"--parallelism",
|
||||||
|
0
src/editors/passthrough/__init__.py
Normal file
0
src/editors/passthrough/__init__.py
Normal file
12
src/editors/passthrough/editor.py
Normal file
12
src/editors/passthrough/editor.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from ...models.moment import Moment
|
||||||
|
|
||||||
|
|
||||||
|
class PassthroughEditor:
|
||||||
|
def __init__(self, video_path, audio_path, params):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def edit(self, large_window, small_window, params):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def full_edit(self, costfunc, desired_time, params):
|
||||||
|
return [Moment(0, desired_time)]
|
Loading…
Reference in New Issue
Block a user