diff options
author | Vignesh Venkatasubramanian <vigneshv-at-google.com@ffmpeg.org> | 2022-05-12 09:23:28 -0700 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2022-05-13 12:46:21 +0530 |
commit | 84241e63cf2f3cc8f7d8a19e86b99f5af95d2a64 (patch) | |
tree | 967c9a8cc4023ce911fad7790e4f588288e7178b /libavformat/movenc.h | |
parent | 98ec4261fd75b47a18cedf9f5340c4e94ad9b274 (diff) | |
download | ffmpeg-84241e63cf2f3cc8f7d8a19e86b99f5af95d2a64.tar.gz |
avformat/movenc: Add support for AVIF muxing
Add an AVIF muxer by re-using the existing the mov/mp4 muxer.
AVIF Specification: https://aomediacodec.github.io/av1-avif
Sample usage for still image:
ffmpeg -i image.png -c:v libaom-av1 -still-picture 1 image.avif
Sample usage for animated AVIF image:
ffmpeg -i video.mp4 animated.avif
We can re-use any of the AV1 encoding options that will make
sense for image encoding (like bitrate, tiles, encoding speed,
etc).
The files generated by this muxer has been verified to be valid
AVIF files by the following:
1) Displays on Chrome (both still and animated images).
2) Displays on Firefox (only still images, firefox does not support
animated AVIF yet).
3) Verified to be valid by Compliance Warden:
https://github.com/gpac/ComplianceWarden
Fixes the encoder/muxer part of Trac Ticket #7621
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Diffstat (limited to 'libavformat/movenc.h')
-rw-r--r-- | libavformat/movenc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/movenc.h b/libavformat/movenc.h index ca507e0e04..281576cc66 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -43,6 +43,7 @@ #define MODE_IPOD 0x20 #define MODE_ISM 0x40 #define MODE_F4V 0x80 +#define MODE_AVIF 0x100 typedef struct MOVIentry { uint64_t pos; @@ -244,6 +245,10 @@ typedef struct MOVMuxContext { MOVPrftBox write_prft; int empty_hdlr_name; int movie_timescale; + + int64_t avif_extent_pos; + int avif_extent_length; + int is_animated_avif; } MOVMuxContext; #define FF_MOV_FLAG_RTP_HINT (1 << 0) |