Basic usage:
# Works with srt files
subtitle-editor video.mp4 subtitles.srt
# Can take plaintext files as input
subtitle-editor video.mp4 subtitles.srt --input lyrics.txt
See the Tutorial for details.
- Install Homebrew
- Install system dependencies (get a coffee while this runs)
brew install ffmpeg pyenv portaudio
- Finalize your pyenv installation For zsh (standard in newer Macs) this will be:
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile echo 'eval "$(pyenv init -)"' >> ~/.zshrc
- Install python 3
pyenv install 3.7.11 # Or another python 3 version pyenv global 3.7.11
- Update pip (don't skip this)
pip install -U pip
pip install subtitle-editor
-
Create a plain text file that contains each subtitle on a separate line. Blank lines will be ignored. For example:
This is the first line This is the second line And so on
-
Import this file into subtitle-editor
cd /path/to/video/project subtitle-editor video.mp4 video.srt --input input.txt
The subtitle-editor will pre-render the frames of your video. Note: if video.srt already exists it will be overwritten.
-
Now you will create a rough cut of the subtitles. The idea here is to get your timestamps more or less right; you'll do a second pass to clean everything up later.
Type
P
to start playback, then press the spacebar to set the currently-selected timestamp and move to the next one. Keep going until you get to the end. -
Type
q
to save your work and exit to the terminal.video.srt
now exists with your rough cut of subtitles! -
Run subtitle-editor again, but without passing an input. This will allow you to edit the existing subtitle file.
subtitle-editor video.mp4 video.srt
-
For each subtitle, type
p
to play the video & audio for that subtitle. Use↑/↓/←/→
to navigate between subtitles and start/end times. Use-/_
and=/+
to modify the times until they are correct. -
Navigate back to the beginning and type
P
to play back the whole video with subtitles. If there are any issues, typep
to pause and make adjustments, then pressP
to resume playback. -
Type
q
to save your work and exit!
When you are using subtitle-editor, you have the following commands available.
<tab>/←/→ Switch between start/end timestamps
↑/↓ Select a subtitle
=/+ Increase the selected timestamp by one frame / 1 sec
-/_ Decrease the selected timestamp by one frame / 1 sec
P Enter / leave playback mode
<space> In playback mode, set the current timestamp and move to the next one
u In playback mode, "undo" by moving back one timestamp (does not
actually undo the change)
p In standard mode, play the video between the start/end timestamps
of the current subtitle
q Save and exit
Ctrl + c Exit without saving
? Display help message