Building the latest ffmpeg?

Hi all
I’d like to build an x86 image with the latest ffmpeg, is this possible with haiku’s build system?
If so, i guess i’ll have build it from source, can anyone tell me how i can do that?


You need to install haikuporter. Then to build ffmpeg you simply run:

hp ffmpeg_x86

To expand on that, haikuporter is available from HaikuDepot. The latest ffmpeg version with a recipe at haikuports is v2.7.2. You build it with “haikuporter -S -j8 --get-dependencies --no-source-packages ffmpeg_x86-2.7.2”.


It’s also important to know that if you install the latest ffmpeg in /system/packages, it will break the media kit and webpositive, because the new ffmpeg is not ABI compatible with the old one. Installing your new ffmpeg in ~/config/packages will work, but it will not be used by the media kit nor WebPositive.

The update to the new ffmpeg on the system side must be done by updating the package reposiories and rebuilding Haiku and WebKit (and other packages using ffmpeg). Since this is a lot of work, I prefer to wait until it can be done automatically with the Haiku Kitchen.

For gcc2, you can only build versions 0.10.x and 0.11.x. Building the later versions is possible but will require some patching, and most likely disabling assembler code and compiling only the plain C version of ffmpeg (which works safely). Since the 0.10.x branch of ffmpeg is still getting updates from upstream, we have seen little need for updating.

Oh sorry guys, i think i didn’t make myself very clear,i meant building a custom haiku image with the latest ffmpeg in order to use it with the Mediakit, but obviously it involves rebuilding webkit & web+ and possibly other pkgs, and i don’t mind but is it possible to build all the needed pkgs from source when building a haiku image? if so, what should i do?

In theory, yes. The haiku build system has a “bootstrap” mode where it will build things from source uysing haikuporter instead of downloading the pre-built packages.

However, this will most likely not work on the first try. We used the process only once in the life of Haiku, to create the initial version of the package repositories. It needs to be done from Linux (any other system is not supported currently) and even there we found some problems becquse some packages are difficult to cross compile. For example we found out that Python needs to be configured in different ways when building in Debian or OpenSUSE.

This means the bootstrapping process will need some experiments and fixes before it runs fine.

The other solution is to upload the packages to a temporary repository for experimentation. There is even a jam target for that (build-remote-test-repository), but it uploads the files to Haiku's server, and thus is available only to people with commit access.

One last thing you can try is putting your packages in the "generated/downloads" directory in the Haiku build and update the build/jam/repositories files. I'm not sure how well this can work.

Thanks pulkomandy for taking the time to explain
The last option seems doable, but it means i will have to build webkit & web+ against ffmpeg-2.7.2 prior to building the haiku image,right?