Today I found that video files containing embedded closed captions, such as DVB recordings or iTunes downloads, will show that subtitles are present but none of my clients are able to display them and the server is not able to transcode them to a usable format. This example is from the iTunes Store.
In the local and remote webapps some corrupted text is shown:
The Android client behaves like the webapps. The Kodi plugin and Samsung Orsay client both display nothing at all but detect the correct language.
The Emby's log shows ffmpeg bombing out:
Stream #0:0(eng): Subtitle: subrip (srt), 1280x720 (default)
creation_time : 2016-12-07T11:23:24.000000Z
encoder : Lavc57.64.100 srt
Stream #0:2 -> #0:0 (eia_608 (cc_dec) -> subrip (srt))
Press [q] to stop, [?] for help
[Closed caption Decoder @ 0xa9ca000] Data Ignored since exceeding screen width
Last message repeated 2029 times
size= 1kB time=00:19:50.89 bitrate= 0.0kbits/s speed=1.52e+04x
video:0kB audio:0kB subtitle:1kB other streams:0kB global headers:0kB muxing overhead: 52.568306%
The root cause is a known deficiency in ffmpeg which can identify the caption stream correctly but cannot extract it, refer to https://trac.ffmpeg.org/ticket/4616 which also has a sample video attached. I would be curious to know if iOS devices are able to DirectPlay this type of content with working captions.
To extract usable subtitles from a video simply run the file through CCExtractor (http://ccextractor.sourceforge.net), generally you will not need to specify any special options as the defaults will produce an external SubRip (.srt) file as output. To get rid of the unusable caption stream (or replace it with the SubRip subtitles) simply remux the file to Matroska using mkvtoolnix or avimux.
Edited by OddbOd, 08 December 2016 - 12:36 PM.