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 263 forks source link

[32 bits] FFmpeg is not static because it requests libopenh264.dll #1770

Closed kenichi512 closed 4 years ago

kenichi512 commented 4 years ago

I know other users have asked about this several times and that's why you mark them as duplicates, but I don't understand what exactly is the way to fix it. Should I replace the original code on build/media-suite_compile.sh with this? Or do I have to edit and add # to --enable-libopenh264 on build/ffmpeg_options.txt? I tried both ways but only got errors.

23:48:21 ┌ ffmpeg git  .................................. [Updates found]
23:48:26 ├ Changing options to comply to nonfree...
libnpp is only supported in 64-bit.
CUDA_PATH environment variable not set or directory does not exist.
23:48:30 ├ Compiling static FFmpeg...
23:48:32 ├ Running pre configure from ffmpeg_extra.sh...
23:48:35 ├ Running configure...
Likely error (tail of the failed operation logfile):
CXXFLAGS: -mthreads -mtune=generic -O2 -pipe
LDFLAGS: -pipe -static-libgcc -static-libstdc++ -L/local32/lib -L/mingw32/lib
../configure --prefix=/local32 --bindir=/local32/bin-video --pkg-config-flags=--static --cc=ccache gcc --cxx=ccache g++ --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-chromaprint --enable-decklink --enable-frei0r --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libflite --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-librtmp --enable-librubberband --enable-libtesseract --enable-libxavs --enable-libzmq --enable-libzvbi --enable-openal --enable-libcodec2 --enable-libsrt --enable-ladspa --enable-librav1e --enable-libglslang --enable-vulkan --enable-opencl --enable-opengl --enable-libopenh264 --enable-openssl --extra-cflags=-fopenmp --extra-libs=-lgomp --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DCACA_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCHROMAPRINT_NODLL --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-libs=-lpsapi --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB --enable-nonfree --extra-version=g7c8ad72f1c+4
ERROR: openh264 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

logs.zip

wiiaboo commented 4 years ago

Or do I have to edit and add # to --enable-libopenh264 on build/ffmpeg_options.txt?

If not using OpenH264 is an option for you, why are you even opening an issue about this?

wiiaboo commented 4 years ago

And that log as nothing to do with the issue's title.

kenichi512 commented 4 years ago

The problem is that after doing what I mentioned before, the suite stops at this part unlike before the process ended normally but the bin still required that dll file. Needless to say, I did different tests with the other ffmpegChoice= options and only the 3rd option generated a completely static build..

BTW, after delete ffmpeg-git folder and restore the original media-suite_compile.sh file, I put again ffmpegChoice=1 in build/media-autobuild_suite.ini but keeping the # to --enable-libopenh264 in build/ffmpeg_options.txt, and now the build no longer asks for the dll file.

I don't understand anything that has happened (I'm a newbie after all) but I don't think what I did is a fix if at ffmpegChoice=4 it still stops and doesn't finish compile.

BTW, if OpenH264 is supposedly useless, I don't understand why it is included by default for a full build (ffmpegChoice=4). Also, why does the build include libopenh264 if I'm sure to set ffmpegChoice=1 on the first time run the suite?

wiiaboo commented 4 years ago

It's included in the only option that contains everything that suite allows including in FFmpeg OOB. Just because it's an option doesn't mean you're forced to use it. On the contrary, it's strongly advised that you only pick what you actually need, that's why the first option is the one that allows you to pick and choose what to include.

If you just change the options but there are no updates to FFmpeg or you don't delete the generated executables, it will not recompile with the changed options.

1480c1 commented 4 years ago

closing since I'm assuming it's closed, if not, you can reask or something