3

I'm trying to extract a subtitle in "HDMV PGS" format embedded in a video with this command ffmpeg -i Movie.mkv -map 0:s:0 subs.srt from an answer on Super User command, but it gives the error

Error initalizing output stream 0:0 -- subtitle encoding only possible from text to text or bitmap to bitmap
Stream mapping:
    Stream #0:3 -> #0:0 (hdmv_pgs_subtitle (pgsub) -> ass (ssa))
        Last message repeated 1 times

as shown in the screenshot enter image description here

What should I do?

Journeyman Geek
  • 133,878
Idhtft
  • 31

1 Answers1

2

To extract these bitmap-subtitles, you can do it in 2 steps :

1 : ffmpeg -i Movie.mkv -map 0:s:0 -c:s dvdsub -f matroska subs.mkv
2 : mkvextract subs.mkv tracks 0:mysub

and you'll get 2 files :
• mysub.idx   ← index file
• mysub.sub   ← bitmap file

index file contains the timestamps
bitmap file contains the bitmap subtitles

To edit bitmap file, you need OCR, like SubtitleEdit

Alain1A45
  • 448