@@ -80,15 +80,41 @@ cleanup() {
80
80
}
81
81
82
82
print_help () {
83
- echo " ################################################################################"
84
- echo " Usage: ./examples/yt-wsp.sh <video_url>"
85
- echo " # See configurable env variables in the script; there are many!"
86
- echo " # This script will produce an MP4 muxed file in the working directory; it will"
87
- echo " # be named for the title and id of the video."
88
- echo " # passing in https://youtu.be/VYJtb2YXae8 produces a file named" ;
89
- echo " # 'Why_we_all_need_subtitles_now-VYJtb2YXae8-res.mp4'"
90
- echo " # Requirements: ffmpeg yt-dlp whisper.cpp"
91
- echo " ################################################################################"
83
+ cat << 'EOF '
84
+ Usage:
85
+ MODEL_PATH=<model> \
86
+ WHISPER_EXECUTABLE=<whisper-cli> \
87
+ WHISPER_LANG=en \
88
+ WHISPER_THREAD_COUNT=<int> \
89
+ ./examples/yt-wsp.sh <video_url>
90
+
91
+ Description:
92
+ This script downloads a YouTube video, generates subtitles using Whisper,
93
+ and muxes them into an MP4 output file.
94
+
95
+ Output:
96
+ An MP4 file with embedded subtitles will be produced in the working directory.
97
+ The file will be named using the video title and ID.
98
+ Example:
99
+ Input: https://youtu.be/VYJtb2YXae8
100
+ Output: Why_we_all_need_subtitles_now-VYJtb2YXae8-res.mp4
101
+
102
+ Requirements:
103
+ - ffmpeg
104
+ - yt-dlp
105
+ - whisper.cpp
106
+
107
+ Environment Variables:
108
+ MODEL_PATH Path to the Whisper model (e.g., models/ggml-base.en.bin)
109
+ WHISPER_EXECUTABLE Path to the Whisper CLI executable
110
+ WHISPER_LANG Language code (e.g., 'en' for English)
111
+ WHISPER_THREAD_COUNT Number of CPU threads to use
112
+
113
+ Tip:
114
+ The script has many configurable environment variables.
115
+ Review the source code to explore all options.
116
+
117
+ EOF
92
118
}
93
119
94
120
check_requirements () {
0 commit comments