Xaymar / ffmpeg-amf Licence: other
FFMPEG with AMDs Advanced Media Framework integrated
Building
Prerequisites
Installation
MSYS 2
Install MSYS2 to any location, preferably without any spaces, slashes or other special symbols.
Open an MSYS2 shell and run 'pacman -Syu' (without ') and wait for it to finish. Close it when it asks for it.
Open an MSYS2 shell and run 'pacman -Su' (without '), wait for it to complete.
MingW and YASM
Open an MSYS2 shell.
Run 'pacman -S make diffutils yasm nasm mingw-w64-x86_64-gcc mingw-w64-i686-gcc mingw-w64-x86_64-gtk3 mingw-w64-i686-gtk3' (without ').
Done
Warnings about using MSYS2 with MinGW
Compiling
Build Environment
Visual Studio:
Launch a "Visual Studio Native Tools Command Prompt".
Navigate to the MSYS2 installation directory.
Launch an msys2 shell with 'msys2_shell.cmd -full-path'
Verify that everything is correct using 'which link' and 'which cl' (they should be pointing to VS versions)
MinGW
Launch a MSYS2 shell that matches the architecture you want to build for.
Compiling
Using the previous shell, navigate to the ffmpeg build directory and run:
(MingW 32): './ffmpeg-build-win release 32'
(MingW 64): './ffmpeg-build-win release 64'
(VS 32): './ffmpeg-build-win release 32 msvc'
(VS 64): './ffmpeg-build-win release 64 msvc'
Wait until it's done.
Pick up your correctly built ffmpeg from /build and /redist.
Old VS Build Steps
Grab the current stable source.
Using the above shell, navigate to the stable source.
CC=cl configure --prefix={FFMPEG Shared Path} --enable-shared --extra-cflags="-DNO_PREFIX"
make
make install-lib-shared
Navigate to {FFMPEG Shared Path}/lib and rename libx264.dll.lib to libx264.lib.
Follow this: https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
Add the following extra commands to the configure command:
--extra-cflags='-I{FFMPEG Shared Path}\include' (Path must be in linux format)
--extra-ldflags='-LIBPATH:"{FFMPEG Shared Path}\lib"' (Path must be in windows format)
--enable-gpl
--enable-libx264
make
make install
Copy the libx264-*.dll from {FFMPEG Shared Path}/bin to the ffmpeg output directory.
./configure --prefix=/d/Projects/Cpp/ffmpeg-shared --enable-asm --disable-doc --enable-gpl --enable-nonfree --enable-w32threads --extra-ldflags=-static-libgcc --enable-muxer=av1 --enable-parser=av1
./configure --prefix=/d/Projects/Cpp/ffmpeg-shared --enable-shared --toolchain=msvc --enable-asm --enable-yasm --disable-doc --extra-cflags=-I/d/Projects/Cpp/ffmpeg-shared/include --extra-ldflags='-LIBPATH:"D:\Projects\Cpp\ffmpeg-shared\lib"' --enable-gpl --enable-libx264 --enable-encoder=h264_vce --enable-lto
./configure --prefix=/d/Projects/Cpp/ffmpeg-shared --enable-asm --enable-yasm --toolchain=msvc --enable-shared --enable-gpl --enable-nonfree --enable-lto
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at
[email protected] .