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

1.9.0 crashes with target VMAF #9

Open
MCOfficer opened this issue Jan 26, 2022 · 9 comments
Open

1.9.0 crashes with target VMAF #9

MCOfficer opened this issue Jan 26, 2022 · 9 comments

Comments

@MCOfficer
Copy link

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
Copy link
Owner

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

@MCOfficer
Copy link
Author

MCOfficer commented Jan 26, 2022

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 master-of-zen/Av1an#556

Feel free to close.

@MCOfficer
Copy link
Author

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

@Werve
Copy link
Contributor

Werve commented Apr 4, 2022

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

  • The log using SVT-AV1:
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)
  • The log using AOM:
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)
  • The log using VPX (Also ffmpeg.exe crashed at the end):
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)
  • The log using x265:
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
Copy link
Owner

n00mkrad commented Apr 4, 2022

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

@Werve
Copy link
Contributor

Werve commented Apr 4, 2022

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
Copy link
Contributor

Werve commented Apr 4, 2022

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
Copy link
Contributor

Werve commented Apr 5, 2022

So, based on test done:

AOM target VMAF:

  • When "Threads per worked" = 1 and Av1an "Amount of Worker" = 1
    Encoding stuck (or maybe very slow) at 0% without errors in cmd log

  • When "Threads per worked" = 1 and Av1an "Amount of Worker" = 2 (as suggested here thread 'main' panicked master-of-zen/Av1an#466):
    Encoding almost worked but seems stuck at 90% without errors in cmd log and 0% CPU use to av1an, ffmpeg, aomenc process

  • When "Threads per worked" = 1 and Av1an "Amount of Worker" > 2
    Encoding failed with errors in cmd log

  • When "Threads per worked" > 1 and Av1an "Amount of Worker" = 1
    Encoding stuck (or maybe very slow) at 0% without errors in cmd log

  • When "Threads per worked" > 1 and Av1an "Amount of Worker" = 2
    Encoding almost worked but seems stuck at 90% without errors in cmd log and 0% CPU use to av1an, ffmpeg, aomenc process

  • When "Threads per worked" > 1 and Av1an "Amount of Worker" > 2
    Encoding failed with errors in cmd log

VPX target VMAF:

  • With all valids combination (less then max PC thread available)
    Encoding WORKED

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 (master-of-zen/Av1an#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
Copy link
Contributor

Werve commented Apr 10, 2022

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 master-of-zen/Av1an#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).

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

No branches or pull requests

3 participants