Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To extract hdmv pgs subtitles from an mkv file and convert them to srt format using ffmpeg, follow these steps:

  1. Install ffmpeg: If you don't have ffmpeg installed on your system, you can download it from the official website.

  2. Locate the subtitle track: Use the following command to list all the subtitle tracks in your mkv file:

    ffmpeg -i input.mkv

    The output will show you all the subtitle tracks available in the file. Note down the number of the track you want to extract.

  3. Extract the subtitle track: Use the following command to extract the subtitle track from the mkv file:

    ffmpeg -i input.mkv -map 0:s:0 subs.sup

    Replace "0:s:0" with the track number you want to extract. The output file is in hdmv pgs format with a .sup file extension.

  4. Convert to srt format: Use the following command to convert the hdmv pgs file to srt format:

    ffmpeg -i subs.sup subs.srt

    This will create a new file named subs.srt in the same directory as the subs.sup file.

  5. Remove the .sup file: You can now remove the .sup file using:

    rm subs.sup

That's it! You have now extracted and converted hdmv pgs subtitles to srt format using ffmpeg.