Various scrappy tools for media production.
⚠️ This repository is made up of scripts that I have cobbled together to aid in producing videos for my website. They were made quickly with LLM assistance with minimal concern for maintainability. They are meant to run on a Mac with Node.js, Xcode, Compressor, and HTTP Live Streaming Tools.
Run these commands:
npm install
./setup.sh
The setup.sh
script will download and set up whisper.cpp. The Whisper model is a large
file, so beware of doing this on a metered connection.
The bin/whisper.js
script can be used to transcribe video files in WebVTT format. It will
first extract the audio to a WAV file that will work with whisper.cpp.
The --track
option can be used to specify the track number to transcribe. I use this
because I record with OBS set up to record a separate audio track for my microphone that
does have noise gate or other filters applied. Interestingly, the Whisper model seems to be
faster at transcribing when there is some background noise and a bit less prone to repeating
the last phrase over and over.
Once you have a master 4K ProRes video ready for distribution, follow these steps to prepare it for being served via HLS:
- Drop it onto
Applications/Encode for HLS.app
to create a directory of MP4 files of various encodings. - Create a
poster.jpeg
file in that directory to serve as the video’s poster image. - Create an
en-us.vtt
file in that directory to serve as captions for the video. - Run
bin/hls-prep.js DIR
to create HLS manifest M3U8 files and segments. - A new directory will be created inside that directory with a ULID. Upload this directory to S3.