Extract TX3G Subtitles from MP4 to SRT with FFmpeg

This guide provides a straightforward, step-by-step tutorial on how to extract a tx3g subtitle track from an MP4 video container and convert it into a standard SRT subtitle file using the command-line tool FFmpeg. You will learn how to identify the correct subtitle stream inside your MP4 file and execute the exact FFmpeg command needed to perform the extraction and conversion automatically.

Step 1: Identify the Subtitle Stream

Before extracting the subtitle, you must identify which stream index corresponds to the tx3g subtitle track. Open your terminal or command prompt and run the following command:

ffmpeg -i input.mp4

Look through the console output for the “Stream” entries. You are looking for a line that mentions “Subtitle: tx3g”. It will look similar to this:

Stream #0:2(eng): Subtitle: tx3g (tx3g / 0x67337874), 0 kb/s (default)

In this example, the subtitle track is located at stream index 0:2 (the third stream of the first input file).

Step 2: Extract and Convert to SRT

Once you know the stream index, you can extract the subtitle track. FFmpeg will automatically convert the tx3g format into the SRT format based on the .srt file extension specified in the output file name.

Option A: Extract the first subtitle stream

If your MP4 file contains only one subtitle track, you can target the first subtitle stream dynamically using -map 0:s:0:

ffmpeg -i input.mp4 -map 0:s:0 output.srt

Option B: Extract a specific subtitle stream index

If your file has multiple subtitle tracks and you want to extract a specific one (for example, index 0:2 identified in Step 1), map the specific index directly:

ffmpeg -i input.mp4 -map 0:2 output.srt

Explanation of the Parameters