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 606C544903 for ; Sun, 30 Oct 2022 22:21:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B103668BD6B; Mon, 31 Oct 2022 00:20:59 +0200 (EET) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 59E1A68BCE6 for ; Mon, 31 Oct 2022 00:20:53 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1667168452; s=strato-dkim-0002; d=oneric.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=pNm7okJU6Au4rJ1dke+Y53LZ6ewnbD0D4MupyC/ARgU=; b=M87i165Q+PmmJ2Sv8OXeEqb/Bj5dqdukNdSzQuOxkqLCU7OXCdktpsG35698ioLa5p 68rRZbEndwl0bNnPmxt5wu2zYvBhVWc3hLc9xYrTU3fg/B9qjt+lyXu6/PUFveeM3cFI JTJKnbQAfr8NQ11GOB3Z/fywXO4GpKNGv/u8O1WGr7JyB3mv4VBkRj4vlvrjJne97N0j ZfmqrV6YkK61DIwRpAs47MZ/ccBWMVg+Pfn9RGDAWFaX8NiKPpy5nRHCeMSGJhzBKw2Q wcEbEBvAr35/RF685qkZS/NFkNjI5oUqSzEfP6XR3P+mxY8o0SF7O9PrI4tjlFZ4Gxg7 XkZg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":I2IBZ0mrW/AWQXwgB4oxKM1YsW1lFUznrLvi/XReWqAAlWwZ8wlvfXmGs4jUQ0oz8ZbhHexs8fhgUyEEdNshuk/meYBtkFFw/gEjuRk=" X-RZG-CLASS-ID: mo00 Received: from oneric.de by smtp.strato.de (RZmta 48.2.1 AUTH) with ESMTPSA id V28b60y9UMKqGOP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sun, 30 Oct 2022 23:20:52 +0100 (CET) Date: Sun, 30 Oct 2022 23:20:51 +0100 From: Oneric To: ffmpeg-devel@ffmpeg.org Message-ID: References: <20220927210605.692742-1-gustav.grusell@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: Add support for multipass encoding 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 Sun, Oct 30, 2022 at 14:10:29 +0100, Lynne wrote: > Sep 27, 2022, 23:06 by gustav.grusell@gmail.com: > > > Implements support for 2-pass CRF and 3-pass VBR by implementing > > reading and writing of stats file, and passing the pass number on > > to the encoder. For 3-pass VBR, the first pass should be run with > > '-pass 1', the second with '-pass 3' and the third with '-pass 2'. > > > > [...] > > 2-pass doesn't seem to work, the encoder complains it's not the final pass. fwiw, 2-pass CRF and 3-pass VBR work for me on a short sample with this patch applied on top of 882a17068fd8e62c7d38c14e6fb160d7c9fc446a and using SVT-AV1 1.3.0. I'm not sure if 2-pass VBR is supposed to work, though I didn't look into it too much. SVT-AV1 docs only mention 3-pass VBR[1] afaict and while requesting output already in the second pass (`--pass 2` for SvtAv1EncApp and `-pass 3` for patched ffmpeg) "works", the result misses the targeted overall bitrate even more than singlepass VBR. For reference here are the commands I used: 2-pass CRF: ----------- ./ffmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -crf 50 -g 300 -pass 1 -f null /dev/null \ && ./ffmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -crf 50 -g 300 -pass 2 -f matroska crf_pass2.mkv 3-pass VBR: ----------- ./ffmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -svtav1-params 'rc=1:tbr=500k' -g 300 -pass 1 \ -f null /dev/null \ && ./fmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -svtav1-params 'rc=1:tbr=500k' -g 300 -pass 3 \ -f null /dev/null \ && ./fmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -svtav1-params 'rc=1:tbr=500k' -g 300 -pass 2 \ -f matroska vbr_pass2.mkv "2-pass VBR" (probably bad idea): --------------------------------- ./ffmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -svtav1-params 'rc=1:tbr=500k' -g 300 -pass 1 \ -f null /dev/null \ && ./fmpeg -i org.mkv -c:v libsvtav1 \ -preset 4 -svtav1-params 'rc=1:tbr=500k' -g 300 -pass 3 \ -f matroska vbr_pass2.mkv [1]: https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/91b94efb2809e83d9bf041d8575b32f234dfef27/Docs/svt-av1_encoder_user_guide.md#multi-pass-vbr-1000-kbps-at-maximum-quality-from-24fps-yuv-1920x1080-input _______________________________________________ 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".