[FFmpeg-devel] [PATCH 0/8] DoVi metadata compression
Niklas Haas
ffmpeg at haasn.xyz
Tue Jun 18 22:35:30 EEST 2024
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.
More information about the ffmpeg-devel
mailing list