10 clear steps will get you from a video file to a usable subtitle file, or tell you when OCR is unavoidable. If the file contains a soft subtitle track you can pull a clean SRT, VTT or ASS out with one ffmpeg command or a one-click GUI export. If subtitles are burned into the picture you must run OCR to convert image text into timed captions, and expect additional cleanup. Use ffmpeg -i video.mkv to inspect streams, and then either extract with ffmpeg -i video.mkv -map 0:2 -c:s copy subtitles.srt or run a local browser tool such as SubtitleTools.

1. Identify the subtitle type

Here's the answer you actually need, and I'll tell you straight. If the file contains a Soft subtitle track you don't need OCR. Soft subtitles are separate streams inside the container and can be toggled on or off. If the subtitles are Hardcoded they're burned into the picture frames and are part of the video. A third possibility is Auto-generated captions produced by platforms such as YouTube; those are created by the platform rather than embedded as a local track.

Look, many tools will report no subtitle streams even when subtitles are visible. If a media inspector finds nothing, treat that as a hint that the subtitles may be hardcoded rather than absent.

2. Inspect the file with a media tool

The immediate practical step recommended by the sources is to run Ffmpeg -i video.mkv to list all streams. The ffmpeg output will show video, audio and subtitle streams and provide stream indexes. If you see lines marked Subtitle or stream indexes such as 0:2 you have soft subtitle tracks you can extract directly.

Browser extractors such as SubtitleTools and EveryScribe will also analyse a file and list embedded subtitle tracks. The advantage of those browser tools is that they process files locally, as WebAssembly builds of ffmpeg, so your file isn't uploaded to a server. Desktop suites will do the same locally by default.

3. Extract soft subtitle tracks

If inspection reveals a subtitle stream, extract it without re-encoding. The simplest command-line approach uses ffmpeg. After identifying the stream index, run a copy map operation such as Ffmpeg -i video.mkv -map 0:2 -c:s copy subtitles.srt.

Change the stream index and output extension to match the subtitle codec, for example .ass for ASS or .sup for PGS.

Thing is, if you prefer a graphical route, desktop converters such as AnyMP4 expose an Export Subtitle File or Export SRT function inside a subtitle or edit panel. Typical documented workflow is Add Files, open the subtitle editor, then choose Export Subtitle File. VideoProc advertises a one-click extraction workflow and a Converter AI mode for batch work across multiple files.

Worked example: you run ffmpeg -i and see a subtitle at 0:2. Use ffmpeg -i video.mkv -map 0:2 -c:s copy out.srt. Open out.srt in a subtitle editor to verify line breaks and timing.

4. Convert image-based subtitle streams

Some containers carry image-based subtitle tracks rather than text. Common image-based formats are PGS (sup) and VobSub (sub/idx). You can't copy those into a text SRT without conversion. SubtitleTools documents converters for sup to srt and sub/idx to srt that transform image-based subtitle streams into text-based SRT.

The practical workflow is two-stage. First extract the image-based stream with ffmpeg using -c:s copy to a .sup or .sub/.idx file. Then run a dedicated converter that rasterises each subtitle image and applies OCR. If the converter can perform accurate recognition it will produce a timed text file. If not, you will need the rasterised images plus a separate OCR step.

If subtitles are burned into the picture you can't extract them as a data track. Multiple sources state that optical character recognition is the only workable path for burned-in text. The workflow is capture frames or subtitle-region images, run OCR tuned for subtitle layouts and timing, then reconstruct a timed SRT or VTT.

Expect extra work. OCR output must be cleaned and timing will often need manual correction. Sources don't converge on a single OCR product. The canonical guidance is that OCR will require additional cleanup and timing fixes after the raw recognition results arrive.

Worked example: export subtitle-region images at the original frame rate or at interval points where text appears. Run OCR on that image set. Use the timestamps from the extracted images to build initial timecodes, then open the result in a subtitle editor to tighten durations and fix recognition errors.

After extraction you will usually need to tidy the file. Typical tasks are removing formatting tags, fixing casing, normalising timecodes or merging dual-language files. SubtitleTools points users to SRT cleaner utilities that remove extraneous tags and change uppercase text to sentence case.

If the original used ASS/SSA styling and you need plain SRT, convert formats and then open the file in a subtitle editor to adjust line breaks, durations and positioning. AnyMP4 documents subtitle editing features in its converter, including font, size and placement controls, that you can use before exporting a final subtitle file.

For libraries of files you can automate extraction. The same ffmpeg commands can be placed in a script or called programmatically to scan folders and export subtitle streams. SubtitleTools suggests scripting ffmpeg calls, while VideoProc and other converter suites advertise batch modes you can queue multiple files into for simultaneous extraction.

Worked example: script a loop that runs ffmpeg -i on each file, parses the stream list for Subtitle entries, and, when present, runs ffmpeg -i file -map X -c:s copy to a named .srt. Use the same pattern for ASS or other extensions.

If you handle sensitive or private video files choose tools that perform local processing. SubtitleTools and EveryScribe both state their browser-based extractors run locally in the browser using WebAssembly builds of ffmpeg, so your file isn't uploaded to a server. Desktop converters also keep processing local by default.

By contrast, web services that require uploading will expose the file to third-party hosting. Verify the service privacy policy before you consent to upload.

Standard text-based subtitle outputs are SRT, VTT and ASS. Image-based outputs include SUP and SUB/IDX. Use SRT for broad compatibility, VTT for web players that prefer WebVTT, and ASS when styled positioning and rich formatting must be preserved.

After extraction and cleanup you can repurpose files for re-authoring, translation, synchronization with a higher-quality video, or accessibility publishing, subject to copyright constraints. VideoProc specifically notes copyright and fair-use considerations when extracting and reusing subtitle text.

If inspection shows no subtitle streams and OCR is impractical because of low resolution or occluded text, your remaining option is to generate new captions via speech-to-text transcription. Sources note that automatically generated captions exist on platforms such as YouTube, but they're generated by the platform rather than embedded as a clean track in your local file.

Expect that converting burned-in subs via OCR will require manual correction of OCR errors and timecodes. Preserving exact original styling and timing may not be possible when the subtitle is image-based.

First, Run Ffmpeg -i video.mkv to list streams. Second, If you see Subtitle or a stream index such as 0:2, extract with Ffmpeg -i video.mkv -map 0:2 -c:s copy subtitles.srt. Third, If the stream is image-based (PGS or VobSub), extract the .sup or .sub/.idx and convert with an image-to-text converter that rasterises images then OCRs them. Fourth, If subtitles are burned-in, capture frames and run OCR tuned for subtitle layouts, then correct timings in a subtitle editor. Fifth, If none of the above work, create new captions from speech-to-text, or check the platform for auto-generated captions.

First, If the file contains a soft subtitle track, extract directly with ffmpeg or a local tool such as SubtitleTools or EveryScribe. Second, Use ffmpeg -i to inspect streams, then ffmpeg -i video.mkv -map 0:2 -c:s copy subtitles.srt to extract. Third, Image-based tracks (PGS, VobSub) require conversion that rasterises images then applies OCR. Fourth, Burned-in subtitles require OCR and manual timing cleanup. Fifth, Keep private files local; SubtitleTools, EveryScribe and desktop suites run processing locally.

Related Articles

Run ffmpeg -i video.mkv to list streams. If you see a Subtitle stream extract it with ffmpeg -i video.mkv -map 0:2 -c:s copy subtitles.srt, or open the file in a local tool such as SubtitleTools to export embedded tracks without uploading your video.

This article was created with AI assistance.