diff --git a/auto_subtitle/cli.py b/auto_subtitle/cli.py index 3edc26b..088c011 100644 --- a/auto_subtitle/cli.py +++ b/auto_subtitle/cli.py @@ -47,9 +47,6 @@ def main(): if srt_only: return - # bash command to download a youtube video with `youtube-dl` and save it as `video.mp4`: - # youtube-dl -f 22 -o video.mp4 https://www.youtube.com/watch?v=QH2-TGUlwu4 - for path, srt_path in subtitles.items(): out_path = os.path.join(output_dir, f"{filename(path)}.mp4") @@ -58,7 +55,7 @@ def main(): video = ffmpeg.input(path) audio = video.audio - stderr = ffmpeg.concat( + ffmpeg.concat( video.filter('subtitles', srt_path, force_style="OutlineColour=&H40000000,BorderStyle=3"), audio, v=1, a=1 ).output(out_path).run(quiet=True, overwrite_output=True) diff --git a/requirements.txt b/requirements.txt index 4fd6dc1..73bca28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -youtube-dl -git+https://github.com/openai/whisper.git +openai-whisper diff --git a/setup.py b/setup.py index 5e027b7..ca2ed5b 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,3 @@ -import os - -import pkg_resources from setuptools import setup, find_packages setup( @@ -10,8 +7,7 @@ setup( py_modules=["auto_subtitle"], author="Miguel Piedrafita", install_requires=[ - 'youtube-dl', - 'whisper @ git+https://github.com/openai/whisper.git@main#egg=whisper' + 'openai-whisper', ], description="Automatically generate and embed subtitles into your videos", entry_points={