Re: [Cellar] FFV1: FFmpeg default version is "0"?

Jerome Martinez <jerome@mediaarea.net> Tue, 08 November 2022 11:49 UTC

Return-Path: <jerome@mediaarea.net>
X-Original-To: cellar@ietfa.amsl.com
Delivered-To: cellar@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 18AF3C1522DE for <cellar@ietfa.amsl.com>; Tue, 8 Nov 2022 03:49:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CKL5xx6cS10r for <cellar@ietfa.amsl.com>; Tue, 8 Nov 2022 03:49:21 -0800 (PST)
Received: from 5.mo575.mail-out.ovh.net (5.mo575.mail-out.ovh.net [46.105.62.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 98870C1522DD for <cellar@ietf.org>; Tue, 8 Nov 2022 03:49:21 -0800 (PST)
Received: from player774.ha.ovh.net (unknown [10.108.4.200]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 8F1AE25CED for <cellar@ietf.org>; Tue, 8 Nov 2022 11:49:18 +0000 (UTC)
Received: from mediaarea.net (p548f9d6f.dip0.t-ipconnect.de [84.143.157.111]) (Authenticated sender: jerome@mediaarea.net) by player774.ha.ovh.net (Postfix) with ESMTPSA id A375D30697311 for <cellar@ietf.org>; Tue, 8 Nov 2022 11:49:17 +0000 (UTC)
Authentication-Results: garm.ovh; auth=pass (GARM-106R006fa9a9bd2-31c1-4a57-b6e5-d319e9a9fd82, 240C6DA25E7BCED6CA01DF0788338AAE7F551B6D) smtp.auth=jerome@mediaarea.net
X-OVh-ClientIp: 84.143.157.111
Message-ID: <4cb08010-b3b0-742d-6d40-02a64a4f35dd@mediaarea.net>
Date: Tue, 08 Nov 2022 12:49:17 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1
Content-Language: en-US
To: cellar@ietf.org
References: <8ccfd556-1a7e-2e58-bd5f-15e47b5c00b5@das-werkstatt.com>
From: Jerome Martinez <jerome@mediaarea.net>
In-Reply-To: <8ccfd556-1a7e-2e58-bd5f-15e47b5c00b5@das-werkstatt.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Ovh-Tracer-Id: 4772971181092079675
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrfedtgdeffecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheplfgvrhhomhgvucforghrthhinhgviicuoehjvghrohhmvgesmhgvughirggrrhgvrgdrnhgvtheqnecuggftrfgrthhtvghrnhepvdelffekieejhfefveehleelieetveejhfegvdeileegleeiuddugfelhfefhffhnecukfhppeduvdejrddtrddtrddupdekgedrudegfedrudehjedrudduudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehjvghrohhmvgesmhgvughirggrrhgvrgdrnhgvtheqpdhnsggprhgtphhtthhopedupdhrtghpthhtoheptggvlhhlrghrsehivghtfhdrohhrghdpoffvtefjohhsthepmhhoheejhedpmhhouggvpehsmhhtphhouhht
Archived-At: <https://mailarchive.ietf.org/arch/msg/cellar/U4IkprZNXHWf9JLlzyS0rgTl48c>
Subject: Re: [Cellar] FFV1: FFmpeg default version is "0"?
X-BeenThere: cellar@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Codec Encoding for LossLess Archiving and Realtime transmission <cellar.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cellar>, <mailto:cellar-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cellar/>
List-Post: <mailto:cellar@ietf.org>
List-Help: <mailto:cellar-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cellar>, <mailto:cellar-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Nov 2022 11:49:23 -0000

On 08/11/2022 11:59, Peter B. wrote:
> However, I've just encoded with current ffmpeg-git and MediaInfo says 
> it's FFV1.0.

Actually it depends on the count of pixels (trigger is if > 720x576)

$ ffmpeg -hide_banner -loglevel error -f lavfi -i 
testsrc=duration=0.040:size=720x576 -c:v ffv1 -y test.mkv && mediainfo 
--Output="Video;%Format_Version%" test.mkv
Version 0
$ ffmpeg -hide_banner -loglevel error -f lavfi -i 
testsrc=duration=0.040:size=720x577 -c:v ffv1 -y test.mkv && mediainfo 
--Output="Video;%Format_Version%" test.mkv
Version 3.4

Source code:
     // Unspecified level & slices, we choose version 1.2+ to ensure 
multithreaded decodability
     if (avctx->slices == 0 && avctx->level < 0 && avctx->width * 
avctx->height > 720*576)
         s->version = FFMAX(s->version, 2);
     if (avctx->level <= 0 && s->version == 2) {
         s->version = 3;
     }

> I'm surprised, and wanted to bring up the discussion here again, 
> suggesting to change the default to FFV1.3?

It is a "political" choice from FFmpeg, also for the count of slices by 
default (always 4, either 720x577 or 4096x2160).

I personally don't care much because I have the count of slices in my 
scripts so version is defaulted to 3, but now that HD is common and 
FFV1.3 is supported for a long time, it may be interesting to change the 
default settings, true.

IMO if the default version is changed, the default count of slices 
should be changed too (change in FFV1 version would already have an 
impact with 4 slices if more than 352x288; as the current default 
setting for FFV1.3 is based on check on 352x288, we could do 4 for SD 
including the ones with extra VBI so 720x608, 12 for HDReady, 16 for 
HD/2K, 64 for UHD/4K, 256 for 8K, for having a similar pixel size of 
slices whatever is the image pixel width).

Note that changing default version has also an impact on compression 
ratio (less compression with 4 slices than with the current 1 for SD 
content).

Jérôme