PixivUtil2 icon indicating copy to clipboard operation
PixivUtil2 copied to clipboard

Stable settings to encode with av1?

Open mugi-jiichan opened this issue 1 year ago • 2 comments

Prerequisites

  • [x] Did you read FAQ section in readme.md?
  • [x] Did you test with the latest releases or commit ?
  • [x] Did you search for existing issues in Issues?

Description

Hi,

has anyone some config.ini settings to encode with av1?

So far I've been using this in the FFmpeg section:

[FFmpeg]
ffmpeg = ffmpeg
ffmpegCodec = libsvtav1
ffmpegExt = webm
ffmpegParam = -crf 32 -an -preset 8 -pix_fmt yuv444p10le -fps_mode passthrough
mkvCodec = copy
mkvParam = 
webpCodec = libwebp
webpParam = -lossless 0 -compression_level 5 -quality 100 -loop 0  -fps_mode passthrough
gifParam = -filter_complex [0:v]split[a][b];[a]palettegen=stats_mode=diff[p];[b][p]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle -fps_mode passthrough
apngParam = -plays 0 -fps_mode passthrough
verboseOutput = False

While the vp9 settings from other threads work fine, FFmpeg sometimes exits with error code 1 here which makes PixivUtil2 just stop and exit to command line.

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Log file: [Attach the pixivutil.log file in the application folder, recommended to delete the old file, reproduce the issue, and upload the newly generated file here]

Versions

Manjaro Linux / zsh FFmpeg 5.1.2 PixivUtil 20230105

mugi-jiichan avatar Mar 27 '23 18:03 mugi-jiichan

Sorry, I was a bit lightheaded and clumsy yesterday due to a nasty cold and stroke the Ctrl key which accidentally created the issue prematurely...

Here's the part of the log where encoding fails. Sorry it's one of the lewd ids, but I've been using the tag search in this case.

pixivutil.debug.log

mugi-jiichan avatar Mar 28 '23 10:03 mugi-jiichan

Hi,

I think I know what's the problem: The source files to encode have uneven image size values (891x768), and are therefore unsuited for av1...

As I keep the zip file anyways, and the webms are supposed to be previews, I've added a blunt rescale filter to the config.

ffmpegParam = -crf 32 -an -sws_flags bicubic+full_chroma_int -vf scale=1920:1080 -preset 8 -pix_fmt yuv420p10

Might look a bit nasty for files with small image size, but it does the job (at least for me).

mugi-jiichan avatar Mar 29 '23 16:03 mugi-jiichan