mirror of
https://github.com/Nezumi-2711/auto-subtitle.git
synced 2026-09-22 13:38:41 +00:00
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user