It is as simple as it sounds: Just provide the teletext page and here we go:
ffmpeg -txt_format text -txt_page 150 -i inputFile.ts outputSubtitles.ger.srt
txt_page 150is the page number of the subtitle. Typically is the page shown at the beginning of a show. Otherwise you have to find them on your own. My suggestion: Use the VLC player! It can visualize the Teletext right in the video area.txt_format textsince we want a plain text file (subrip)
This produced in my case a broken subtitle file:
1
00:00:02,280 --> 1193:02:49,575
Some Text
2
00:00:05,520 --> 1193:02:52,815
Some Text
3
00:00:09,360 --> 1193:02:56,655
Some Text
You see the end timestamp: 1193:02:49,575? This is definitely broken.
If you have also this broken end timestamp try to use the parameter -fix_sub_duration
1
00:00:02,280 --> 00:00:04,280
Some Text
2
00:00:05,520 --> 00:00:08,280
Some Text
3
00:00:09,360 --> 00:00:14,520
Some Text
Required is a FFmpeg with enabled libzvbi. Simply run the following command and check the configuration section for the codec.
ffmpeg
This shows in my case:
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg [...] --enable-libzvbi [...]