[FFmpeg-devel] [PATCH] [GSoC] movtextdec: decode rich formatting from text sample modifier boxes in 3GPP timed text subtitles

Wesley Castro root670 at gmail.com
Wed Mar 18 05:09:43 CET 2015

This is to partially fulfil my qualification task for the "Implement full
support for 3GPP Timed Text (movtext, QuickTime?) subtitle" as part of this
year's GSoC. This does not meet all the requirements of the task, but I will
submit additional patches before the end of the application period to implement
encoding of rich text from text sample modifier boxes as well as
decoding/encoding to/from the default style record in sample descriptions.

Bold, italic, and underline styles from mid-stream sample modifiers are
converted to ASS subtitles. I verified this behaviour using a 3GP video with
embedded subtitles displaying text in various styles (this can be provided if
needed to verify my code). A text sample can have multiple text style sample
modifiers associated with it (zero or more), but each modifier's starting
offset will never be before the ending offset of preceding records, if they
exist. This makes it easy to read modifiers sequentially and avoid needing a
stack to store the records before generating styles, which is done in

Please review this patch and let me know if it looks good or can be improved.

Thank you,
Wesley Castro

Wesley Castro (1):
  3GPP TS 26.245 Timed Text decoder: decode rich formatting in sample
    modifier boxes

 libavcodec/movtextdec.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 69 insertions(+), 3 deletions(-)


More information about the ffmpeg-devel mailing list