From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id EFE0242C57 for ; Mon, 2 May 2022 21:35:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2299F68B2C7; Tue, 3 May 2022 00:35:17 +0300 (EEST) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2799668B0A6 for ; Tue, 3 May 2022 00:35:10 +0300 (EEST) Received: by mail-yb1-f180.google.com with SMTP id i38so28175210ybj.13 for ; Mon, 02 May 2022 14:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=fqtbkjshMUu1J2Mgyz65E37u3J+IT0LzCJKqI2Y8EC4=; b=Oze7zScDH6GM0NWZBR8hpjr2PGzXoE3snm2rJbfixMuYi7wUyy56W4BGd/+RqheU0c ir6kpgLOnSAux6nGk2rOmcOGwjJIKGQE2Nn+WXzlgoG0LLo+4F3myFCGXpfGQxj45NZG 4n1slJrOUHWg/AafkptBQdW2NVjMlIm0xPo5Hp5jM5lVaV99STfZCOj/xEdDB+EslLZF 3PGxOjnA5IdpC8e3NPPxdfvX4JU11A99U+EUuP27mA21tfiDnCVOnSSke5+FpB7g8eoj ua3THfriVTzEGkr/CYJmVIY03GTCMU8EYwzvHshmlTR6f+XdADIEup6/oC8LyA4jXSYX foBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=fqtbkjshMUu1J2Mgyz65E37u3J+IT0LzCJKqI2Y8EC4=; b=Dij6UCJkBtEO0/2E4F68CMMV+qqj43cU3MK3TaW/Qp0Uc8UZcU0zJUX6UjRTJojgkP x4RfrSa8mQSBsRe5AsIAdT6PdmQ95kivclITB9ezTxfPpZFDep2IH5Jm0ksMMKlZPgL0 CD0I+Qr2I77JWSwRlBwsw0t1MNuohQaPCQWNpQK+tCAnZND/6FjROngPQTeCtGXiUfRE R/bVqDmE4KExDV82PMbnKDATUtR4n1tO6ehOmpOS9/+ak4zG8XUDcLuByhYGyNn6XZHk Kr8y6m6WcNjA0l7iez+gEidzwQFmx9DZ20ER4e+VekZo4D3wVuIveUy+scc+4ODMyCLG zumA== X-Gm-Message-State: AOAM533fGe1EpUirTCOn7x1BK7yI+KjviAt/DvczgSOudfLBG+lP8DD+ rcuJVU23aDiuE2yxDEJP7bHS2YLyEJ6EuBU6/921YxTZKrg= X-Google-Smtp-Source: ABdhPJytpXQIt7F4lwstm26PRHTkS34wr8aW7AbpQorEt/qQOwNZtcDiYifXO8gWGkAv7iGGOmWveZpa4qa5pRIiw8A= X-Received: by 2002:a25:bb4a:0:b0:633:92a6:c35 with SMTP id b10-20020a25bb4a000000b0063392a60c35mr11504386ybk.121.1651527308290; Mon, 02 May 2022 14:35:08 -0700 (PDT) MIME-Version: 1.0 References: <20220413204028.3696947-1-vigneshv@google.com> In-Reply-To: From: Vignesh Venkatasubramanian Date: Mon, 2 May 2022 14:34:56 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 3/3] avformat/movenc: Add support for AVIF muxing X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, May 2, 2022 at 10:28 AM James Zern wrote: > > On Wed, Apr 13, 2022 at 1:40 PM Vignesh Venkatasubramanian > wrote: > > > > 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 -avif-image 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 > > --- > > configure | 1 + > > libavformat/allformats.c | 1 + > > libavformat/movenc.c | 337 ++++++++++++++++++++++++++++++++++++--- > > libavformat/movenc.h | 5 + > > 4 files changed, 319 insertions(+), 25 deletions(-) > > > > It would be good to have a Changelog entry after the ticket is fixed. > Acknowledged. Will do. > > [...] > > @@ -2823,7 +2848,10 @@ static int mov_write_hdlr_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra > > > > if (track) { > > hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0"; > > - if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) { > > + if (track->mode == MODE_AVIF) { > > + hdlr_type = "pict"; > > + descr = "ffmpeg"; > > Should this be PictureHandler or blank? What's written for heic? > Hmm, i used the string "ffmpeg" because libavif was writing "libavif" [1]. But i think it makes sense to be consistent with the other types here. I have updated the string to be "PictureHandler". [1] https://github.com/AOMediaCodec/libavif/blob/45b6b1b88b54de6031c15b4f9dbee10f86244d1b/src/write.c#L456 > > [...] > > +static int mov_write_ispe_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s) > > +{ > > + int64_t pos = avio_tell(pb); > > + avio_wb32(pb, 0); /* size */ > > + ffio_wfourcc(pb, "ispe"); > > + avio_wb32(pb, 0); /* Version & flags */ > > + avio_wb32(pb, s->streams[0]->codecpar->width); /* image_width */ > > + avio_wb32(pb, s->streams[0]->codecpar->height); /* image_height */ > > + return update_size(pb, pos); > > +} > > + > > + > > This extra line could be removed. Removed. > > > [...] > > + /* AVIF output must have exactly one video stream */ > > + if (mov->mode == MODE_AVIF) { > > + if (s->nb_streams > 1) { > > + av_log(s, AV_LOG_ERROR, "AVIF output requires exactly one stream\n"); > > + return AVERROR(EINVAL); > > + } > > + if (s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) { > > + av_log(s, AV_LOG_ERROR, "AVIF output requires one video stream\n"); > > + return AVERROR(EINVAL); > > + } > > + } > > + > > + > > This one too. Removed. > _______________________________________________ > 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". -- Vignesh _______________________________________________ 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".