[FFmpeg-devel] [PATCH 5/5] avformat/movenc: add support for AV1 streams

Hendrik Leppkes h.leppkes at gmail.com
Tue Jul 10 01:35:00 EEST 2018


On Tue, Jul 10, 2018 at 12:29 AM Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
>
> Hi James,
>
> On Mon, Jul 9, 2018 at 11:26 AM, James Almer <jamrial at gmail.com> wrote:
>
> [...]
>
>
> > @@ -5438,7 +5461,7 @@ int ff_mov_write_packet(AVFormatContext *s,
> > AVPacket *pkt)
> >          av_log(s, AV_LOG_WARNING, "pts has no value\n");
> >          pkt->pts = pkt->dts;
> >      }
> > -    if (pkt->dts != pkt->pts)
> > +    if (pkt->dts != pkt->pts && par->codec_id != AV_CODEC_ID_AV1)
> >          trk->flags |= MOV_TRACK_CTTS;
> >      trk->cluster[trk->entry].cts   = pkt->pts - pkt->dts;
> >      trk->cluster[trk->entry].flags = 0;
> >
>
> [...]
>
> Interesting, is there a spec document that would explicitly mention that
> AV1 forbids "ctts" atom ?
>

The draft spec does:
https://aomediacodec.github.io/av1-isobmff/#sampleformat

Unlike many video standards, AV1 does not distinguish the display
order from the decoding order, but achieves similar effects by
grouping multiple frames within a sample. Therefore, composition
offsets are not used. In tracks using the AV1SampleEntry, the ctts box
and composition offsets in movie fragments SHALL NOT be used.

- Hendrik


More information about the ffmpeg-devel mailing list