Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd July 2025, 20:23   #1  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe, too cold winters.
Posts: 566
Recommened FFMPEG SVT-AV1 commandline?

I'm a newbie at SVT-AV1, and I wonder, is this FFMPEG SVT-AV1 command-line good for encoding general videos, not smoothing too much?
With source-video at 30fps:

C:\Utils\ffmpeg-2025-07-17-git-bc8d06d541-full_build\bin\ffmpeg.exe -i "input_video.mp4" -c:v libsvtav1 -preset 2 -crf 24 -g 240 -svtav1-params tune=0:lookahead=80:enable-qm=1:qm-min=2:qm-max=10:scd=1:sharpness=4:enable-restoration=0 -pix_fmt yuv420p10le -metadata:s:v:0 encoder="SVT-AV1 v3.0.2-110-gd37b1a57 (preset 2, CRF 24, -g 240, tune=0, lookahead=80, QM(2-10), scd=1, sharpness=4, enable-restoration=0, 10bit-conv)" -c:a copy "output-av1.mkv"

I set to this if the framerate of the source-video is 24fps: -g 240
Also, I remove "-pix_fmt yuv420p10le" if the source-video already is 10bit.
If CRF less than CRF 25, then set "enable-restoration=0"

Thanks in advance.

Last edited by Forteen88; 11th August 2025 at 10:54. Reason: Changed to better general settings: qm-min=2 & sharpness=4
Forteen88 is offline   Reply With Quote
Old 24th July 2025, 16:37   #2  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 679
If you can use a build of FFmpeg with SVT-AV1-PSY, there is chance for more adjustment and tunes, and it may be able to handle grainy content better.
GeoffreyA is offline   Reply With Quote
Old 24th July 2025, 20:24   #3  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe, too cold winters.
Posts: 566
@GeoffreyA: Thanks, yeah, I have heard of that fork (SVT-AV1-PSY), but my version of FFMPEG don't support it. I use the FFMPEG "Windows build from gyan.dev" master-build.
Forteen88 is offline   Reply With Quote
Old 24th July 2025, 23:32   #4  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 2,037
Just a quick test using StaxRip 2.48, did not meddle much with settings, except changing default CRF 35 -> CRF 28 and default superfast -> fast
--------------------------- Video encoding ---------------------------

SvtAv1EncApp 3.0.2-2+33-6a3b2d0d-.Mod-by-Patman.-x64-gcc15.1.0 [SVT-AV1-PSY]

"C:\_PROG_64\! Video Encoders 64\StaxRip-v2.48.0-x64\Apps\Support\avs2pipemod\avs2pipemod64.exe" -dll="C:\_PROG_64\! Video Encoders 64\StaxRip-v2.48.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll" -y4mp "F:\0_CN GH5\2025 01 17 CN GH5 WW M-450\DCIM\105_PANA\P1055040.mov_temp\P1055040.avs" | "C:\_PROG_64\! Video Encoders 64\StaxRip-v2.48.0-x64\Apps\Encoders\SvtAv1EncApp\SvtAv1EncApp.exe" --input - --output "F:\0_CN GH5\2025 01 17 CN GH5 WW M-450\DCIM\105_PANA\P1055040.ivf" --width 3840 --height 2160 --frames 9396 --rc 0 --crf 28 --progress 3 --preset 7 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1

avs2pipemod[info]: writing 9396 frames of 25/1 fps, 3840x2160,
sar 0:0, YUV-420-planar-10bit progressive video.
Svt[info]: -------------------------------------------
Svt[info]: SVT [version] : SVT-AV1-PSY Encoder Lib v3.0.2-2+33-6a3b2d0d [Mod by Patman]
Svt[info]: SVT [build] : GCC 15.1.0 64 bit
Svt[info]: LIB Build date: May 25 2025 12:43:40
Svt[info]: -------------------------------------------
Svt[info]: Level of Parallelism: 5
Svt[info]: Number of PPCS 140
Svt[info]: [asm level on system : up to avx512icl]
Svt[info]: [asm level selected : up to avx512icl]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: profile / tier / level : main / auto / auto
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 3840 / 2160 / 25 / 1
Svt[info]: SVT [config]: bit-depth / color format : 10 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct : 7 / SSIM / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 321 / 32 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 28.00
Svt[info]: SVT [config]: AQ mode / Variance Boost strength / octile / curve : 2 / 2 / 6 / 0
Svt[info]: SVT [config]: sharpness / luminance-based QP bias : 1 / 0
Svt[info]: SVT [config]: temporal filtering strength : 1
Svt[info]: SVT [config]: QP scale compress strength : 1
Svt[info]: SVT [config]: Noise Normalization Strength : 1
Svt[info]: SVT [config]: Keyframe TF Strength : 1
Svt[info]: SVT [config]: PSY-RD Strength : 0.50
Svt[info]: SVT [config]: SPY-RD : 0
Svt[info]: -------------------------------------------
Encoding.... 10.27fps on i9-11900K, 82..100% load.
In 5 min I can tell if it keeps grain.
Source was 4K 4:2:2, shot @ 150Mbps with Panasonic GH5, static situation (repair bench lighted with hard contrasts, OLED monitor in OFF mode.
On the unlit OLED screen the fine CCD sensor noise was clearly visible, and I expect to judge based on that).

