[FFmpeg-devel] [PATCH 4/5] avformat/mov: add support for AV1 streams
James Almer
jamrial at gmail.com
Tue Jul 31 03:29:47 EEST 2018
On 7/19/2018 12:16 PM, James Almer wrote:
> On 7/19/2018 9:57 AM, Francois Cartegnie wrote:
>> Hi,
>>
>> Sorry, can't reply to thread.
>>
>>> + if (version != 0) {
>>> + av_log(c->fc, AV_LOG_WARNING, "Unknown AV1 Codec Configuration Box version %d\n", version);
>>> + return 0;
>>> + }
>>> + avio_skip(pb, 3); /* flags */
>>> +
>>> + avio_skip(pb, 1); /* reserved, initial_presentation_delay_present, initial_presentation_delay_minus_one */
>>> +
>>> + ret = ff_get_extradata(c->fc, st->codecpar, pb, atom.size - 5);
>>
>> Seems to me that using OBU only as internal extradata, unlike h264 or
>> hevc, will only cause issues.
>>
>> There's no version as a guarantee on which OBU should be found, and it
>> implies parsing OBU just like with AnnexB.
>
> Unlike avcc and hvcc, the spec didn't define a custom encapsulation for
> av1c, but it does state which types should be found:
>
> "The configOBUs field is expected to contain only OBU_SEQUENCE_HEADER
> and OBU_METADATA when the metadata OBU is applicable to all the
> associated samples"
>
> Matroska has the same requirements.
>
>> Parsing might also not be possible without accessing samples data when
>> there's potentially zero OBU in DCR.
>
> Steve Lhomme opened a issue[1] about it. The spec states "zero or more
> OBUs" in av1c, whereas In Matroska the Sequence Header is guaranteed to
> be present as they say "one or more OBUs".
>
> Fwiw, in ffmpeg's case at least, libavformat will generate the internal
> extradata on its own by extracting the first Sequence Header from the
> bitstream if the demuxer didn't allocate it itself. This is what's done
> for ivf and such containers.
>
>>
>> I've raised the issue on the spec, as the DCR itself does not seems to
>> contain enough extracted information, like profile for routing to a
>> proper decoder.
>
> Like you said, you're clearly expected to parse the Sequence Header OBU
> in configOBUs. Profile is the very first value in it after the OBU header.
>
> [1] https://github.com/AOMediaCodec/av1-isobmff/issues/46
I made a summary of all the comments/suggestions scattered across
issues/PRs into https://github.com/AOMediaCodec/av1-isobmff/issues/50.
Yours, and those by Steve Lhomme. We'll see what, if anything, comes out
of it.
More information about the ffmpeg-devel
mailing list