Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



ffProbe - How to ge...
 
Share:
Notifications
Clear all

[Solved] ffProbe - How to generate a list of subtitles in a video file

1 Posts
1 Users
0 Reactions
291 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2854
Topic starter  

I was looking for a quick way to generate a list of subtitles found in a given video file using ffmpeg.

This does the trick:

ffprobe YourVideoFile.mkv  2>&1 | grep "Subtitle"

 

which generates a list like so:

  Stream #0:2(eng): Subtitle: subrip (srt)
  Stream #0:3(eng): Subtitle: subrip (srt) (original) (hearing impaired)

Or more advanced:

ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 YourVideoFile.mkv

Which generates a more concise list:

2,eng
3,eng

Or if you only want to see the English (eng) subtitles:

ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=eng -of csv=p=0 YourVideoFile.mkv

Which generates:

2
3

   
ReplyQuote
Share: