A Chrome extension that gets a website video stream and subtitles it in any language.
Demo
·
Report Bug
·
Request Feature
Table of Contents
The project consist of a Chrome extension that gets a website video stream and sends it to a Python backend which generates its subtitle in any other language and output the subtitled video.
I used it to add subtitles to my favorite TV news: Arte Journal.
This project is a pipepline of different processes as follows:
- The Chrome Extension detects HTTP reponses containing .m3u8 stream payloads and send it to the project's backend
- The stream is turned into a video and audio file using the ffmpeg-python library
- The audio file is transformed into timed transcripts using openAI's whisper
- The transcript is translated in the target language using Google Translate
- The translated transcript is merged to the original video as subtitles using the ffmpeg-python library
The whole process take around 40min for a 20min video.
Arte.Journal.subber.light.mp4
This project needs a environment with Python and pip
.
- Load the
extension
folder in Chrome following these steps - Install python packages using the Makefile command:
make install
- Run the backend with the Makefile command:
make dev-run
Check and follow the steps of the video Demo.
- Build the basic pipeline
- Adapt frontend for any video stream
- Add websocket for front/back end communication
- Adapt project for multiple users
- Store assets on cloud services
- Improve processing speed
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License.
- Thanks to Tomo for inspiring and hinting way to build this project
- Img Shields
- GitHub Pages