master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.51k stars 155 forks source link

VMAF calculation failed #436

Closed AlyoshaVasilieva closed 2 years ago

AlyoshaVasilieva commented 2 years ago
> .\av1an.exe -i .\lossless.mkv --target-quality 91 -o avian_loss.mkv
Scene detection
[00:00:09] [###########################################################################################################################################################] 100% 1079/1079 (116.48 fps, eta 0s)
Queue: 7 Workers: 7 Passes: 2
Params: --threads=8 --cpu-used=6 --end-usage=q --cq-level=30 --tile-columns=2 --tile-rows=1 --kf-max-dist=240 --kf-min-dist=12
[00:00:11] [----------------------------------------------------------------------------------------------------------------------------------------------------------------]   0% 0/1079 (0.00 fps, eta 0s)
thread '<unnamed>' panicked at 'VMAF calculation failed:
Command: "ffmpeg" "-loglevel" "error" "-hide_banner" "-y" "-thread_queue_size" "1024" "-hide_banner" "-r" "60" "-i" ".e39756e\\split\\v_3500000.ivf" "-r" "60" "-i" "-" "-filter_complex" "[0:v]scale=1920x1080:flags=bicubic:force_original_aspect_ratio=decrease,setpts=PTS-STARTPTS[distorted];[1:v]select=not(mod(n\\,4)),setpts=0.2500*PTS,scale=1920x1080:flags=bicubic:force_original_aspect_ratio=decrease,setpts=PTS-STARTPTS[ref];[distorted][ref]libvmaf=log_fmt=\'json\':eof_action=endall:log_path=//?/C\\\\:/tmpvideo/.e39756e/split/00000.json:n_threads=0" "-f" "null" "-"
Output: Output {
    status: ExitStatus(
        ExitStatus(
            1,
        ),
    ),
    stdout: "",
    stderr: "",
}', av1an-core\src\vmaf.rs:286:3
[00:00:11] [----------------------------------------------------------------------------------------------------------------------------------------------------------------]   0% 0/1079 (0.00 fps, eta 0s)
thread '<unnamed>' panicked at 'VMAF calculation failed:
Command: "ffmpeg" "-loglevel" "error" "-hide_banner" "-y" "-thread_queue_size" "1024" "-hide_banner" "-r" "60" "-i" ".e39756e\\split\\v_3500006.ivf" "-r" "60" "-i" "-" "-filter_complex" "[0:v]scale=1920x1080:flags=bicubic:force_original_aspect_ratio=decrease,setpts=PTS-STARTPTS[distorted];[1:v]select=not(mod(n\\,4)),setpts=0.2500*PTS,scale=1920x1080:flags=bicubic:force_original_aspect_ratio=decrease,setpts=PTS-STARTPTS[ref];[distorted][ref]libvmaf=log_fmt=\'json\':eof_action=endall:log_path=//?/C\\\\:/tmpvideo/.e39756e/split/00006.json:n_threads=0" "-f" "null" "-"
Output: Output {
    status: ExitStatus(
        ExitStatus(
            1,
        ),
    ),
    stdout: "",
    stderr: "",
[00:00:13] [----------------------------------------------------------------------------------------------------------------------------------------------------------------]   0% 0/1079 (0.00 fps, eta 0s)
Stopped
> ffmpeg -version
ffmpeg version 2021-12-06-git-ef00d40e32-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.2.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil      57. 10.101 / 57. 10.101
libavcodec     59. 14.100 / 59. 14.100
libavformat    59.  9.102 / 59.  9.102
libavdevice    59.  0.101 / 59.  0.101
libavfilter     8. 19.100 /  8. 19.100
libswscale      6.  1.101 /  6.  1.101
libswresample   4.  0.100 /  4.  0.100
libpostproc    56.  0.100 / 56.  0.100

aomenc: AOMedia Project AV1 Encoder 3.2.0-288-gda133ca1d

Windows 10

dexeonify commented 2 years ago

Try specifying the path to VMAF model:

.\av1an.exe -i .\lossless.mkv --target-quality 91  --vmaf-path 'vmaf_v0.6.1.json' -o av1an_loss.mkv

Download the model and put it in the same folder as your video file.

AlyoshaVasilieva commented 2 years ago

The first encode failed due to

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "Encoder encountered an error on chunk 6: Output { status: ExitStatus(ExitStatus(1)), stdout: \"\", stderr: \"Fatal: Specify stream dimensions with --width (-w)  and --height (-h)\\r\\n\" }"', av1an-core\src\target_quality.rs:217:45
[00:02:59] [################################################################################################################################################>-----------]  93% 1001/1079 (5.56 fps, eta 14s)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', av1an-core\src\broker.rs:53:35
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', av1an-core\src\settings.rs:868:21

but the next worked (just by re-running it). Thanks.

redzic commented 2 years ago

@AlyoshaVasilieva The latest git version has better error handling, and will tell you the piping error (as well as properly capture the stdout/stderr from ffmpeg in the case of vmaf calculation fail). It also has a --max-tries argument which you can set, which should work for you since you mentioned that resuming worked for you.

redzic commented 2 years ago

Closing as there is nothing to act on anymore, as everything has already been fixed in the git version