Sign inSign up

eiliya/auto-subtitle

By eiliya

•Updated over 2 years ago

Docker image based on https://github.com/m1guelpf/auto-subtitle

Image
Machine learning & AI
Developer tools
0

1.6K

eiliya/auto-subtitle repository overview

⁠Automatic subtitles in your videos

This repository uses ffmpeg and OpenAI's Whisper⁠ to automatically generate and overlay subtitles on any video.

⁠Installation

For manual installation refer to the original git repo: https://github.com/m1guelpf/auto-subtitle⁠

⁠Docker

You can use docker to make subtitle Docker image:

eiliya/auto-subtitle

The default setting (which selects the small model) works well for transcribing English. You can optionally use a bigger model for better results (especially with other languages).

Different images for different models (Don't need to specify model name on the command anymore):

- Tiny: eiliya/auto-subtitle:tiny
- Small: eiliya/auto-subtitle:small   (Also as latest: eiliya/auto-subtitle)
- Medium: eiliya/auto-subtitle:medium
- Large: eiliya/auto-subtitle:large

Note: You need to mount your current folder (or any folder that your video exist on, to /root folder of container)

docker run --rm -v .:/media eiliya/auto-subtitle

Sample of full docker run command with additional commands:

docker run --rm -v .:/media eiliya/auto-subtitle --srt_only true --task translate video.mp4 

Or

docker run --rm -v /path/to:/media eiliya/auto-subtitle --srt_only true --task translate video.mp4 

Or

docker run --rm -v /path/to:/media eiliya/auto-subtitle video.mp4 --srt_only true --task translate 

As you can see, you still can pass auto_subtitle commands by docker

⁠Usage

The following command will generate a subtitled/video.mp4 file contained the input video with overlayed subtitles.

auto_subtitle video.mp4 -o subtitled/

Adding --task translate will translate the subtitles into English:

auto_subtitle video.mp4 --task translate

Just SRT file:

auto_subtitle /path/to/video.mp4 --srt_only true

Run the following to view all available options:

auto_subtitle --help

⁠License

This script is open-source and licensed under the MIT License. For more details, check the LICENSE⁠ file.

Forked github repo: https://github.com/eiliyaabedini/auto-subtitle/tree/main⁠

Tag summary

Content type

Image

Digest

sha256:a9b40cd89…

Size

6.3 GB

Last updated

over 2 years ago

docker pull eiliya/auto-subtitle