I am trying to cross compile FFmpeg for a Raspberry Pi 0/1 running Raspbian Strech.

I am following this guide on the official site but I have come to a standstill.

Although I am trying to compile FFmpeg at this point I am more interested to understand the cross-compilation procedure for the future, since my RPi Zero finished compiling its own sources hours ago.

I have uploaded a script file on GitHub of what I have been running to keep track and so that, if I ever get this working, other people will be able to just download and run the script. Ideally, it would include an interactive interface to include all and only the libraries required.

I originally started this compiling for RoadApplePi hence why the specific libraries required. This is what I would like to be able to run in the end:

echo Compiling FFmpeg RoadApplePi
cd /home/david/sources
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-cross-compile --cross-prefix=${CCPREFIX} --arch=armel --target-os=linux --prefix=/home/david/arm-bin --enable-gpl --enable-nonfree --enable-mmal --enable-omx --enable-omx-rpi --extra-cflags="-I/home/david/arm-bin/include" --extra-ldflags="-L/home/david/arm-bin/lib" --extra-libs=-ldl
make install

As it can be read on the Readme there are the two things I have not been able to solve:

  • PKG_CONFIG_PATH: where should it be pointing? The guide does not specify.
  • mmal, omx, omx-rpi are not found: where to find sources? how to compile them? where to put the compiled file? I have found ./libavcodec/mmaldec.c and ./libavcodec/omx.c. Are those the one I should be compiling?

Any help would be much appreciated, and as I said, I would like this to be a more general RaspberryPi cross compiling learning experience, so more general answers are welcome.

  • On the guide you followed they are talking about an old Raspberry Pi. Its image was added 6 years ago and the guide was last modified 3 years ago. You should better look for an up to date guide. – Ingo Mar 3 '19 at 12:12
  • I couldn't find a more up to date guide.The Pi Zero uses the same SoC as the Pi 1 so the issue is still current for anybody using the Pi Zero with a camera. – David Mar 4 '19 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.