mbox series

[FFmpeg-devel,0/8] DoVi metadata compression

Message ID 20240618194221.26073-1-ffmpeg@haasn.xyz
Headers show
Series DoVi metadata compression | expand

Message

Niklas Haas June 18, 2024, 7:35 p.m. UTC
Moves metadata compression out of the codecs and into a bitstream
filter. This is required by design, because keyframes must have
compression disabled (for obvious reasons). Therefore, we _must_
generate the dolby vision RPUs after encoding.

The downside of this approach is that it requires "redundantly" encoding
+ decoding RPUs in between the codec and the bsf. However, the tradeoff
is that it allows us to also strip/modify DV metadata when not
transcoding (-c:v copy). Such a feature has a legitimate use case, as it
allows enabling/disabling Dolby Vision compression on existing streams
(to e.g. minimize size, or to maximize compatibility).

If we wanted to avoid this overhead, we could hypothetically introduce
a new packet side data type for dolby vision metadata, and have the
codec merely copy the frame side data to the packet. But I am somewhat
unwilling to add yet more packet side data types that are aliases of
frame side data types, and I don't think the overhead is significant.