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 5230342C32 for ; Mon, 2 May 2022 17:28:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C9F6468A3F4; Mon, 2 May 2022 20:28:31 +0300 (EEST) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09EB668A3F4 for ; Mon, 2 May 2022 20:28:25 +0300 (EEST) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-2ef5380669cso155342047b3.9 for ; Mon, 02 May 2022 10:28:25 -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=4mk/isXA5SiEaFnjLoiV7u8VUjQ7eK46dYEk3LAHLOU=; b=VBAF/lhALv4R23J3n+UAlemYzbQnPK+DCGRM/56fe1HZgPcyRq9jbUU/p2rB+YaqCW L3QNb9tSiVObpVcUSBLbayaqNfmc6q42nmhukjKzVb0Cay5zYYUdtU3O54/2M4XGrhuI nzM1Ri6htMuljlM6ee7XbJ0DztCTnZuZjcdq9iTxWZmbjkLQncFTjJHr9IQ7UzcIV4tD P3Wn+kBIdzWB4b5OoSY4Pp1TIkPa+gV+RAk1WVuYUSvXIyrCIp2LrJGVJ9jxl9WVDa9i T69XecQ33+WHyAsB+Q4yYzQFHn6SVymIiYPwTDLWIWoTOQ3xSfbqBvgD2HMpg5H4qpYb +8XA== 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=4mk/isXA5SiEaFnjLoiV7u8VUjQ7eK46dYEk3LAHLOU=; b=ZUhlbc/4qaCsytr4keXOCl5kzdQ2mu9nh2l5yR6B656c/oNbxRVvyzig0qW2jurPKh mrlWcXhLPat+CrX/pY39+f84ZxYmRp/spTIMmxMKCNyXknu3DKXeZrhg1qEtsQncFUlQ djERPlXHNPaf1PzNLj0MbtOB1zgbpxRl09qCCfyE/LtrSwNSLTi5ghAQY+kLy1HzWUH1 VH8nik77JwH9YIhxAX2+/n/xYfbwnPr2Asz29zk2bujDq6f99TxRDy+0+rA/7bYzMKLf gTEYRpGv4ttNgbS9eoxVqb6JDxZJBpOjHQTUPPLAJZkyQxzPoauytK7enE1XEcxVVwYM 1akA== X-Gm-Message-State: AOAM532A/Ljn0l6y+uJEGYIyXXXrwOGyWae91y7RfHpmd7xUEnBkVJbH sc90GWMWZWMxoc/WucMv+cTB3jIlb5OyUkZkvr2yYLk0+EInZsjY X-Google-Smtp-Source: ABdhPJyQVCMxpDhqCrWQ2slk2o2GAeSydWdm7oItml3vImQRf9HZk9TAt1jZ0WmO5dJglSfkRFDH5/rughvdehBHnkw= X-Received: by 2002:a0d:c246:0:b0:2f7:c833:f305 with SMTP id e67-20020a0dc246000000b002f7c833f305mr11606812ywd.435.1651512503950; Mon, 02 May 2022 10:28:23 -0700 (PDT) MIME-Version: 1.0 References: <20220413204028.3696947-1-vigneshv@google.com> In-Reply-To: <20220413204028.3696947-1-vigneshv@google.com> From: James Zern Date: Mon, 2 May 2022 10:28:12 -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 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. > [...] > @@ -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? > [...] > +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. > [...] > + /* 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. _______________________________________________ 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".