n00mkrad / nmkoder

Media encoding, muxing, analysis toolkit for Windows
GNU General Public License v3.0
427 stars 21 forks source link

1.9.0 crashes with target VMAF #9

Open MCOfficer opened 2 years ago

MCOfficer commented 2 years ago
INFO [av1an_core::settings] temporary directory: D:\Nmkoder\data\av1anTemp\1643207803561
Scene detection
INFO [av1an_core::settings] scenecut: found 1233 scene(s) [with extra_splits(240 frames): 1368]
00:14:17 [###################################################################] 100%  132725/132725 (154.73 fps, eta 0s) Queue 1368 Workers 7 Passes 1
Params: --preset 5 --crf 96 --keyint 240 --lp 2 --film-grain 0 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1 --color-range 0
ERROR [av1an_core::target_quality] [chunk 1312] encoder crashed: exit code: 1
stdout:

stderr:
        [SVT-Warning]: --keyint is now intra-period + 1!
        Svt[info]: -------------------------------------------
        Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v0.9.0
        Svt[info]: SVT [build]  :       GCC 11.2.0       64 bit
        Svt[info]: LIB Build date: Jan 22 2022 07:53:27
        Svt[info]: -------------------------------------------
        Unprocessed tokens:  --tf-level  --palette-level  --umv  --ext-block  --hbd-md  --bipred-3x3  --pred-me  --compound  --sg-filter-mode  --enable-restoration-filtering  --cdef-level  --disable-dlf  --mrp-level  --enable-pic-based-rate-est  --enable-local-warp  --enable-global-motion  --enable-interintra-comp  --obmc-level  --rdoq-level  --filter-intra-level  --enable-intra-edge-filter

        Error in configuration, could not begin encoding! ...
        Run D:\Nmkoder\bin\av1an\enc\SvtAv1EncApp.exe --help for a list of options

source pipe stderr:
        pipe:: Invalid data found when processing input

ERROR [av1an_core::broker] [chunk 1312] encoder crashed: exit code: 1
stdout:

stderr:
        [SVT-Warning]: --keyint is now intra-period + 1!
        Svt[info]: -------------------------------------------
        Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v0.9.0
        Svt[info]: SVT [build]  :       GCC 11.2.0       64 bit
        Svt[info]: LIB Build date: Jan 22 2022 07:53:27
        Svt[info]: -------------------------------------------
        Unprocessed tokens:  --tf-level  --palette-level  --umv  --ext-block  --hbd-md  --bipred-3x3  --pred-me  --compound  --sg-filter-mode  --enable-restoration-filtering  --cdef-level  --disable-dlf  --mrp-level  --enable-pic-based-rate-est  --enable-local-warp  --enable-global-motion  --enable-interintra-comp  --obmc-level  --rdoq-level  --filter-intra-level  --enable-intra-edge-filter

        Error in configuration, could not begin encoding! ...
        Run D:\Nmkoder\bin\av1an\enc\SvtAv1EncApp.exe --help for a list of options

source pipe stderr:
        pipe:: Invalid data found when processing input

Settings as follows: image

Let me know if you need more infos.

n00mkrad commented 2 years ago

Pretty sure this is an av1an problem as it won't work with SVT 0.9.0.

MCOfficer commented 2 years ago

Ah, you're right. I checked a few days ago and didn't find any relevant issues, seems like i just barely missed this one https://github.com/master-of-zen/Av1an/issues/556

Feel free to close.

MCOfficer commented 2 years ago

Upstream has fixed it, but it's not in any release yet.

Werve commented 2 years ago

I tried the Target VMAF function but it doesn't seem to work for me with any encoder settings.

INFO [av1an_core::settings] temporary directory: C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\data\av1anTemp\1649104466480
Scene detection
INFO [av1an_core::settings] scenecut: found 21 scene(s) [with extra_splits(250 frames): 23]
00:00:08 [#######################################################################] 100%  2240/2240 (267.82 fps, eta 0s) Queue 23 Workers 4 Passes 1
Params: --preset 5 --crf 95 --keyint 250 --lp 2 --film-grain 0 --color-primaries 2 --transfer-characteristics 2 --matrix-coefficients 2 --color-range 0 --irefresh-type 2 --aq-mode 2 --enable-overlays 0 --scd 0 --lookahead -1
ERROR [av1an_core::target_quality] [chunk 6] encoder crashed: exit code: 1
stdout:

stderr:
        [SVT-Warning]: --keyint is now intra-period + 1!
        Svt[info]: -------------------------------------------
        Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v0.9.0
        Svt[info]: SVT [build]  :       GCC 11.2.0       64 bit
        Svt[info]: LIB Build date: Jan 22 2022 07:53:27
        Svt[info]: -------------------------------------------
        Unprocessed tokens:  --tf-level  --palette-level  --umv  --ext-block  --hbd-md  --bipred-3x3  --pred-me  --compound  --sg-filter-mode  --enable-restoration-filtering  --cdef-level  --disable-dlf  --mrp-level  --enable-pic-based-rate-est  --enable-local-warp  --enable-global-motion  --enable-interintra-comp  --obmc-level  --rdoq-level  --filter-intra-level  --enable-intra-edge-filter

        Error in configuration, could not begin encoding! ...
        Run C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\bin\av1an\enc\SvtAv1EncApp.exe --help for a list of options

source pipe stderr:
        av_interleaved_write_frame(): Broken pipe
        Error writing trailer of pipe:: Broken pipe

ERROR [av1an_core::broker] [chunk 6] encoder crashed: exit code: 1
stdout:

stderr:
        [SVT-Warning]: --keyint is now intra-period + 1!
        Svt[info]: -------------------------------------------
        Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib v0.9.0
        Svt[info]: SVT [build]  :       GCC 11.2.0       64 bit
        Svt[info]: LIB Build date: Jan 22 2022 07:53:27
        Svt[info]: -------------------------------------------
        Unprocessed tokens:  --tf-level  --palette-level  --umv  --ext-block  --hbd-md  --bipred-3x3  --pred-me  --compound  --sg-filter-mode  --enable-restoration-filtering  --cdef-level  --disable-dlf  --mrp-level  --enable-pic-based-rate-est  --enable-local-warp  --enable-global-motion  --enable-interintra-comp  --obmc-level  --rdoq-level  --filter-intra-level  --enable-intra-edge-filter

        Error in configuration, could not begin encoding! ...
        Run C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\bin\av1an\enc\SvtAv1EncApp.exe --help for a list of options

source pipe stderr:
        av_interleaved_write_frame(): Broken pipe
        Error writing trailer of pipe:: Broken pipe

[Worker 1]
00:00:05 [-------------------------------------------------------------------------------]   0%  0/2240 (0 fps, eta 0s)
INFO [av1an_core::settings] temporary directory: C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\data\av1anTemp\1649104708266
Scene detection
INFO [av1an_core::settings] scenecut: found 21 scene(s) [with extra_splits(250 frames): 23]
00:00:08 [#######################################################################] 100%  2240/2240 (263.92 fps, eta 0s) Queue 23 Workers 4 Passes 2
Params: --end-usage=q --cpu-used=6 --cq-level=95 --disable-kf --kf-min-dist=12 --kf-max-dist=250 --enable-dnl-denoising=0 --denoise-noise-level=0 --threads=2 --tile-rows=0 --tile-columns=0 --enable-keyframe-filtering=1 --aq-mode=0 --tune-content=default --tune=image_perceptual_quality --enable-qm=1 --lag-in-frames=35
ERROR [av1an_core::target_quality] [chunk 0] encoder crashed: exit code: 1
stdout:

stderr:
        Fatal: Specify stream dimensions with --width (-w)  and --height (-h)

source pipe stderr:
        pipe:: Invalid data found when processing input

ERROR [av1an_core::broker] [chunk 0] encoder crashed: exit code: 1
stdout:

stderr:
        Fatal: Specify stream dimensions with --width (-w)  and --height (-h)

source pipe stderr:
        pipe:: Invalid data found when processing input

[Worker 1]
00:00:06 [-------------------------------------------------------------------------------]   0%  0/2240 (0 fps, eta 0s)
INFO [av1an_core::settings] temporary directory: C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\data\av1anTemp\1649104795226
Scene detection
INFO [av1an_core::settings] scenecut: found 21 scene(s) [with extra_splits(250 frames): 23]
00:00:10 [#######################################################################] 100%  2240/2240 (222.37 fps, eta 0s) Queue 23 Workers 4 Passes 2
Params: --codec=vp9 --profile=0 --bit-depth=8 --end-usage=q --cpu-used=3 --cq-level=95 --kf-max-dist=250 --threads=2 --row-mt=1 --tile-columns=0 --tile-rows=0
ERROR [av1an_core::target_quality] [chunk 6] encoder crashed: exit code: 1
stdout:

stderr:
        Fatal: Specify stream dimensions with --width (-w)  and --height (-h)

source pipe stderr:
        pipe:: Invalid data found when processing input

ERROR [av1an_core::broker] [chunk 6] encoder crashed: exit code: 1
stdout:

stderr:
        Fatal: Specify stream dimensions with --width (-w)  and --height (-h)

source pipe stderr:
        pipe:: Invalid data found when processing input

[Worker 1]
00:00:04 [-------------------------------------------------------------------------------]   0%  0/2240 (0 fps, eta 0s)
INFO [av1an_core::settings] temporary directory: C:\Users\Antonio\Desktop\File desktop\Per scene VIDEO Encoder av1an e tools\Nmkoder1.10 av1an GUI\data\av1anTemp\1649104901459
Scene detection
INFO [av1an_core::settings] scenecut: found 21 scene(s) [with extra_splits(250 frames): 23]
00:00:07 [#######################################################################] 100%  2240/2240 (307.63 fps, eta 0s) Queue 23 Workers 4 Passes 1
Params: --crf 95 --preset medium --keyint 250 --frame-threads 2 --output-depth 8 --colorprim 2 --transfer 2 --colormatrix 2 --range limited
ERROR [av1an_core::target_quality] [chunk 5] encoder crashed: exit code: 1
stdout:

stderr:
        x265 [error]: unable to open input file <->

source pipe stderr:
        pipe:: Invalid data found when processing input

ERROR [av1an_core::broker] [chunk 5] encoder crashed: exit code: 1
stdout:

stderr:
        x265 [error]: unable to open input file <->

source pipe stderr:
        pipe:: Invalid data found when processing input

[Worker 1]
00:00:04 [-------------------------------------------------------------------------------]   0%  0/2240 (0 fps, eta 0s)
n00mkrad commented 2 years ago

SVT does not work with target VMAF for now. Use CRF

Werve commented 2 years ago

So is already known to not work with x265, AOM and VPX too? Edit: Doing some test changing directory (without spaces) and sometimes it works Actually only 1 time it worked but i don't understand why... I think the problem is related to both path with space and no administrator execution (If i run the program as Administrator unfortunately with the current UI is needed to drag and drop the fine and usually Explorer.exe' windows are not in Administrator context so cant use these to drag files)

Werve commented 2 years ago

If needed that is the log folder of a partially worked try (It started but then stopped encoding with the same error in the prompt) 2022-4-5-0-12-28-507.zip

Werve commented 2 years ago

So, based on test done:

AOM target VMAF:

VPX target VMAF:

x265 target VMAF: At first it always ended with "unable to open file" for a x chunk. Then if I first run with CRF and then set again target VMAF it worked...

Edit: Actually the result are not stable... now again VPX didn't worked About x265 target VMAF error "unable to open file" seems like a program locked a chunk and if av1an can't use it the first try it stop (https://github.com/master-of-zen/Av1an/issues/398). Oddly if i skip the scene detect (Nmkoder Splitting method: none) encoding works. I think the cause is vapoursynth or the plugins (ffm2, lsmash)

Werve commented 2 years ago

Actually only a few times (almost none) I got errors that prevented the start of the encoding if I force to not use the system PATH but only the one of the program folder and run it from a folder on an HDD not SSD. So I suggest as a workaround to remove the ;%PATH% from the bat file that the program generates and any reference in the other parts of the code. This is probably because there are already installed and in PATH other incompatible versions of ffmpeg (5.0) and vapoursynth.

Moreover using the latest version of av1an also SVT-AV1 works (recompiling from source, see here for compilation in windows https://github.com/master-of-zen/Av1an/issues/529).

I don't understand why on some files created with vpx encoder all metrics (psnr, ssim, vmaf) results on nmkoder are different from others tools. Like vmaf nmkoder: 96, ffmetrics: 25

Edit: Excluding the system path make the auto-crop feature don't work (error says ffmpeg dont have this filter).