mbox series

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

Message ID 20230915131704.45235-1-jeebjp@gmail.com
Headers show
Series Initial support for fragmented TTML muxing | expand

Message

Jan Ekström Sept. 15, 2023, 1:16 p.m. UTC
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

Comments

Jan Ekström Dec. 8, 2023, 11:52 a.m. UTC | #1
On Fri, Sep 15, 2023 at 4:17 PM Jan Ekström <jeebjp@gmail.com> wrote:
>
> 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
>

Ping.

As this is a piece of seemingly working functionality, I'd like to
understand whether people think subtitle-only fragmented MP4 documents
with more than one fragment is something that is required for this to
get merged.

Also I have changed an existing test function, so I'd like a note
whether people think this is an OK change.

Jan