Search code examples
terminalsubtitleffprobe

Use `ffprobe` to display subtitle content like the `cat` command


How to use ffprobe to select a subtitle from an mkv file and display its content?

I expect to have the subtitle content printed on the terminal like the command cat would do to a subtitle file.

I know its possible to export the subtitle file and then cat it, but is there a direct use for probe?


Solution

  • I don't believe you can do that with ffprobe, but ffmpeg can do that, and output the subtitles to stdout.

    ffmpeg -i video.mkv -f srt -
    

    You can switch out srt for any other subtitle format ffmpeg understands, such as ass.