Opened 2 years ago

Closed 2 years ago

#9937 closed defect (invalid)

libkvazaar encoder produces no output

Reported by: Jozef Chutka Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: libkvazaar
Cc: Jozef Chutka Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Jozef Chutka)

Using BtbN ffmpeg version N-108232-g79845ce6cf-20220920 Copyright (c) 2000-2022 the FFmpeg developers

I am not able to make libkvazaar work:

ffmpeg -filter_complex "smptehdbars=size=400x120:rate=30:duration=10" -c:v libkvazaar -y out.mp4

out.mp4 is 44 bytes file (empty mp4 box I guess?)

ffmpeg -filter_complex "smptehdbars=size=400x120:rate=30:duration=10" -c:v libkvazaar -y out.mp4
ffmpeg version N-108232-g79845ce6cf-20220920 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220920
  libavutil      57. 36.102 / 57. 36.102
  libavcodec     59. 44.100 / 59. 44.100
  libavformat    59. 32.100 / 59. 32.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 49.100 /  8. 49.100
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    56.  7.100 / 56.  7.100
Stream mapping:
  smptehdbars:default -> Stream #0:0 (libkvazaar)
Press [q] to stop, [?] for help
Compiled: INTEL, flags: MMX SSE SSE2 SSSE3 SSE41 SSE42
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(11) avx2(54) sse2(2) sse41(4)
In use: avx(1) avx2(54)
--owf=auto value set to 4.
--threads=auto value set to 4.
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf59.32.100
  Stream #0:0: Video: hevc (hev1 / 0x31766568), yuv420p(bt709/unknown/unknown, progressive), 400x120 [SAR 1:1 DAR 10:3], q=2-31, 30 fps, 15360 tbn
    Metadata:
      encoder         : Lavc59.44.100 libkvazaar
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A

I have also tried re-ecndoing an existing video, or different kvazaar-params but with the same result.

Is there any extra argument to be used or the encoder is broken?

Change History (4)

comment:1 by Jozef Chutka, 2 years ago

Description: modified (diff)

comment:2 by Jozef Chutka, 2 years ago

FFmpeg 5.1 and 4.4 (latest BtbN builds) fails the same way.

I am also opening an issue on kvazaar side https://github.com/ultravideo/kvazaar/issues/349

comment:3 by Jozef Chutka, 2 years ago

According to the discussion on https://github.com/ultravideo/kvazaar/issues/349 the issue seems to be related to BtbN windows builds (based on ct-ng, MinGW 9, GCC 12), while builds based on MinGW 10, GCC 10.3 works ok (i.e. https://github.com/nanake/ffmpeg-tinderbox/releases/latest).

Likely the issue is caused by GCC 12 vs used AVX2 optimizations.

The workaround for BtbN build is to use -kvazaar-params "cpuid=0".

I believe this issue is outside of ffmpeg scope and this ticket can be closed

comment:4 by Carl Eugen Hoyos, 2 years ago

Resolution: invalid
Status: newclosed

Thank you for the analysis!

Note: See TracTickets for help on using tickets.