2

I would like to cross-compile OMXPlayer, ultimately so that I can implement playlist support for personal use. Don't bother telling me that that is an unrealistic goal. Perhaps I can help out with the project in other ways.

I'm having difficulty establishing a proper build environment. Running Ubuntu Lucid host, targeting a raspbian based distro.

Links to how someone has done this, recently, would be helpful. Could exchange email addresses and PM for a while, with the goal of me writing a guide. I don't know how to contact popcornmix....

3
  • Why would you need to cross compile omxplayer? Could you not implement this in a shell script?
    – puk
    Oct 18, 2015 at 23:47
  • Using a shell script, separate files are played with different processes of OMXPlayer. This means that I cannot use keybindings within OMXPlayer to navigate through a playlist. Using a shell script, I can quit the current OMXPlayer process and it will continue on to the next file in the playlist, but I would never be able to go backward without some complicated workarounds. OMXPlayer will accept Ctrl-C and terminate, but I have to hit it multiple times with questionable reliability in order to quit out of OMXPlayer AND the shell script. Dec 27, 2015 at 22:27
  • I imagine that most people would prefer to cross-compile if they knew how, rather than try and compile something on the pi. Dec 27, 2015 at 22:29

1 Answer 1

1

This should be done on a Debian / Ubuntu environment. Personally I set up a VM running Debian.

Now if you choose debian, run:

sudo apt-get install debootstrap qemu-user-static

If ubuntu, run:

sudo apt-get install debootstrap qemu-debootstrap

Now, run:

git clone https://github.com/skgsergio/rpi-buildenv.git
cd rpi-buildenv
./install.sh
./prepare_omxplayer.sh
./build.sh

However at some point after compiling ffmpeg (during omxplayer compilation, which is quite short) the script will fail. Then run:

cd /root/omxplayer-build/omxplayer-src/
./prepare-native-raspbian.sh
# prepare-native told me to run the following command, you may not have to
sudo apt-get update && sudo apt-get install libva1 libidn11-dev libssl1.0-dev
make
make dist

This will finally create ./omxplayer-src/omxplayer.bin

Please note that my raspberry pi 1 running jessie also needed "libswscale.so" to run omxplayer.bin, which I then copied from "/rpi-buildenv/rootfs/root/omxplayer-build/omxplayer-src/ffmpeg_compiled/usr/local/lib/libswscale.so" to "/lib/libswscale.so" on my raspberry. Then I run sudo ldconfig to updated the libraries.

I really want to thank skgsergio for his script. It would have been way harder without him!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.