Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to compile ffmpeg in visual studio 2010?

Is it possible to compile the sourcecode from ffmpeg in visual studio 2010? Is it difficult?

Just looking for some advice (and instructions) if possible. :-)

Cheers,

Pete

like image 204
Exitos Avatar asked Nov 23 '10 17:11

Exitos


People also ask

What is FFmpeg build?

FFmpeg is a free and open-source software project consisting of a suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the command-line ffmpeg tool itself, designed for processing of video and audio files.

How do I configure FFmpeg?

Type ./configure to create the configuration. A list of configure options is printed by running configure --help . configure can be launched from a directory different from the FFmpeg sources to build the objects out of tree. To do this, use an absolute path when launching configure , e.g. /ffmpegdir/ffmpeg/configure .


2 Answers

Apparently someone at Google has written a C99 to C89 "downconverter" in part to get ffmpeg to compile with Visual Studio:

http://blogs.gnome.org/rbultje/2012/09/27/microsoft-visual-studio-support-in-ffmpeg-and-libav/

The tool they wrote is currently only in source code form. Although that tool is written in C, it uses some compiler specific includes, specific to the Clang compiler, so you currently need clang to compile it. I had to get all the pieces to Clang (which relies on llvm) and compile with VS2010. OK, got that figured out, so now I have the two tools compiled: c99wrap.exe and c99conv.exe.

The blog does not mention two important things that are mentioned here:

http://libav.org/platform.html#Microsoft-Visual-C_002b_002b

First, you have to ensure the link.exe you use is the Visual C linker and not the mingw linker. Also, the msvc toolchain under msys does not yet support shared DLL builds, it only supports static lib builds at this time, so --enabled-shared fails to link.

like image 71
John Orr Avatar answered Nov 11 '22 18:11

John Orr


It is not possible because ffmpeg makes extensive use of C99 features (with good reason), and MSVC doesn't support nearly enough nook and crannies of the standard.

You can however, use the C library built by MinGW for use with Visual Studio projects. See the following links for all the information you need:

  1. Information about building/using the library on Windows with Visual Studio: http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page
  2. Downloads: http://ffmpeg.arrozcru.org/autobuilds/
like image 40
rubenvb Avatar answered Nov 11 '22 19:11

rubenvb