[FFmpeg-devel] [PATCH v2 0/3] Initial support for fragmented TTML muxing

Jan Ekström jeebjp at gmail.com
Fri Sep 15 16:16:57 EEST 2023


Changes compared to v1:

* General rebase.
* A FATE test was added, together with the extension of the "transcode"
  test function to allow for dumping of packets' contents.
* Simplified mov_write_ttml_document_from_queue's loop by getting
  rid of `stop_at_current_packet`.

This enables pushing TTML together with another track (usually video)
as part of CMAF Ingest, as defined by the DASH-IF Live Media Ingest
Protocol.

Currently does not function well with just the subtitle track unless
the API user explicitly requests fragmentation with a nullptr packet,
as the generic fragmentation decision logic is based on tracks which
do not require squashing.

Currently does support overlapping subtitles, but the implementation
utilizes another packet queue for it, which is probably not optimal.
Recommendations on how to improve things are welcome.

Jan

Jan Ekström (3):
  tests/fate-run: add support for specifying the final encode muxer in
    `transcode`
  avcodec/avpacket: add functionality to prepend to AVPacketLists
  avformat/movenc: add support for fragmented TTML muxing

 libavcodec/avpacket.c                       |   20 +-
 libavcodec/packet_internal.h                |    2 +
 libavformat/movenc.c                        |    9 -
 libavformat/movenc_ttml.c                   |  157 ++-
 tests/fate-run.sh                           |    4 +-
 tests/fate/mov.mak                          |   21 +
 tests/ref/fate/mov-mp4-fragmented-ttml-dfxp | 1197 +++++++++++++++++++
 tests/ref/fate/mov-mp4-fragmented-ttml-stpp | 1197 +++++++++++++++++++
 8 files changed, 2588 insertions(+), 19 deletions(-)
 create mode 100644 tests/ref/fate/mov-mp4-fragmented-ttml-dfxp
 create mode 100644 tests/ref/fate/mov-mp4-fragmented-ttml-stpp

-- 
2.41.0



More information about the ffmpeg-devel mailing list