Building Blender Without ffmpeg on Windows

I’ve only recently tried and successfully built Blender on Windows by following the instructions on the wiki.

I would like to know if removing ffmpeg is something trivial or if it’s a complex process that will probably break Blender (it won’t matter to me if this only breaks the video sequencer)

If it’s a simple process, I would like to know if someone can help me by pointing out the files that I need to edit before starting the build process.

It’s just a matter of changing the WITH_CODEC_FFMPEG build option.
https://wiki.blender.org/wiki/Building_Blender/Options#Editing_CMake_Options

from the console, in your build folder (ie build_windows_Full_x64_vc16_Release) run

rd /s bin    
cmake -DWITH_CODEC_FFMPEG=off .
rebuild

and you’d be good to go (be sure to include the . in that cmake command, it is important)

So I need to make a “normal” build with ffmpeg before building a version with no ffmpeg?

*I forgot to mention that I deleted all files related to my first test build, and am starting the build process again from scratch

allright then i’d run make full nobuild in the blender source folder, to generate the project files, then go into your build folder and run the commands i gave previously to actually build it.

Out of curiosity why are you trying to get rid of it? It shaves off about 30 megs off the blender distribution size, but that’s about it.

I want to learn how to customize Blender and I just thought this up as a small initial exercise to get my feet wet (I have never compiled anything from code before). I chose ffmpeg specifically because it’s a component (I think) is related to a part of Blender that I never use (video stuff).

Unfortunately I seem to be doing something wrong. After I enter the rebuild command, errors and warnings come up (some errors repeat a couple of times):

Error	C2039	'applyRGB': is not a member of 'OpenColorIO_v2_0::Processor'	cycles_render	C:\blender-git\blender\intern\cycles\render\shader.cpp	397	

Error	C2664	'void OpenColorIO_v2_0::Config::getDefaultLumaCoefs(double *) const': cannot convert argument 1 from 'float *' to 'double *'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	409	

Error	C2440	'initializing': cannot convert from 'void *' to 'float *'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	670	

Error	C2065	'DisplayTransformRcPtr': undeclared identifier	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	747	

Error	C2061	syntax error: identifier 'DisplayTransformRcPtr'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	747	

Error	C2653	'DisplayTransform': is not a class or namespace name	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	749	

Error	C3861	'Create': identifier not found	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	749

Error	C2059	syntax error: ')'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	757	


Error	C2143	syntax error: missing ';' before '{'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	795

Error	C2661	'OpenColorIO_v2_0::PackedImageDesc::PackedImageDesc': no overloaded function takes 7 arguments	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	808

Error	C2664	'void OpenColorIO_v2_0::ExponentTransform::setValue(const double (&)[4]) noexcept': cannot convert argument 1 from 'const float *' to 'const double (&)[4]'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	881

Error	C2039	'setValue': is not a member of 'OpenColorIO_v2_0::MatrixTransform'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	902	

Error	C2664	'void OpenColorIO_v2_0::MatrixTransform::Scale(double *,double *,const double *)': cannot convert argument 1 from 'float *' to 'double *'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl.cc	912

Error	C2259	'OpenColorIO_v2_0::GpuShaderDesc': cannot instantiate abstract class	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl_glsl.cc	614

Error	C2248	'OpenColorIO_v2_0::GpuShaderDesc::GpuShaderDesc': cannot access protected member declared in class 'OpenColorIO_v2_0::GpuShaderDesc'	bf_intern_opencolorio	C:\blender-git\blender\intern\opencolorio\ocio_impl_glsl.cc	614

Error	C1083	Cannot open include file: 'pugixml.hpp': No such file or directory (compiling source file C:\blender-git\blender\intern\cycles\graph\node_xml.cpp)	cycles_graph	C:\blender-git\blender\intern\cycles\util\util_xml.h	22	

Error	LNK1104	cannot open file '..\..\lib\Debug\bf_usd.lib'	blender	C:\blender-git\build_windows_Full_x64_vc16_Release\source\creator\LINK	1	

Error	MSB3073	The command "setlocal

Warning	C4062	enumerator 'ID_RECALC_TAG_FOR_UNDO' in switch of enum 'IDRecalcFlag' is not handled	bf_depsgraph	C:\blender-git\blender\source\blender\depsgraph\intern\depsgraph_tag.cc	242

Warning	C4062	enumerator 'ID_RECALC_TAG_FOR_UNDO' in switch of enum 'IDRecalcFlag' is not handled	bf_depsgraph	C:\blender-git\blender\source\blender\depsgraph\intern\depsgraph_tag.cc	742

Warning	MSB8065	Custom build for item "C:\blender-git\build_windows_Full_x64_vc16_Release\CMakeFiles\8b5d56c26bfa623b227a9b4f97891ab5\buildinfo.h_fake.rule" succeeded, but specified output "c:\blender-git\build_windows_full_x64_vc16_release\source\creator\buildinfo.h_fake" has not been created. This may cause incremental build to work incorrectly.	buildinfo	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	240

Here are all the steps I took:

1-
Installed Visual Studio Community 2019 with Desktop Development with C++ Workload // Slik Subversion // Git // cmake

2-
cd C:\blender-git
git clone git://git.blender.org/blender.git -b blender-v2.83-release

3-
cd C:\blender-git\blender
make update

4-
cd C:\blender-git\blender
make full nobuild

5-
cd C:\blender-git\build_windows_Full_x64_vc16_Release
rd /s bin (A yes/no prompt comes up, I say yes)
cmake -DWITH_CODEC_FFMPEG=off .
rebuild

Have tried:

-“make update” again to check all libraries are ok
-“git status” to check if my copy of the source is ok

I’m running windows 10 20H1

2.83 will not work with the master libs you either need to grab the 2.83 tag of the libs or build master. you cannot mix and match

Ohh, so the “make update” part where I download the required libraries I have to specify 2.83 libraries?

How can I do that?

note sure if make update will automatically do that, you can always grab them manually by moving the master ones out of the way and running

svn co https://svn.blender.org/svnroot/bf-blender/tags/blender-2.83-release/lib/win64_vc15/

Thank you very much LazyDodo! Finally got a working executable!

Could I bother you with one more question?

-I noticed that there are two library versions for Blender 2.83 on the link you provided:
2.83 and 2.83.1

https://svn.blender.org/svnroot/bf-blender/tags/blender-2.83.1-release/lib/win64_vc15/

Is there a way to upgrade to 2.83.1 library files without having to download everything again? Or are they just so different that any upgrade would be pointless?

That’s just a tag (although i’m unsure why it was made) both point to the same revision, so switching would get you an identical set of libs