Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Vignesh Venkatasubramanian <vigneshv-at-google.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Vignesh Venkatasubramanian <vigneshv@google.com>
Subject: [FFmpeg-devel] [PATCH] avformat/img2: Add support for AVIF mux in image2
Date: Mon, 16 May 2022 10:40:21 -0700
Message-ID: <20220516174021.3751941-1-vigneshv@google.com> (raw)

Add support for AVIF muxing in the image2 muxer.

Tested with this example:
ffmpeg -lavfi testsrc=duration=1:size=320x320 -g 1 -flags global_header -c:v libaom-av1 -f image2 img-%2d.avif

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
---
 libavformat/img2enc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 5ed97bb833..0015297ec2 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -58,6 +58,8 @@ static int write_header(AVFormatContext *s)
         img->muxer = "gif";
     } else if (st->codecpar->codec_id == AV_CODEC_ID_FITS) {
         img->muxer = "fits";
+    } else if (st->codecpar->codec_id == AV_CODEC_ID_AV1) {
+        img->muxer = "avif";
     } else if (st->codecpar->codec_id == AV_CODEC_ID_RAWVIDEO) {
         const char *str = strrchr(s->url, '.');
         img->split_planes =     str
@@ -265,7 +267,7 @@ const AVOutputFormat ff_image2_muxer = {
     .long_name      = NULL_IF_CONFIG_SMALL("image2 sequence"),
     .extensions     = "bmp,dpx,exr,jls,jpeg,jpg,jxl,ljpg,pam,pbm,pcx,pfm,pgm,pgmyuv,"
                       "png,ppm,sgi,tga,tif,tiff,jp2,j2c,j2k,xwd,sun,ras,rs,im1,im8,"
-                      "im24,sunras,vbn,xbm,xface,pix,y",
+                      "im24,sunras,vbn,xbm,xface,pix,y,avif",
     .priv_data_size = sizeof(VideoMuxData),
     .video_codec    = AV_CODEC_ID_MJPEG,
     .write_header   = write_header,
-- 
2.36.0.550.gb090851708-goog

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2022-05-16 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 17:40 Vignesh Venkatasubramanian [this message]
2022-05-17 19:36 ` James Zern
2022-05-19  4:27   ` Gyan Doshi
2022-05-19  8:54     ` Gyan Doshi
2022-05-19 16:10       ` Vignesh Venkatasubramanian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220516174021.3751941-1-vigneshv@google.com \
    --to=vigneshv-at-google.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=vigneshv@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git