How to Extract Subtitles from a Video
First identify whether the video contains an actual caption track, only spoken audio, or text burned into the image. Then extract the track, transcribe the audio, or use OCR. Choosing the source correctly avoids unnecessary processing and produces a cleaner result.
Choose the method by subtitle source
The video has a selectable caption track
Extract the caption track
Fastest path. Usually preserves timestamps and language labels.
The video has speech but no usable captions
Use speech transcription
Creates a draft from audio. Accuracy depends on recording quality.
Text is permanently visible in the picture
Use video OCR
Reads image pixels. Requires frame sampling and careful cleanup.
You have a local media file with subtitle streams
Map and export the subtitle stream
A media tool such as FFmpeg can select a subtitle stream without transcribing audio.
How to handle local media files
A local MP4, MKV, WebM, or other container can contain video, audio, subtitle, and data streams. Inspect the stream list before deciding to transcribe the audio. If a subtitle stream already exists, select and export that stream.
FFmpeg documents automatic and manual stream selection, including explicit stream mapping. Subtitle codecs and output containers are not interchangeable, so the target format must support the selected subtitle stream or the stream must be converted.
If the text is burned into the picture, there is no separate subtitle stream to export. An OCR pipeline must sample frames, locate the text, recognize it, merge repeated frames, and reconstruct timing. That is a different workflow from caption extraction.