[FFmpeg-trac] #6021(avcodec:new): tx3g / mov_text subtitles are not encoded correctly in some specific cases

FFmpeg trac at avcodec.org
Sun Mar 12 05:41:38 EET 2017

#6021: tx3g / mov_text subtitles are not encoded correctly in some specific cases
             Reporter:  erikbs         |                    Owner:
                 Type:  defect         |                   Status:  new
             Priority:  normal         |                Component:  avcodec
              Version:  git-master     |               Resolution:
             Keywords:  utf8 mov_text  |               Blocked By:
             Blocking:                 |  Reproduced by developer:  0
Analyzed by developer:  0              |

Comment (by erikbs):

 There are several attributes that ffmpeg does not care about when writing
 mov_text data. You can use MP4Box to dump the subtitles stream to XML
 format using the following command:

 mp4box -ttxt 3 FILENAME.mp4

 As you can see, attributes such as width and height are all zero in XML
 files dumped from ffmpeg generated MP4s. The MP4s containing subtitles
 converted from SRT by MP4Box have non-zero values in these fields instead,
 as is evident when dumping the subtitles stream to XML/TTXT. It is
 possible that the missing values are causing your problem. It is also
 possible that the patch was not applied correctly (the one I posted above
 is in a format that is slightly different from the one in which files are
 supposed to be submitted to Patchwork). Feel free to upload a sample video
 that is affected by the problem. You can create a 30 second sample from a
 longer video using this command:

 ffmpeg -i INPUT_FILE.mp4 -c copy -c:s copy -ss HH:MM:SS -t 00:00:30

 where HH:MM:SS is the start time (hours, minutes, seconds).

 It could of course also be that my patch is onto something, but is
 incomplete. Thus other relevant questions are:
 1. Are the vanishing subtitle lines styled? (look for <b>, <i> or <font in
 the SRT)
 2. Do the lines contain special characters? Multibyte characters?
 Characters missing from the TV’s fonts? Line breaks?
 3. Is there anything special about the lines that ''are'' shown? (Special
 characters, styling, length, …)
 4. Do the subtitles vanish randomly or are the same lines displayed/hidden
 every time?

Ticket URL: <https://trac.ffmpeg.org/ticket/6021#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list