diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2022-06-01 11:05:56 -0700 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-06-27 13:46:33 -0300 |
commit | 2a3640de84975398b1169d29530274cdd38b3939 (patch) | |
tree | 3edc1cea0709d0fbf5cc72a4b41fe45adeb1c6d9 /doc/ffmpeg-protocols.texi | |
parent | a526f0cc3ac938364afe8ce62c4bc47d3b9bb2af (diff) | |
download | ffmpeg-2a3640de84975398b1169d29530274cdd38b3939.tar.gz |
avformat/movenc: Support alpha channel for AVIF
AVIF specification allows for alpha channel as an auxiliary item (in
case of still images) or as an auxiliary track (in case of animated
images). Add support for both of these. The AVIF muxer will take
exactly two streams (when alpha is present) as input (first one being
the YUV planes and the second one being the alpha plane).
The input has to come from two different images (one of it color and
the other one being alpha), or it can come from a single file
source with the alpha channel extracted using the "alphaextract"
filter.
Example using alphaextract:
ffmpeg -i rgba.png -filter_complex "[0:v]alphaextract[a]" -map 0 -map "[a]" -still-picture 1 avif_with_alpha.avif
Example using two sources (first source can be in any pixel format and
the second source has to be in monochrome grey pixel format):
ffmpeg -i color.avif -i grey.avif -map 0 -map 1 -c copy avif_with_alpha.avif
The generated files pass the compliance checks in Compliance Warden:
https://github.com/gpac/ComplianceWarden
libavif (the reference avif library) is able to decode the files
generated using this patch.
They also play back properly (with transparent background) in:
1) Chrome
2) Firefox (only still AVIF, no animation support)
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Diffstat (limited to 'doc/ffmpeg-protocols.texi')
0 files changed, 0 insertions, 0 deletions