[FFmpeg-user] DVD-Subtitles in matroska container converted by ffmpeg won't disappear playing with vlc

Nicolas George george at nsup.org
Mon Mar 24 10:45:09 CET 2014

Le duodi 2 germinal, an CCXXII, Bernd Butscheidt a écrit :
> I created this file:
> http://www.file-upload.net/download-8617894/00001.mkv.html
> from a TV record with the help of ffmpeg. Now I want to keep only one audio track and the subtitles doing this:
> ffmpeg -i 00001.ts -map 0:0 -map 0:2 -map 0:3 -vcodec copy -acodec copy -scodec dvdsub 00001.mkv
> The subtitles of the original file
> http://www.file-upload.net/download-8617897/00001.ts.html
> are shown fine by any player I tested so far. With the converted one:
> http://www.file-upload.net/download-8617894/00001.mkv.html
> ffplay and mplayer seem to show the subtitle track as intended.

First, be careful and accurate: your subject line talks about
"DVD-subtiles", but your console output copy-paste shows:

> Stream #0:3[0x904](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

DVB-subtitles are not the same as DVD-subtitles. AFAIK, DVD-subtitles can
not be present in MPEG-TS, but I can be mistaken. What I will state applies
to DVD-subtitles in MPEG-PS (VOB) container, and may apply to DVB-subtitles
in MPEG-TS, you can check for yourself; IIRC, DVB-subs in Matroska are still

The problem is that VOB does not store duration for packets; the duration of
the subtitle is stored in the packet payload itself. The Matroska spec
requires a duration for all subtitles packets, even when the duration can be
decoded from the packets. FFmpeg usually solves that problem using a parser:
a partial decoder that reads the packet payload for technical info but skips
the actual bulk of the decoding. But there is no parser for DVD-subs. I have
an old patch for that, but it no longer applies cleanly and I have other
more urgent issues.

You may have a chance to work around the problem by transcoding the
subtitles instead of copying them. It will take negligible time.
Unfortunately, the subtitles encoder are not widely tested, so you may get
issues, especially with palette. It must be said that bitmap subtitles
formats are completely braindead; that is industrial standards for you.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140324/666f8c01/attachment.asc>

More information about the ffmpeg-user mailing list