Then click Installation Apply Changes; FFmpeg source code Visual Studio 2013 Free Community Edition.
ffmpeg is an AMAZING framework for multimedia decoding, transcoding, streaming and even playing-back (ffplay is a full-blown video player, written in less than 1000 LOC of plain C)
While there are pre-built binaries for Windows, building ffmpeg or customizing its source on Windows, seems as a very gentle art... so if you like to introduce new URL protocol for yours super-duper streaming web-service, or integrating yours benchmark breaker HEVC decoder ,on Windows your're in trouble.
Don't get me wrong, building SW, while could be highly intricate, isn't a rocket science, the crux of the challenge is simply a lot of knowledge islands (StackOverflow questions, blogs, forums what have you), each one of 'em covers a little aspect of the build process...
- Look at this, for a typical user complain
Just as an FYI, to the best I can tell, you can not compile ffserver or ffplay using the microsoft compiler toolchain. MSVC does not support fork, which is a hard requirement for those two applications
- No concise answer for a simple question: is-it-possible-to-build-ffmpeg-x64-on-windows
- Simply Google ffmpeg build on windows, and you shall see more of the above
The purpose of this article is to provide one stop-shop for making ffmpeg fully-functional build on Windows easy.
There are two main methods for building ffmpeg on Windows:
- Building ffmpeg natively
- Cross compiling ffmpeg, on GNU 'friendly' platform, in this article I shall focus on Ubuntu 16.04
Building ffmpeg natively
- Install the latest version of MSYS2 MinGW-w64 from http://msys2.github.io/ (MSYS is a collection of traditional GNU tools, which will power you with a Linux feel on your Windows box)
- Open MSYS2 shell/console, and install the following basic tools (pacman is MSYS2 package management tool a-la apt/brew the likes, mingw-W64 covers you w/ GNU toolchain wrapping win32, and finally, SDL2 is a lean & mean cross-platform library for media (audio, video ...) accessing
3. From MSYS2 shell, its time to configure the build (this is based on your requirements) a basic configure invocation, would be ./configure --disable-static --enable-shared --disable-doc --arch=x86_64 --target-os=mingw64 (configuring on MSYS2 is tremendously slow, so be patient)
4. The final step - the actual building, invoke make -j[num_of_physical_coress]
Cross compiling ffmpeg
Roger Pack did an outstanding work while enabling womb-to-tomb ffmpeg cross compilation (even along with bootstrapping the cross compiler itself !). My work is fully based on his craft, plus one tweak - why spending precious time for bootstrapping the cross compiler, if one can simply download it ? so.... I'm referring the interested reader to my fork of Roger's repo to follow the instructions there ( all you need to do is to fire up your Linux box (I've tested it on Ubuntu 16.04, YMMV), clone my fork, and you're good to go)
How to compile ffmpeg + x264 using Visual Studio 2015
gistfile1.txt
##### How to compile ffmpeg + x264 using Visual Studio 2015 ##### |
##### Building this way will make the DLLs compatible with SEH, so there will be no need to use /SAFESEH:NO when compiling your code ##### |
##### SOURCES: |
### https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html |
### https://gist.github.com/sailfish009/8d6761474f87c074703e187a2bc90bbc |
### http://roxlu.com/2016/057/compiling-x264-on-windows-with-msvc |
* Download 'MSYS2 x86_64' from 'http://msys2.github.io' and install into 'C:workspacewindowsmsys64' |
# pacman -S make gcc diffutils mingw-w64-{i686,x86_64}-pkg-config mingw-w64-i686-nasm mingw-w64-i686-yasm |
* Rename C:workspacewindowsmsys64usrbinlink.exe to C:workspacewindowsmsys64usrbinlink_orig.exe, in order to use MSVC link.exe |
32 BITS BEGIN |
* Run 'VS2015 x86 Native Tools Command Prompt' |
* Inside the command prompt, run: |
# C:workspacewindowsmsys64msys2_shell.cmd -mingw32 -use-full-path |
32 BITS END |
64 BITS BEGIN |
* Run 'VS2015 x64 Native Tools Command Prompt' |
* Inside the command prompt, run: |
# C:workspacewindowsmsys64msys2_shell.cmd -mingw64 -use-full-path |
64 BITS END |
### x264 ### |
# git clone http://git.videolan.org/git/x264.git |
# cd x264 |
# CC=cl ./configure --enable-static --prefix=/usr/local --disable-cli |
# make |
# make install |
### ffmpeg ### |
* Download sources from 'http://www.ffmpeg.org/download.html' |
# cd ffmpeg-3.3.2 |
# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig |
32 BITS BEGIN |
# ./configure --toolchain=msvc --arch=x86 --enable-yasm --enable-asm --enable-shared --disable-static --disable-programs --enable-avresample --enable-libx264 --enable-gpl --prefix=./install |
32 BITS END |
64 BITS BEGIN |
# ./configure --toolchain=msvc --arch=x86_64 --enable-yasm --enable-asm --enable-shared --disable-static --disable-programs --enable-avresample --enable-libx264 --enable-gpl --prefix=./install |
64 BITS END |
# make |
# make install |
commented Aug 30, 2019
very good!!! |
commented Sep 8, 2019 • edited
edited
Please more info on Download sources from 'http://www.ffmpeg.org/download.html' Here win10 -64
Thx |
![Ffmpeg Ffmpeg](/uploads/1/2/6/5/126523636/208458470.jpg)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment