m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.53k stars 264 forks source link

[mingw64] [vvdec|vvenc] not included when selected or unknown option "--enable-libvvenc" when included manually #2552

Closed Psynosaur closed 11 months ago

Psynosaur commented 11 months ago

Hi

I successfully compiled the shared ffmpeg with the following command as per the last_successful_run file which states that --vvenc=y --vvdec=y have been selected.

#!/bin/bash
bash /build/media-suite_compile.sh --cpuCount=24 --build32=no --build64=yes --deleteSource=y --mp4box=n --vpx=y --x264=yes --x265=y --other265=n --flac=y --fdkaac=y --mediainfo=n --sox=n --ffmpeg=shared --ffmpegUpdate=n --ffmpegChoice=n --mplayer=n --mpv=n --license=nonfree --stripping=y --packing=n --rtmpdump=n --logging=y --bmx=n --standalone=n --aom=y --faac=y --exhale=y --ffmbc=n --curl=y --cyanrip=n --rav1e=y --ripgrep=n --dav1d=y --vvc=y --uvg266=y --vvenc=y --vvdec=y --jq=y --jo=y --dssim=y --avs2=y --dovitool=n --hdr10plustool=n --timeStamp=y --noMintty=n --ccache=y --svthevc=y --svtav1=y --svtvp9=n --xvc=y --vlc=n --libavif=n --jpegxl=n --ffmpegPath=https://git.ffmpeg.org/ffmpeg.git --exitearly=

however the ffmpeg output doesn't include vvdec and vvenc :

 C:\mabs\local64\bin-video> .\ffmpeg.exe
ffmpeg version N-112543-gea284b6d7b Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.2.0 (Rev2, Built by MSYS2 project)
  configuration:  --disable-static --enable-shared --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --disable-doc --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-schannel --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-libfdk-aac --extra-libs=-liconv --enable-gpl --enable-version3 --enable-nonfree --shlibdir=/local64/bin-video
  libavutil      58. 30.100 / 58. 30.100
  libavcodec     60. 32.100 / 60. 32.100
  libavformat    60. 17.100 / 60. 17.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 13.100 /  9. 13.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

if I add these manually then I get the below error:

17:40:54 Warning: We will not accept any issues lacking any form of logs or logs.zip!
media-autobuild_suite  (64bit)17:40:54 
    Starting 64bit compilation of all tools
Imported default FFmpeg options from .bat
License: nonfree
Imported default mpv options from .bat
media-autobuild_suite  (64bit): compiling global tools17:41:05 
    Starting 64bit compilation of global tools
17:41:05 ├ Running rustup_update...
17:41:05 ├ Running set_default_toolchain...
17:41:08   Running git update for jo...
17:41:08 jo git  ........................................... [Up-to-date]
17:41:11   Running git update for jq...
17:41:11 jq git  ........................................... [Up-to-date]
17:41:14   Running git update for dssim...
17:41:14 dssim git  ........................................ [Up-to-date]
17:41:15 libidn2 2.3.0  .................................... [Up-to-date]
17:41:16 libpsl 0.21.0  .................................... [Up-to-date]
17:41:20   Running git update for curl...
17:41:21 curl git  ......................................... [Up-to-date]
media-autobuild_suite  (64bit): compiling audio tools17:41:21 
    Starting 64bit compilation of audio tools
17:41:26   Running git update for ogg...
17:41:26 ogg git  .......................................... [Up-to-date]
17:41:29   Running git update for vorbis...
17:41:29 vorbis git  ....................................... [Up-to-date]
17:41:32   Running git update for flac...
17:41:32 flac git  ......................................... [Up-to-date]
17:41:34   Running git update for fdk-aac...
17:41:35 fdk-aac git  ...................................... [Up-to-date]
17:41:39   Running git update for exhale...
17:41:39 exhale git  ....................................... [Up-to-date]
17:41:42   Running git update for opus...
17:41:42 opus git  ......................................... [Up-to-date]
media-autobuild_suite  (64bit): compiling video tools17:41:42 
    Starting 64bit compilation of video tools
17:41:53   Running git update for vpx...
17:41:53 vpx git  .......................................... [Up-to-date]
17:42:09   Running git update for aom...
17:42:10 aom git  .......................................... [Up-to-date]
17:42:13   Running git update for dav1d...
17:42:14 dav1d git  ........................................ [Up-to-date]
17:42:16   Running git update for rav1e...
17:42:17 rav1e git  ........................................ [Up-to-date]
17:42:21   Running git update for SDL...
17:42:21 SDL git  .......................................... [Up-to-date]
17:42:24   Running git update for xavs2...
17:42:24 xavs2 git  ........................................ [Up-to-date]
17:42:27   Running git update for davs2...
17:42:27 davs2 git  ........................................ [Up-to-date]
17:42:31   Running git update for AMF...
17:42:31 AMF git  .......................................... [Up-to-date]
17:42:34   Running git update for SVT-HEVC...
17:42:34 SVT-HEVC git  ..................................... [Up-to-date]
17:42:37   Running git update for SVT-AV1...
17:42:38 SVT-AV1 git  ...................................... [Up-to-date]
17:42:40   Running git update for xvc...
17:42:40 xvc git  .......................................... [Up-to-date]
17:42:44   Running git update for x264...
17:42:44 x264 git  ......................................... [Up-to-date]
17:42:48   Running git update for x265_git...
17:42:48 x265_git git  ..................................... [Up-to-date]
17:42:51   Running git update for ffnvcodec...
17:42:52 ffnvcodec git  .................................... [Up-to-date]
17:42:55   Running git update for vvc...
17:42:55 vvc git  .......................................... [Up-to-date]
17:42:58   Running git update for uvg266...
17:42:58 uvg266 git  ....................................... [Up-to-date]
17:43:00   Running git update for vvenc...
17:43:01 vvenc git  ........................................ [Up-to-date]
17:43:03   Running git update for vvdec...
17:43:04 vvdec git  ........................................ [Up-to-date]
17:43:08   Running git update for ffmpeg...
17:43:09 ┌ ffmpeg git  .................................. [Files missing]
17:43:09 ├ Changing options to comply to nonfree...
17:43:12 ├ Compiling shared FFmpeg...
17:43:12 ├ Running uninstall...
17:43:12 ├ Running configure...
Likely error (tail of the failed operation logfile):
CPPFLAGS: 
CFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads
CXXFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1
LDFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ -L/local64/lib -L/mingw64/lib
../configure --prefix=/local64 --disable-static --enable-shared --pkg-config=pkgconf --pkg-config-flags=--keep-system-libs --keep-system-cflags --static --cc=ccache gcc --cxx=ccache g++ --ld=ccache g++ --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --disable-doc --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-schannel --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-gmp --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-libfdk-aac --enable-libvvenc --enable-libvvdec --extra-libs=-liconv --enable-gpl --enable-version3 --enable-nonfree --prefix=/local64 --bindir=/local64/bin-video --shlibdir=/local64/bin-video
Unknown option "--enable-libvvenc".
See ../configure --help for available options.
configure failed. Check C:/mabs/build/ffmpeg-git/build-shared-64bit/ab-suite.configure.log
This is required for other packages, so this script will exit.
17:43:17   Creating diagnostics file...

pardon the issue, but I have no more ideas on how to proceed, did I perhaps miss something?

regards Ohan logs.zip

waldonnis commented 11 months ago

Currently, vvenc/vvdec aren't directly supported in ffmpeg, so just adding it to the ffmpeg configure options won't work. There does seem to be some vvc parsing support in there, but I don't know how complete it is or how it's enabled...and isn't particularly useful for what you're probably trying to do. If you want to use vvencapp for encoding, you're probably going to have to either pipe yuv to it (probably takes y4m too) or give it a yuv file as input, as those seem to be the only input types the encoder binary supports.

FYI, there's a whole wiki page on ffmpeg integration on the vvenc github repo that's worth reading. It includes instructions for patching support into ffmpeg and includes instructions for modifying this suite's scripts to do so, which is nice of them to provide. Honestly, learning to pipe y4m/yuv video to encoder binaries is worth learning about if you don't already know how to do it, since patches may not apply cleanly at some point and you'd be stuck without a backup plan if you just relied on ffmpeg integration. It also may allow you to use options that are only supported by the encoder binary and not exposed to ffmpeg (x265 has a few of these, for example).

Psynosaur commented 11 months ago

Ah goodness

will give that a whirl , thanks for the inputs, yes I have learnt more than I'd like to admit about ffmpeg in this past month . . .

Thank you !