[FFmpeg-user] subtitles come to early in a transport stream (ts) file

Karl Heinz Lopin karlheinz at lopin.de
Sun Oct 8 23:56:56 EEST 2023

Thanks, but when I use this command I get the following message:

[sost#0:0/srt @ 000002087fa6e880] Subtitle encoding currently only possible from text to text or bitmap to bitmapError initializing output stream:
Stream mapping:
  Stream #0:2 -> #0:0 (dvb_subtitle (dvbsub) -> subrip (srt))
    Last message repeated 1 times

As I understand this, the subtitles are in a bitmap format und cannot be converted to a text format by ffmpeg, which is not necessary at all.
So I tried to replace both "srt" in the command to other values, e. g.

ffmpeg -i inputfile.ts -map 0:s:0 -f dvb subtitle.dvb

Then I got the following message:

[NULL @ 000002b573d33dc0] Requested output format 'dvb' is not a suitable output format
subtitle.dvb: Invalid argument

What is the the right argument for the format parameter and how should the file extension of the output file be?

> Laine <llee040 at sbcglobal.net> hat am 08.10.2023 00:32 CEST geschrieben:
> > On Oct 7, 2023, at 8:09 AM, Karl Heinz Lopin <karlheinz at lopin.de> wrote:
> > 
> > I have recorded a TV-movie with my SAT-recorder on harddisk. The movie is in french and has subtitles in several languages. I cutted the ts-file and removed all subtitles except german wit tsdoctor. Sometimes later I noticed that the subtitles come about four seconds too early. Unfortunately I had deleted the original file until then.
> > 
> > ffprobe shows the following output:
> > 
> > ```none
> > ffprobe version 6.0-essentials_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
> >  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
> > ...
> > Input #0, mpegts, from 'inputfile.ts':
> >  Duration: 01:35:06.88, start: 54851.766678, bitrate: 3407 kb/s
> >  Program 6915
> >  Stream #0:0[0x267]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn
> >    Side data:
> >      cpb: bitrate max/min/avg: 15000000/0/0 buffer size: 1835008 vbv_delay: N/A
> >  Stream #0:1[0x27b](fra): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 192 kb/s
> >  Stream #0:2[0x3a9](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
> > ```
> > 
> > I can imagine that this problem could be solved with ffmpeg, but don't know how and I didn't found anything that would help me.
> I would consider extracting the subtitles, removing them from the video and audio movie file, then using a subtitle editor to properly align them and remux. Unfortunately, I only work with .srt, but here is what I use to extract the subtitle stream:
> ffmpeg-i inputfile -map 0:s:0 -f srt subtitle.srt
> L. Lee
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list