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!



macOS/Linux: Find P...
 
Share:
Notifications
Clear all

[Solved] macOS/Linux: Find PGD/VOBSUB subtitle and extract it with ffmpeg

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

To find if our video file has a PGS or VOBSUB video track, we first need to find what subtitles are available in the video file:

ffprobe video.mkv 2>&1 | grep Subtitle

This will generate something like this:

Stream #0:3(eng): Subtitle: subrip (srt) (default) (forced)
Stream #0:4(eng): Subtitle: subrip (srt)
Stream #0:5(eng): Subtitle: subrip (srt) (hearing impaired)
Stream #0:6(dut): Subtitle: subrip (pgs)

 

We're looking for a Dutch (dut) PGS subtitle, so that would be stream #0:6 in this example.

Now we can extract this PGS subtitle as a SUP file:

ffmpeg -i filename.mkv -map 0:s:6 -c:s copy -f sup output.sup

 

(here "0:s:6" stands for stream #0:6 - the pgs subtitle we want)

No you can use Subtitle Edit (only available for Windows, so you will need a virtual machine or a Windows PC) to convert this with OCR to a plain text SRT.



   
ReplyQuote
Share: