media-autobuild_suite icon indicating copy to clipboard operation
media-autobuild_suite copied to clipboard

building or locating some DLLs for other uses; eg ffms, fftw3, mediainfo

Open hydra3333 opened this issue 1 year ago • 6 comments

Hello. I like building the 64bit static version to ensure it's an all-in-one standalone solution.

Having said that, I also need a few DLLs for other uses, eg ffms, fftw3, mediainfo (for use with vapoursynth).

I looked for them after a build and could not find any of those DLLs.

Is there any way to build these as a part of a static ffmpeg build process, or even somehow just build those alone ?

Thanks

hydra3333 avatar May 31 '23 13:05 hydra3333

When the suite builds a static ffmpeg, there is no need for building separate DLLs, instead there are Linux ELF related *.a libraries built to be linked. You could try to configure the suite to build both static and dynamic versions of ffmpeg, then it may produce both; but as static is preferred, chances are that the dynamic version fails as it is not tested that often.

media-autobuild_suite.ini ffmpegB2=4

LigH-de avatar Jun 03 '23 08:06 LigH-de

OK thanks. I build in a windows sandbox, so everything is lost afterward apart from the files I save such as media-autobuild_suite.ini etc.

I guess I could build static, save files, close sandbox, open new sandbox and build dynamic and see what gives.

Cheers

hydra3333 avatar Jun 03 '23 09:06 hydra3333

Manually build them is enough if you aren't after the freshest codes, well, kind of, because for building ffms2 I had to use that bulky visual studio to build the dll that vapoursynth can use, I tried many times with m-ab-s msys2 environment in the past but had no success (I can build the indexer exe but not dll, what the...), but I'll keep try it I think.

L4cache avatar Jun 15 '23 21:06 L4cache

but I'll keep try it I think.

I'd certainly appreciate it if you did.

hydra3333 avatar Jun 28 '23 09:06 hydra3333

I tried it a few times again. Now I know how to build a functional ffms2 plugin for VapourSynth, well, kind of. (just noticed I said it again😂, but that's fair because I have to manually edit some config) I did it all manual but it's probably easy to integrate with m-ab-s.

I quickly realized that simply configure ffms2 with --enable-shared would build the ffms2 dll, but it failed to load into VapourSynth, then I just abandoned it for a long time, today I ran some dependency walk with CFF Explorer and found that it actually dynamically links libgcc_s_seh-1.dll which prevents it to be loaded, I have to edit the config.status replace -lgcc_s with -lgcc_eh before running make to get rid of it (or quite the opposite, embrace it, I mean statically link it) There should be a better way I guess

My steps:

  1. build and install dav1d meson setup build -Ddefault_library=static && cd build && ninja install
  2. build and install ffmpeg ./configure --disable-encoders --disable-muxers --disable-filters --enable-libdav1d --prefix=/mingw64 && make install -j16 (please change -j16 accordingly)
  3. apply m-ab-s ffms2 patch
  4. configure ffms2 ./autogen.sh --enable-avisynth --enable-shared
  5. edit config.status sed -i 's/-lgcc_s/-lgcc_eh/g' config.status
  6. build ffms2
  7. strip it?
  8. test it

If you don't care about av1 decoding you can skip that first step and don't enable it in ffmpeg. I also added a patch by quietvoid which addresses some av1 related problem https://github.com/quietvoid/ffms2/commit/7fb91709ea194de3e8815728a88ccb9395706108 , but I don't know how it will affect decoding of other formats.

L4cache avatar Sep 22 '23 17:09 L4cache

Thank you :)

hydra3333 avatar Sep 23 '23 08:09 hydra3333