I'm noticing the wiki page for howto:transcode and convert (https://e621.net/wiki_pages/34804#Video) has conflicting and missing information about the AV1 codec it intends you to use, SVT-AV1.
In the context of ffmpeg:
- parameter -b:v 0 is redundant-- it is only required for encoding in VBR for libvpx-vp9 only (as referenced in the ffmpeg docs at https://trac.ffmpeg.org/wiki/Encode/VP9#constantq)
- parameter pix_fmt yuv420p should be explicitly implied for the sake of browser compatibility (typically do not expect or ignore anything outside of YUV color space)
- explanation on the -crf 15 parameter seems erroneous, as per the SVT-AV1 documentation at https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md#rate-control-options , the codec varies its QP based on any CRF value set. By default this is 35 and is dissimilar from "preset qualities". I think it's good to deliberate on this.
In the context of AV1:
[3] SVT AV1's CRF values, coupled with a high quality preset, should produce higher quality video than identical CRF values used with libvpx's VP9 at deadline best.
I believe comparing a CRF value is invalid in codec comparison and needs to be challenged. I have reason to believe that improper practical tests were used to determine this. Deliberation below:
Why SVT-AV1 is less efficient than libaom
liboam is designed to reach out the highest efficiency in the AV1 codec, whereas SVT-AV1 is designed for parallelism and encoding-at-scale. SVT-AV1 trades off per frame search (GOP on a timed interval vs. scene-based GOP) to achieve faster encoding times, which can result in lower quality frames on a practical level. This can be suppressed by manually setting the GOP to a lower amount of frames, which will in turn increase the file size, but minimizes (not eliminate) this tradeoff.
That aside, "measuring CRF" between two encoders - is not similar to how QP control works in these codecs AT ALL. The internal mapping from CRF > quantizer / rate control behavior differs between implementations (scale, default rate control mode, default CRF value, lookahead and TPL usage). SVT historically used a default CRF that is high (35 is the default in every standard ffmpeg build) and FFmpeg/SVT wrappers also changed defaults over time. libaom’s CRF mapping and defaults are different. You cannot treat the same numeric CRF in both encoders as the same quality.
To explain further:
libaom’s RDO and rate control aim for different tradeoffs (libaom’s slow presets push better BD-rate for many scenes). SVT-AV1’s CRF mode is implemented with SVT-AV1 rate control internals (and SVT provides CQP/VBR/CBR modes too). Because the encoders apply lookahead, TPL, and filtering differently, identical CRF produces different bit allocations and visual results.
A CRF value of 30 in libaom will not be the same visual quality or file size as CRF value of 30 in SVT-AV1. Do benchmark CRF points per encoder.
If e621 intends to host "forever copies" in a space efficient manner, why not direct users to use the reference AV1 encoder (libaom-av1), same as for vp9? it eliminates quality variance that is produced by SVT-AV1 especially if an encoding preset is used.
It should be good to note that novice users should be explained - be it in layman's terms or not - what every parameter would do in the context of any codec and ffmpeg. The line
- output.mp4 -> the finished file's name. ffmpeg will notice the .mp4 in the output file name and adjust accordingly.
"adjusting accordingly" doesn't explain anything. you could deliberate by saying that "ffmpeg will mux the output codec to the context of an MP4 container" or simply "ffmpeg will save the video information encoded by SVT-AV1 to your final .mp4 file".
N.B., MacOS instructions are missing. If you need a directive, here is an example:
Installation
Use of a package manager, like Homebrew is recommended. Open a Terminal instance (Command + Space > 'Terminal.app' and paste the string
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
followed by Enter.
After installation, follow the instructions on the ffmpeg Homebrew Formulae
- Open a Terminal instance (if not already open). You may do this by pressing Command + Space, then typing in Terminal.app followed by Enter.
- Type or paste
brew install ffmpeg
followed by Enter. Wait for Homebrew to install ffmpeg.
Preparation for usage
- Open a Terminal instance. (Command + Space > Terminal.app).
- Optionally change the working directory. For instance, type
cd
followed by a space, then drag and drop your preferred working folder, followed by pressing Enter. You can verify your working directory by typing in
pwd
followed by Enter.
You may also drag and drop files into the terminal to insert them as a string, which may make picking input files easier.
If staff would like help re-structuring this wiki page, I'd be happy to give out directives or changes. The way it is written right now isn't particularly helpful nor accurate, at least to me personally.
That's my two cents.
(edit: incorrect term used fixed, link fixes)
Updated