It might be the case that, the next official release of GStreamer package will be available after a month or two, but you need the package based on the latest code repository.
If we are on the same page, let’s start to build the GStreamer framework for iOS (as well as for Mac OSX).
The procedure is same for other OS. That means, If you would like to build for Windows, you can use a Windows machine.
Of course, iOS and Mac OSX framework can not be built from Windows, in case you were wondering.
- Latest XCode with iOS 8 SDK
- XCode Command line tools
- CMake (Install CMake with Homebrew, this will install and create symlink)
GStreamer uses Cerbero as build – tool. You can get the latest code from here,
Download the git repository using your favorite git client or from command-line.
There are several architectures involved, namely,
You might want the build for any particular architecture according to your need. Or, you can go for universal build.
Please note that, in either case you will get the corresponding Mac OSX package.
It is very common that you have a multi-core processor system. If you would like to make the build process faster then you have an option to involve all cores to the build process.
I had asked the question in their forum and got the response from Andoni.
By default cerbero is using only one core to compile, using “make”. To support parallel builds (make -jX) and make use of all the cores in your system you can add the following line to your cerbero.cbc config: allow_parallel_build = True
To make it work, do as follows, Go to the code location using Finder (File Explorer).
cerbero/config/cross-ios-universal.cbc file using Text Edit. It should look like,
from cerbero.config import Platform, Architecture, Distro, DistroVersion target_platform=Platform.IOS target_arch=Architecture.UNIVERSAL target_distro=Distro.IOS universal_archs=[Architecture.ARMv7, Architecture.X86, Architecture.ARMv7S, Architecture.ARM64, Architecture.X86_64]
Add this line below,
allow_parallel_build = True Now the file will look like,
from cerbero.config import Platform, Architecture, Distro, DistroVersion target_platform=Platform.IOS target_arch=Architecture.UNIVERSAL target_distro=Distro.IOS universal_archs=[Architecture.ARMv7, Architecture.X86, Architecture.ARMv7S, Architecture.ARM64, Architecture.X86_64] allow_parallel_build = True
save the file.
Please note, If you are interested to build only for armv7 architecture (for example), then you should edit the corresponding file (for example,
This simple edits will allow the build process to make use of all the cores as well as all hyper-threads, which will enable the process to run much faster. The processing power is required most at compile step. This is the screenshot of the CPU history of my MBP in an arbitrary plugin compile step.
You can see, all the cores and hyper-threads are in use at their fullest capacity. My MBP specification is, 2.3 GHz Intel Core i7 with 8 GB 1600 MHz DDR3 RAM.
As a sidenote, I am using Yosemite (10.10.1) and I have experienced that it makes lesser halts and errors during the build process as opposed to Mavericks (10.9); Although I do not have any proper reasoning and it is quite possible that, this happens only in my case.
Fire up your terminal. Go to the code location. In my case,
Run the following command for universal build,
./cerbero-uninstalled -c config/cross-ios-universal.cbc bootstrap
If you are interested only for armv7s build then you should have run the following command instead,
./cerbero-uninstalled -c config/cross-ios-arm7s.cbc bootstrap
Now you will be asked for the password. After providing the password, it might take 2/3 hours to complete the process, depending on your internet and processor speed.
Basically, it will download 23 plugins. Each of these plugin will go through 6 common steps. Namely,
- Post install
You can see the downloaded plugins folder in the following location
Users ▸ USER_NAME ▸ cerbero ▸ sources ▸ local
Run the command for universal build,
./cerbero-uninstalled -c config/cross-ios-universal.cbc package gstreamer-1.0
Run the command instead for armv7s build,
./cerbero-uninstalled -c config/cross-ios-arm7s.cbc package gstreamer-1.0
It is even a longer process and might take up 8-9 hours for universal build and 2-3 hours for a single architecture build.
Basically, it will download 84 different plugins and each of these plugins will go through the same 6 steps with one more additional step.
Good news is, if for some reason the process halts, (might be an internet connection issue or any error) you will have an opportunity to run again from the failed step.
For example, If any OS error occurs, then you will see output like below,
OSError: [Errno 2] No such file or directory: '/Users/USER_NAME/cerbero/sources/local/lame-3.99.5/lame-3.99.5.tar.gz' Select an action to proceed:  Enter the shell  Rebuild the recipe from scratch  Rebuild starting from the failed step  Skip recipe  Abort
Similarly, If any step fails for some reason, you will see output like below,
Recipe 'gst-plugins-ugly-1.0' failed at the build step 'install' Select an action to proceed:  Enter the shell  Rebuild the recipe from scratch  Rebuild starting from the failed step  Skip recipe  Abort
In such cases, first try out enter 2, which is Rebuild starting from the failed step.
If doesn’t work then try out enter 1, which is Rebuild the recipe from scratch.
If doesn’t work, look for and try to figure out the specific error message from the bunch of error text above the 5 options text.
After completion, you will find two *.pkg file in the cerbero code location. Namely,
For any help you can refer to their forum: GStreamer developer forum
Good luck! 🙂