On 12/4/23 13:18, bbb wrote:
Thanks Mark,

as Nicolas already pointed out, I was wrong about the mkv format. I see you are using it for just a subtitle stream too in the first step.

Though my problem is already solved with that, what you wrote looks very interesting. You are able to convert image subtitles to text?

Indeed. It has removed my dependency on opensubtitles.org -- really messed up, low quality, soon to put up a paywall -- for HDMV PGS subtitles.

I really should check out SubtitleEdit and that MKV toolkit too.

SubtitleEdit can grab subtitles directly from M2TS files but it makes mistakes whereas I've found that taking the time to make a sub-only MKS, and then have mkvextract make IDX & SUB files to submit to SubtitleEdit is reliable.

On 12/4/23 18:11, Mark Filipak wrote:
Hi, Below is a Windows CMD I use. It employs ffmpeg, mkvextract, and 
SubtitleEdit.
The MKV made has only the subtitles -- no video required.
If SubtitleEdit has been properly trained, the results are excellent.
-- Mark.

: Convert hdmv_pgs_subtitle to subrip.
:   index file: %TARGETPATH%\%NAME%.idx  //contains the subtitle-timestamps
:   bitmap file: %TARGETPATH%\%NAME%.sub //contains the subtitle-bitmaps
: This assumes the zeroth subtitle stream (0:s:0) is desired.
: '%TARGETPATH%\%SOURCE%.mkv', '%TARGETPATH%\%NAME%.idx', and 
'%TARGETPATH%\%NAME%.sub'
: are preserved.

set NAME=
set M2TS=
set TARGETPATH=
ffmpeg -i "%M2TS%" -map 0:s:0 -s 1920x1080 -c:s dvdsub -f matroska 
"%TARGETPATH%\%NAME%.mkv"
"C:\Program Files\MKVToolNix\mkvextract" "%TARGETPATH%\%NAME%.mkv" tracks 
0:"%TARGETPATH%\%NAME%"
"C:\Program Files\Subtitle Edit\SubtitleEdit" "%TARGETPATH%\%NAME%.idx"
pause


_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to