From 169d3410a1dec6ce03d1dbcb4f0b72bae1cc7209 Mon Sep 17 00:00:00 2001 From: likho Date: Thu, 20 Feb 2025 01:49:51 -0800 Subject: [PATCH] Moved python script to a different folder. --- Makefile | 9 ++++----- README.md | 6 +++--- parse-subs.py => scripts/parse-subs.py | 0 3 files changed, 7 insertions(+), 8 deletions(-) rename parse-subs.py => scripts/parse-subs.py (100%) diff --git a/Makefile b/Makefile index 0fa6ec9..8020cf7 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,13 @@ -ORIGINAL_SUBS=original-subs.fr.vtt -UNSYNCRONIZED=1-ere-french-raw.vtt +ORIGINAL_SUBS=autogen-subs VIDEO=1ere-introcut.mp4 cleansubs: - python parse-subs.py $(ORIGINAL_SUBS) - ffmpeg -i 1ere.mkv -i output.vtt -vcodec copy -acodec copy -c:s mov_text test.mp4 -y + python scripts/parse-subs.py $(ORIGINAL_SUBS).fr.vtt +# ffmpeg -i 1ere.mkv -i output.vtt -vcodec copy -acodec copy -c:s mov_text test.mp4 -y getsubs: - yt-dlp --write-auto-subs --sub-lang=fr --skip-download https://www.youtube.com/watch?v=WRq2197FlMw -o original-subs + yt-dlp --write-auto-subs --sub-lang=fr --skip-download https://www.youtube.com/watch?v=WRq2197FlMw -o autogen-subs # omit the music clip: diff --git a/README.md b/README.md index 1c808c9..ca78bec 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,15 @@ The original video and the autogenerated captions in French can be sourced from ## Setup -The following command downloads auto-generated captions from YouTube to a new file named `original-subs.fr.vtt`. +Run the following to download auto-generated captions from YouTube to a new file named `original-subs.fr.vtt`. yt-dlp --write-auto-subs --sub-lang=fr --skip-download https://www.youtube.com/watch?v=WRq2197FlMw -o original-subs Other video players such as `mpv` might not display YouTube's auto-generated captions properly. The following removes duplicate and resyncs captions. - python parse-subs.py original-subs.fr.vtt + python scripts/parse-subs.py original-subs.fr.vtt -## Other Notes +## Notes The `Makefile` contains some reference for using `yt-dlp` and `ffmpeg` but does not function without downloading the entire video and renaming some files. diff --git a/parse-subs.py b/scripts/parse-subs.py similarity index 100% rename from parse-subs.py rename to scripts/parse-subs.py