deconoob.blogg.se

Configure ffmpeg windows
Configure ffmpeg windows






  1. #CONFIGURE FFMPEG WINDOWS HOW TO#
  2. #CONFIGURE FFMPEG WINDOWS INSTALL#
  3. #CONFIGURE FFMPEG WINDOWS GENERATOR#
  4. #CONFIGURE FFMPEG WINDOWS UPDATE#
  5. #CONFIGURE FFMPEG WINDOWS CODE#

#CONFIGURE FFMPEG WINDOWS INSTALL#

To the PKG_CONFIG_PATH environment variableĪdd the x265.pc install location to the PKG_CONFIG_PATH environment variable PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/c/x265/lib/pkgconfig Perhaps you should add the directory containing `x265.pc' Package x265 was not found in the pkg-config search path. This should fail with an error similar to the following, since we haven’t told pkg-config where our x265 is. Verify our x265 build with pkg-config pkg-config -exists -print-errors x265 Open a VS command prompt - I used the 圆4 Native Tools Command Prompt for VS 2017Ĭhange the directory - cd to c:\tools\msys64 This will result in the ffmpeg source tree located at c:\third_party\ffmpeg\ffmpeg which will be handy for an out-of-tree buildĬreate the directory c:\third_party\ffmpeg\ffbuild Verify you have bin, include and lib folders.īuild ffmpeg with custom x265 build from aboveĬreate the directory c:\third_party\ffmpeg and cd from a command prompt to it. Navigate to the location used in the CMAKE_INSTALL_PREFIX property above.This should be done for the cli, common, and encoder projects.īuild the INSTALL project - this is important for building ffmpeg next Open the x265.sln in Visual Studio - change the build type to Release and the Arch to 圆4Ĭhange the C++ runtime to use static CRT (/MT) rather than the default (/MD) to match ffmpeg This is for 12-bit support (if you want that check it). Another property called MAIN12 will probably get highlighted in red.Verify the NASM_EXECUTABLE property is pointing the location where you installed NASM Set the CMAKE_INSTALL_PREFIX to a directory the x265 lib, headers, and importantly the pkg-config.Run the make-solutions.bat - during the processing, the CMake GUI will open with properties highlighted red.

#CONFIGURE FFMPEG WINDOWS UPDATE#

Update - libx265 should now have a corresponding make-solutions.bat file for Visual Studio 2017. I’m using 2017, so my command is: cmake -G "Visual Studio 15 Win64".

#CONFIGURE FFMPEG WINDOWS GENERATOR#

Change the generator command to match the version of VS you want to use. Using a text editor, open make-solutions.bat. It is likely there will not be one matching the newest version of Visual Studio, so use the latest one available (In my case it was vc12-x86_64) Find the directory that matches the VC compiler you want to use.

configure ffmpeg windows

  • Close the msys2 shell for now - we’ll relaunch later from a Visual Studio command promptĬreate the directory c:\third_party and cd from a command prompt to it.
  • When the msys2 shell opens - use pacman to install the following: pacman -S gcc (thanks to Scott Davies for pointing this out) This is done so msys2 can use your existing PATH environment variable.

    configure ffmpeg windows

    With a text editor, open the file C:\tools\msys64\msys2_shell.cmd and un-comment the line rem set MSYS2_PATH_TYPE=inherit

  • Download Msys2 installer for 64-bit and install to C:\tools\msys64.
  • Add c:\tools\nasm to your PATH environment variable.
  • Download NASM 2.13 or newer to C:\tools\nasm.
  • NASM (x265 v2.6 and older will use YASM, new versions will use NASM).
  • Add c:\tools\yasm to your PATH environment variable.
  • Rename yasm-1.3.0-win64.exe (or whatever version) to yasm.exe.
  • Download YASM 64-bit and copy to C:\tools\yasm.
  • configure ffmpeg windows

    When installing VS 2017 - make sure you select the options for Desktop development with C++ so the C++ compiler and tools are installed.Visual Studio 2017 Community Edition (you can probably get most versions 2015 and newer to work).

    #CONFIGURE FFMPEG WINDOWS CODE#

  • TortoiseHg - to get the x265 source code.
  • Note: This guide will only build the 64-bit versions, but you should be able to adjust for 32-bit.

    #CONFIGURE FFMPEG WINDOWS HOW TO#

    Some of the steps will also detail some of the errors I ran into along the way - in case someone else runs into trouble, hopefully then it will show how to overcome any future hurdles. Here are the exact steps I did to build both ffmpeg and libx265 with Visual Studio 2017 on Windows. I discovered that by default - most ffmpeg builds include only 8-bit support for HEVC encoding with libx265.Ĭertainly, you can get builds that already enable 10 or even 12-bit support - but I’m usually a glutton for punishment so I thought I would see how hard it was to just build it manually. Incompatible pixel format 'yuv420p10le' for codec 'libx265', auto-selecting format 'yuv420p' So I was trying to create some 10-bit test HEVC content with ffmpeg and ran into the following error: ffmpeg -i "input.mkv" -c:v libx265 -preset slow -crf 18 -pix_fmt yuv420p10le -c:a copy -y output_10bit.mkv








    Configure ffmpeg windows