Finished. Wow. I am stumped. Size went from 6.954.930 KiB down to 2.282.437 KiB,
to a third, 10fps is no show-stopper, and yes, the grain is still there, even if I scrutinize single frames: no blotches.
Didn't expect that, had no need for AV1...
StaxRip, huh ? Gotta donate now after so many years. Done.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 25th July 2025 at 22:24.
Emulgator is offline   Reply With Quote
Old 24th July 2025, 23:40   #5  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe, too cold winters.
Posts: 566
@Emulgator. Thanks, I should probably use StaxRip for SVT-AV1-PSY.

Oh, I have read now that I should enable Variance-Boost if I use regular SVT-AV1 (using -svtav1-params enable-variance-boost=1), because it says that SVT-AV1-PSY uses it!
ChatBot wrote: "Enabling "Variance Boost" in SVT-AV1 can significantly improve perceptual picture quality, especially in low-contrast areas like skin tones, foggy scenes, or dimly lit footage.
Helps preserve fine textures that would otherwise be blurred or flattened—think of the “vaseline” effect on faces or clothing."


Quote:
Coincidentally, at this point a perceptual quality-related issue appeared in the SVT-AV1 GitLab repository. This piqued my attention immediately, and the initial results that Variance Boost was producing looked extremely promising.
https://giannirosato.com/blog/post/end-of-psy/

Last edited by Forteen88; 25th July 2025 at 12:37.
Forteen88 is offline   Reply With Quote
Old 25th July 2025, 12:19   #6  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 679
Emulgator, preset 4 should bring down size further.

Quote:
Originally Posted by Forteen88 View Post
@GeoffreyA: Thanks, yeah, I have heard of that fork (SVT-AV1-PSY), but my version of FFMPEG don't support it. I use the FFMPEG "Windows build from gyan.dev" master-build.
I also use Gyan's build. Occasionally, I compile a build with the other libraries, such as SVT-AV1-PSY and libfdk_aac, using the Media Autobuild Suite.

Last edited by GeoffreyA; 25th July 2025 at 12:23.
GeoffreyA is offline   Reply With Quote
Old 25th July 2025, 13:15   #7  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe, too cold winters.
Posts: 566
@GeoffreyA. Thanks.
I also asked a chatbot:
Quote:
Did the official SVT-AV1 devs get "Variance Boost" in SVT-AV1 from the SVT-AV1-PSY devs?
Chatbot replied:
Quote:
Yes, they did! The Variance Boost feature in mainline SVT-AV1 was inspired by and derived from SVT-AV1-PSY, a perceptual fork developed by BlueSwordM and others to improve psychovisual quality in AV1 encoding.
There is also a Handbrake that supports SVT-AV1-PSY (with compiled Windows build):
https://github.com/Nj0be/HandBrake-SVT-AV1-PSY
Forteen88 is offline   Reply With Quote
Old 25th July 2025, 13:19   #8  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 679
Quote:
Originally Posted by Forteen88 View Post
There is also a Handbrake that supports SVT-AV1-PSY (with compiled Windows build):
https://github.com/Nj0be/HandBrake-SVT-AV1-PSY
Excellent. Didn't know that one.
GeoffreyA is offline   Reply With Quote
Old 25th July 2025, 23:11   #9  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 2,037
Repeated the above AV1 encode and raised the bar: this time at default CRF35 and slow (getting 5fps)
CCD sensor grain begins to develop blotches, not bad, only visible when pixel-peeping or at paused frames.
The first attempt started from AVC 422 4k25p @ 150Mbps (0.723bpp), resulted in AV1 4k25p 10bit 420 @ 50Mbps, so 0.24 bpp.
This attempt started from the same AVC 422 4k25p @ 150Mbps (0.723bpp), resulted in AV1 4k25p 10bit 420 @ 18,8Mbps, so 0.09 bpp.
(IIRC a famous x264 test encode of Big Buck Bunny (8bit 420 FHD) around r1000-ish could already cope with 0.03bpp, but alas: this source contained almost no grain.)
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Reply

Tags
ffmpeg svt-av1

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.