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 150 is 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 visualise the Teletext right in the video area.
  • txt_format text since 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 --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay