From: Oneric <oneric@oneric.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: Add support for multipass encoding
Date: Sun, 30 Oct 2022 23:20:51 +0100
Message-ID: <Y174w+1lwRcvmCTO@oneric.de> (raw)
In-Reply-To: <NFd-xgh--3-9@lynne.ee>
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".
next prev parent reply other threads:[~2022-10-30 22:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 21:06 Gustav Grusell
2022-10-06 6:03 ` Gustav Grusell
2022-10-30 13:10 ` Lynne
2022-10-30 22:20 ` Oneric [this message]
2022-11-03 15:41 ` Gustav Grusell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y174w+1lwRcvmCTO@oneric.de \
--to=oneric@oneric.de \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git