Skip to content

juanscr/subtrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subtrack

License Rust Version Yet another ffmpeg wrapper!

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.

Table of contents

Installation

To install subtrack, ensure you have Rust and Cargo installed, then run:

cargo install --path .

Usage

subtrack [OPTIONS] <INPUT_FILE> --subtitle <SUBTITLE_FILE,LANGUAGE>...

Options

  • -o, --output-file <OUTPUT_FILE>: The name of the output video file. If not provided, the name of your input file with the suffix -subs will 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 include append and overwrite.
  • -t, --temp-subtitle-handling <SUBTITLE_HANDLING>: Changes the way how the created fixed subtitle files are handled. Options include keep, replace and remove.

Examples

Add a single subtitle to a video:

subtrack --subtitle my_subtitle.srt,english my_video.mp4

Add multiple subtitles to a video:

subtrack -s my_subtitle_en.srt,english -s my_subtitle_es.srt,spanish my_video.mkv

Add subtitles with a custom output file name:

subtrack -o my_output_video.mp4 -s my_subtitle.srt,english my_video.mp4

Add new subtitles while keeping the original ones:

subtrack -b append -s my_subtitle.srt,english my_video.mp4

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Acknowledgements

This CLI tool wouldn't be possible without this amazing tools:

  • FFmpeg for the powerful multimedia framework.
  • Rust for the safe and fast programming language.

Made with Rust

About

Minimal and simple to use CLI to add subtitles to a video using ffmpeg.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages