Jump to content


Photo

EIA-608 closed captions in MP4 files aren't displayed

itunes subtitles mp4 ffmpeg workaround

  • Please log in to reply
1 reply to this topic

#1 OddbOd OFFLINE  

OddbOd

    Advanced Member

  • Members
  • 74 posts
  • Local time: 06:41 PM

Posted 08 December 2016 - 12:34 PM

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.

 

58497a61a5537_Clipboard2.png

 

In the local and remote webapps some corrupted text is shown:

 

5849790bc4dc7_Clipboard1.png

 

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)
Metadata:
creation_time : 2016-12-07T11:23:24.000000Z
encoder : Lavc57.64.100 srt
Stream mapping:
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.

 

WORKAROUND

 

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.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 157148 posts
  • Local time: 03:41 AM

Posted 08 December 2016 - 12:36 PM

Hi, thanks for the info !







Also tagged with one or more of these keywords: itunes, subtitles, mp4, ffmpeg, workaround

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users