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 C53AE40948 for ; Thu, 3 Mar 2022 19:20:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 31C3B68AF62; Thu, 3 Mar 2022 21:20:26 +0200 (EET) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55AB268AE64 for ; Thu, 3 Mar 2022 21:20:20 +0200 (EET) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-2dc0364d2ceso67365047b3.7 for ; Thu, 03 Mar 2022 11:20:20 -0800 (PST) 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=286emj05PzG8PsmYU7lWJmMXVC92mY8FdY1wYSpjhDA=; b=kRT7UCRReCYp8KHVQ+SEkKuA+y2FmDMwfPVHz5nMaY1WerYof92Ue6FlBKMICoVapy Hto/EzRuEAVdkdoLeV+FjEyi86XAy1Ige1VG1PFdaiNBHyWG4xhBUXSkTDC6HVqSM25z LNwHJ9EYRk9Ykhux+kt12/193/BwExMk9gozI9vk1HGQq/qBVjaikAg78bYtZtd0puFm osadh1RXjU5/7O9qc4HGLZfwui8ZMQNkKGu4t6YS1AVb1dW5EMMGiu2884fr7eoAwmEG 4nSiNCFGcsjz7CHGp2rApYg9QlBS6Zqkhdrsf0iHaux90RCo+rsaX0DME7pKxXM5HBK7 fs2A== 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=286emj05PzG8PsmYU7lWJmMXVC92mY8FdY1wYSpjhDA=; b=L3IicpRJY+NpRncSksAn7n3EfXEz/P1NEY/7Px6FRrQAwiLIqcZwTDtXyc6I2uNOdR ytEKQkKC6Ucs6tWzEZVB3dTxVLkteIyk0jIMO5sm5I5XUc2HH37kU2TmoOqsi6wjKfEe Ihp0cXQA2Irrp6DDvZGs+pdFOuc89ebkBgT42aqDJMip6jf2SlPj6ogwq13Aa14q2OOc /BUvzIL73N5KwZktE9yVkkRqi0E/6LU1yZN3QSB7S1dlVrFwL2SEyXAAS2Ppjt8ZB/sc qHis7rLZ7nVYZ7lZgJWVIpY5I10APs2KNaKed7LkzLLM3j1Kgme2rtNK3VO8CYidL4EO Tl7Q== X-Gm-Message-State: AOAM5322hIFP0+bffZPYqff/gZCaI4lF56LJNKXqIvPfE0P0SgyxEvg5 zsoKeusoO4AkIfndRHljWzgTmr7yJtUc6JTlx3yNj6eiRb0cSg== X-Google-Smtp-Source: ABdhPJyIJyPxfXHB4pPyDlyMHWthXoYfLtNjEvEbBMS5ycKbQspawGeyrhI5NCNwAGzwb/kNgEorvcNF85nB3+DxCCE= X-Received: by 2002:a81:23d2:0:b0:2dc:5652:51bc with SMTP id j201-20020a8123d2000000b002dc565251bcmr1778678ywj.155.1646335218639; Thu, 03 Mar 2022 11:20:18 -0800 (PST) MIME-Version: 1.0 References: <20220222214318.3053157-1-vigneshv@google.com> <53482b5b-9293-65c5-a9e7-88f28d30353d@gmail.com> In-Reply-To: <53482b5b-9293-65c5-a9e7-88f28d30353d@gmail.com> From: Vignesh Venkatasubramanian Date: Thu, 3 Mar 2022 11:20:07 -0800 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 Thu, Mar 3, 2022 at 7:36 AM James Almer wrote: > > On 2/22/2022 6:43 PM, Vignesh Venkatasubramanian wrote: > > Add an AVIF muxer by re-using the existing the mov/mp4 muxer. > > > > AVIF Specifiation: 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) Verfied 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 | 300 +++++++++++++++++++++++++++++++++++---- > > libavformat/movenc.h | 5 + > > 4 files changed, 282 insertions(+), 25 deletions(-) > > With a single frame i get no errors in that compliance tool, but when i > encode an animated AVIF i get the following: > > [heif][Rule #12] Error: CodingConstraintsBox ('ccst') shall be present once > [heif][Rule #28] Error: Wrong arity for boxes { ccst } in parents { avc1 > avc2 avc3 avc4 hev1 hev2 hvc1 hvc2 av01 }: expected in range [1-1], found 0 > [heif][Rule #31] Error: 'msf1' brand: this file shall conform to HEIF > (section 7.2) > [heif][Rule #31] Error: 'msf1' brand: 'iso8' shall be present among the > compatible brands array > [heif][Rule #32] Error: 'mif1' brand: this file shall conform to HEIF > section 6, check the other errors for details > [heif][Rule #33] Error: 'msf1' brand: this file shall conform to HEIF > section 7, check the other errors for details > > All but one of these should be solved by writing a ccst box after the > av1C box in the sample entry. The missing one should be solved by > writing the iso8 compatible brand. > > The ccst box looks like it would need some bitstream information, so > either you parse the packets to get it, or just hardcode sane defaults, > considering it's used as a hint and it's not required for demuxing. I recently fixed these errors in libavif [1][2] (the reference AVIF encoder). I was hoping to have a follow-up patch since i already uploaded the existing patches. Since you have pointed this out now, i have included the fix in this patch itself. The new patch will now write the iso8 compatible brand and the ccst box with sane default values. The file produced is now identical to the file produced by libavif in terms of box structure. Also, notice that the compliance tool still shows the following error for animated avif: [avif][Rule #3] Warning: [ItemId=1] still_picture flag set to 0 [avif][Rule #4] Warning: [ItemId=1] reduced_still_picture_header flag set to 0 I believe these are incorrect since it does not make sense to set these flag to 0 for animated avif sequences. These warnings also show up with files produced by libavif. So it is okay to ignore them. I will file an issue with the compliance tool separately. Please take another look, thanks! [1] https://github.com/AOMediaCodec/libavif/pull/855 [2] https://github.com/AOMediaCodec/libavif/pull/856 > _______________________________________________ > 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".