This is an howto to compile VLC media player on macOS(formerly known as Mac OS X), focused on VLC 3.0 and later.
- 1Pre-requisites
- 1.1Apple Software
- 3Build VLC with a single command
- 4Build steps
- 4.2Prepare 3rd party libraries
- 5Troubleshooting
- There is no version for Mac OS 9. VLC is originally a UNIX application and has never been ported to Mac OS 9. Considering the amount of differences between Mac OS 9 and modern systems, it would require a tremendous effort to port VLC.
- VideoLAN, a project and a non-profit organization. VLC for Mac OS X VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.
Mac Intel Developer Preview machine Also a nightly build machine for Mac OS X Intel. Streams.videolan.org; hudson.videolan.org; Mac Pro (Intel) build bot machine for Mac OS X Intel. Named after Christmas Jones Veda. Veda.student.utwente.nl; PowerMac - 1.8Ghz Dual, 750MB RAM Primary Mac OS X PowerPC development. 1 On Mac OS 9; 2 Why VLC 0.8.1 doesn't work with Mac OS X 10.1.5? 3 Which is the last release for 10.2.8? 4 Why doesn't VLC 0.8.6a work on 10.3, although you state it does? 5 Do current releases of VLC work on Mac OS 10.5 / Leopard? 6 VLC just bounces in the Dock and quits or just shows a 'VLC' menu and nothing else.
Apple Software
Those are the minimum build system requirements to compile VLC 4.0 (current development version). They are also highly recommended to compile VLC 3.0:
- At least macOS 10.13.4, or any later version
- At least Xcode 9.3 from developer.apple.com/xcode. (Note: Installing the developer tools package is not needed, and building with that package is not supported)
- Use at least macOS SDK 10.13 (this is included and the default in Xcode 9.3)
- Install python3 (macOS pkg installer from python.org)
- Java 8 JDK (needed to compile Java menu support for blurays)
Compiler test
Ensure the compiler is found correctly by running
in the Terminal, if this outputs anything else than clang: error: no input files
, see the troubleshooting part of this document.
Developer directory test
The Xcode developer directory must be used, not the command line tools developer directory, as only Xcode includes all necessary tools.
Run the following command in Terminal:
It needs to print out the path to your Xcode installation, like this
If it prints out a path to the command line tools package, select the correct path using the xcode-select tool. See here for the correct command.
This is the most simple way to build VLC, including all its necessary dependencies. This way is highly recommended to use, as it sets up everything automatically.
Setup a build folder:
And run the build:
The command line switch -c rebuilds all dependencies (contribs) from source. If you want to use a prebuild contrib package, omit the -c option.
Wait and you have finished.
You can see more options for this script (change arch or sdk):
In case this fails, please try the step-by-step build guide below using aclean checkout.
Making changes and compile again
Using build.sh is the recommended way to do a fresh VLC build. Now, if you did some changes to the VLC source code, you can try to compile the change by calling build.sh again. But sometimes this is a bit cubersome, as it might take longer, and sometimes its preferred to execute some build commands directly.
For that reason, a script called env.build.sh is included in VLC (starting with VLC 4.0 in vlc.git), which helps you setting the correct environment of your Terminal. The correct environment is needed, to make sure the right internal tools are used for the build process.
Before you compile again with make, just source this script into the current Terminal (pay attention to the dot at the front of the command):
You can also create a symlink to that script in a more convenient location, for instance into the main vlc checkout directory:
Afterwards, in the same terminal, you can recompile by using the usual commands like make:
Now, if you prefer, you can read the following detailed information on how the build internally works. This section describes all steps which are internally done in build.sh already. Likely, they are only relevant to you if you do not want to use build.sh and env.build.sh.
Additional development tools
You need a number of tools, notably all the autotools, to build VLC correctly.VLC has a way to build the specific versions of these tools required from source, here is how:
Important: Add the extras/tools build results to your PATH, before doing anything else:
Prepare 3rd party libraries
To compile VLC, you need lots of other libraries, called 3rd party. VLC has the so-called “contribs” system to help building these librariesfrom source. Alternatively you can use a pre-built package of these libraries provided by VideoLAN.
First, set the correct SDK version for the 3rd party libraries, usually your current OS X Version:
Then, prepare the 3rd party library folder:
Prebuilt libraries (recommended)
If you want to download a prebuilt package of all the needed libraries.
Now you can just skip to the Update PATH section.
Build your own libraries (not for the faint-hearted)
You need to install the Java JDK, to support java code for libbluray.
Videolan For Mac Os 10.13
If you want to build contribs from source, you first need to make gettext, which is needed for some other contrib libraries to build:
Now you need to update your path for the gettext tools to be usable later on, see the Update PATH section above.
Then fetch contrib sources:
and build them with:
If you had no errors, the 3rd party libraries (contrib) are built correctly and you can proceed to the next step.
Update PATH
First we go back to the source directory:
And now we still need to add the contribs to our path, so they can be found:
Bootstrap VLC
This will create the configure script:
Check that there are no obvious errors at this stage, like missing gettext or an error at exit.
Configure the VLC build
Create a build folder:
To list the different options of configure:
To build a binary with the previously installed x86_64-apple-darwin15 contrib:
By default it will not use the installed SDK, like Xcode does, but use System Root. This means that if you built contribs on your own, the configure script might behave unexpectedly, for example enabling functions which are not present in a given operating system version. To work around this and build against the latest installed SDK, you can use:
If you want to use a different SDK, you can list all installed SDKs with xcodebuild -showsdks
and to get the path for it, you can use the following command xcodebuild -version <SDK Flag from before> Path
.
For example: xcodebuild -version -sdk macosx10.11 Path
Build VLC
Just do:
and wait...
Run VLC
After make
, you can just run VLC like so:
If you want a VLC app bundle, just do
And use it like a normal .app bundle.
Package VLC Application for Mac
If you want a disk-image:
Note: If you want a more fancy disk image, you need the dmgbuild tool, which can be installed using pip install dmgbuild
if you havepython installed using Homebrew.
Sign VLC Application for Mac
If you want to sign your application with a certificate, for example for Gatekeeper, you need to run:
3rd party packagers and PATH
Pay careful attention to remove any reference to 3rd party package managers from your environment. This is important to avoid conflicts between your package manager (homebrew, fink, macports...) and the contrib package manager we use to build our contrib.
It shouldn't be necessary, but it can happen.
git must still be accessible though!
Xcode 'No developer directory' error
When running xcrun clang
, if you see
then use xcode-select to select the developer directory within the Xcode package, to point to your xcode developer directory.
something like:
Xcode tooling tries to use SDK in CommandLineTools directory
Occasionally it has been reported that Xcode tooling tries to compile with an SDK located under the .../Developer/CommandLineTools directory, even if Xcode.app is properly installed and a suitable SDK is available inside the app.
This problem might become visible with a similar error like this:
The root cause of this issue is now known yet and likely lies inside the apple provided tooling. One known workaround is to delete or move away the CommandLineTools directory.
Devices and Mac OS X version
VLC media player requires Mac OS X 10.7.5 or later. It runs on any Mac with a 64-bit Intel processor or an Apple Silicon chip. Previous devices are supported by older releases.
Note that the first generation of Intel-based Macs equipped with Core Solo or Core Duo processors is no longer supported. Please use version 2.0.10 linked below.
If you need help in finding the correct package matching your Mac's processor architecture, please see this official support document by Apple.
Web browser plugin for Mac OS X
Support for NPAPI plugins was removed from all modern web browsers, so VLC's plugin is no longer maintained. The last version is 3.0.4 and can be found here. It will not receive any further updates.
Older versions of Mac OS X and VLC media player
We provide older releases for users who wish to deploy our software on legacy releases of Mac OS X. You can find recommendations for the respective operating system version below. Note that support ended for all releases listed below and hence they won't receive any further updates.
Mac OS X 10.6 Snow Leopard
Use VLC 2.2.8. Get it here.
Mac OS X 10.5 Leopard
Use VLC 2.0.10. Get it for PowerPC or 32bit Intel.
Mac OS X 10.4 Tiger
Mac OS X 10.4.7 or later is required
Use VLC 0.9.10. Get it for PowerPC or Intel.
Mac OS X 10.3 Panther
QuickTime 6.5.2 or later is required
Use VLC 0.8.6i. Get it for PowerPC.
Vlc For Mac Os X 10.5.8
Mac OS X 10.2 Jaguar
Use VLC 0.8.4a. Get it for PowerPC.
Vlc For Mac Os 10.6
Mac OS X 10.0 Cheetah and 10.1 Puma
Videolan For Mac Os 10.10
Use VLC 0.7.0. Get it for PowerPC.