How to Auto-Generate Subtitles for Videos using Python, OpenAI Whisper & FFMPEG
Автор: Generative Geek
Загружено: 16 мая 2024 г.
Просмотров: 2 016 просмотров
Reach a wider audience and boost your video engagement. In this video, you'll learn how to automatically generate subtitles for any video using Python, OpenAI's Whisper, and FFMPEG!
We'll walk you through the entire process step-by-step, including:
Downloading any YouTube video using PyTube.
Extracting the audio from your video with FFMPEG.
Leveraging the cutting-edge OpenAI Whisper model to transcribe the audio into text. We'll use the faster-whisper library for blazing-fast transcription speeds!
Formatting the transcription into a proper SRT (SubRip Subtitle) file.
Seamlessly embedding the subtitles back into your video using FFMPEG.
Code Repository : https://github.com/technofriends/add-...
Chapters
(00:00) Introduction
(02:58) Environment creation
(03:56) Faster Whisper for Transcription
(05:52) Downloading Video using pytube
(10:12) Extracting Audio from Video using ffmpeg
(15:40) Transcription using Whisper
(25:42) Formatting time for Subrip SRT
(28:53) Generating Subtitles
(34:10) Adding subtitle to the video
(38:42) Output Demonstration
This is the ultimate guide to automated subtitle generation, and by the end, you'll be able to add subtitles to your own videos with ease!
Ready to dive in? Here's what you'll need:
Python installed on your system.
The following Python libraries:
pytube
ffmpeg-python
faster-whisper
You can install these libraries easily using pip install pytube ffmpeg-python faster-whisper.
Let's automate those subtitles! 🔥
#python #opensouce #ai #subtitles #youtube #videoediting #ffmpeg #whisper #tutorial #codealong #programming

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: