Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressibilty check for multi passes av1 or vvencFFApp #1284

Open
endmarsfr opened this issue Mar 26, 2024 · 3 comments
Open

Compressibilty check for multi passes av1 or vvencFFApp #1284

endmarsfr opened this issue Mar 26, 2024 · 3 comments

Comments

@endmarsfr
Copy link

Hi there,

First of all, I have been using staxrip for many years and I thank you for your work.
Is it possible to make staxrip do a compressibility check before doing multi-pass AV1 and vvencFFApp encodings (like x264 and x265)

kind regards

@endmarsfr
Copy link
Author

Hi there,

I have done the compressibility check manually.
But I am wondering which crf value to use for the good calculations.
I know I have to use crf 18 for x264 and x265.
I used crf 35, but I couldn't find any reference for av1.

Here is the command I used:
ffmpeg -y -i "input.mkv" -c:v libsvtav1 -pix_fmt yuv420p -vf "scale=1280:720,select=lt(mod(n\,940)\,47)" -strict -1 -profile:v main -preset 10 -crf 35 -svtav1-params asm=max:keyint=245:rc=0:enable-qm=1:fast-decode=1:scd=1:tune=0 -f rawvideo "compcheck.dat"

Do you have any idea?

Kind regards

@Dendraspis
Copy link
Collaborator

Dendraspis commented Apr 7, 2024

I have made some adjustments to the Compressibility Check for vvencFFapp in v2.37.5, so hopefully that solves your issue so far with that.

But which encoder do you mean by "AV1" ? There are multiple encoders that encode into AV1.

But I am wondering which crf value to use for the good calculations.

Compressibility Check is only available for non-quality modes. 🤔

@endmarsfr
Copy link
Author

Hi there,

Thanks for the update to v2.37.5 and fixing the compressibility check for vvencFFapp.
I was surprised to see that the comp check value retained for 100% quality was the same for x264 encoders.
I will run some tests to check this.

For AV1 encoders I tried svtAV1EncApp.exe and libsvtav1 with ffmpeg (my own encoding tests)
svtAV1EncApp and libsvtav1 are now reliable and have good quality and speed (I switched from x265 to AV1)
My encodings have passed from 40 min (2 passes with x265) to 15 min with the same qualifty (i used VMAF to calculate and check the quality) and file weigth significantly reduced, almost divided by 10 from original x264 video (tune=0 give good quality)

For AV1, there is no compressibility check for two/three pass (variable bitrate) encoding.
For ffmpeg there is AOM-AV1, but I did not find the libsvtav1 option in Staxrip,
I managed to make my own one pass encoding with ffmpeg and libsvtav1, but I was wondering if it is possible to make multipasses Av1 encoding with ffmpeg and libsvtav1 (the question is how to pass the stats file with ffmpeg, it seems that is a hard question, I had not found any examples).

I made for my own a fork of staxrip in Python. It's a Json template-driven Python application that automates the encoding of video files in a folder.
To make it work on multiplatforms (Mac, Linux, Windows,...) it's now mainly based on ffmpeg, even I found solutions to make avisynth or vapoursynth work well on Linux and Mac.
Now I had figured out how to crop, resize, apply filter with ffmpeg.
It's easier to get ffmpeg commands to work, which is often updated.

kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants