Seamlessly add subtitles to your video files with ease!
- Automatic Subtitle Detection: Automatically detects subtitle formats and encodes the content to UTF8.
- Multiple Subtitle Streams: Supports adding multiple subtitle streams to your video files, with the proper language metadata.
- Format Support: Works with video formats like MP4 and MKV.
To install subtrack, ensure you have Rust and Cargo installed, then run:
cargo install --path .subtrack [OPTIONS] <INPUT_FILE> --subtitle <SUBTITLE_FILE,LANGUAGE>...-o, --output-file <OUTPUT_FILE>: The name of the output video file. If not provided, the name of your input file with the suffix-subswill be created.-s, --subtitle <SUBTITLE_FILE,LANGUAGE>: The subtitle file and language separated by a comma. This option can be used multiple times to add multiple subtitles.-b, --behavior <BEHAVIOR>: How subtitles are added to the video container. Options includeappendandoverwrite.-t, --temp-subtitle-handling <SUBTITLE_HANDLING>: Changes the way how the created fixed subtitle files are handled. Options includekeep,replaceandremove.
Add a single subtitle to a video:
subtrack --subtitle my_subtitle.srt,english my_video.mp4Add multiple subtitles to a video:
subtrack -s my_subtitle_en.srt,english -s my_subtitle_es.srt,spanish my_video.mkvAdd subtitles with a custom output file name:
subtrack -o my_output_video.mp4 -s my_subtitle.srt,english my_video.mp4Add new subtitles while keeping the original ones:
subtrack -b append -s my_subtitle.srt,english my_video.mp4This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
This CLI tool wouldn't be possible without this amazing tools: