-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
import argparse | ||
import logging | ||
from pathlib import Path | ||
|
||
from transciption_generator import TranscriptionGenerator | ||
from video_transcoder import VideoTranscoder | ||
|
||
|
||
def main() -> None: | ||
if __name__ == "__main__": | ||
logging.basicConfig(format="%(asctime)s | %(levelname)s | %(message)s", level=logging.DEBUG) | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("videos", type=argparse.FileType("r"), help="Path to input videos for preprocessing") | ||
parser.add_argument("--transcoded-videos-dir", "-v", type=argparse.FileType("w"), default="transcoded_videos", help="Path for output videos after transcoding") | ||
parser.add_argument("--transcription-jsons-dir", "-j", type=argparse.FileType("w"), default="transcriptions", help="Path for output transcriptions JSONs") | ||
parser.add_argument("videos", type=Path, help="Path to input videos for preprocessing") | ||
|
||
# 2 subparsers to split stuff | ||
# add defaults from classes here | ||
parser.add_argument("--transcoded-videos-dir", "-v", type=Path, default="transcoded_videos", help="Path for output videos after transcoding") | ||
parser.add_argument("--transcription-jsons-dir", "-j", type=Path, default="transcriptions", help="Path for output transcriptions JSONs") | ||
|
||
args = parser.parse_args() | ||
|
||
|
||
TranscriptionGenerator(args.videos, args.transcription_jsons_dir).transcribe() | ||
VideoTranscoder(args.videos, args.transcoded_videos_dir).transcode() | ||
|
||
# pass transcriptions to elastic | ||
# split two paths to be async | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters