Compilation de OMXPlayer

Compilation de OMXPlayer.

1) Répertoire de travail :

pi@framboisepi ~ $ mkdir OMXPLAYER
pi@framboisepi ~ $ cd OMXPLAYER/

2) Télécharger le code source :

pi@framboisepi ~/OMXPLAYER $ git clone https://github.com/popcornmix/omxplayer.git
Cloning into 'omxplayer'...
remote: Counting objects: 1410, done.
remote: Compressing objects: 100% (475/475), done.
remote: Total 1410 (delta 932), reused 1410 (delta 932)
Receiving objects: 100% (1410/1410), 1.71 MiB | 540 KiB/s, done.
Resolving deltas: 100% (932/932), done.
pi@framboisepi ~/OMXPLAYER $

3) Préparation de la compilation :

pi@framboisepi ~/OMXPLAYER $ cd omxplayer/
pi@framboisepi ~/OMXPLAYER/omxplayer $ ./prepare-native-raspbian.sh
Patching makefiles...
Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
Installing packages...
Réception de : 1 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B]
...
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 8643317f122bf5eb786218a23784ceae7ea312eb
 *** A reboot is needed to activate the new firmware
In order to compile ffmpeg you need to set memory_split to 16 for 256MB RAM PIs (0 does not work) or to at most 256 for 512MB RAM PIs, respectively. Otherwise there is not enough RAM to compile ffmpeg. Please do the apropriate in the raspi-config and select finish to reboot your RPi. Warning: to run compiled omxplayer please start raspi-config again and set memory_split to at least 128. [Press RETURN to continue]

4) Splitter la mémoire « memory_split » à 256Mo.
5) Compiler ffmpeg :

pi@framboisepi ~/OMXPLAYER/omxplayer $ make ffmpeg
make -f Makefile.ffmpeg
make[1]: entrant dans le répertoire « /home/pi/OMXPLAYER/omxplayer »
git clone git://source.ffmpeg.org/ffmpeg ffmpeg -b n2.2 --depth=1
Cloning into 'ffmpeg'...
...
INSTALL	libavutil/avconfig.h
INSTALL	libavutil/ffversion.h
INSTALL	libavutil/libavutil.pc
make[2]: quittant le répertoire « /home/pi/OMXPLAYER/omxplayer/ffmpeg »
strip ffmpeg_compiled/usr/local/lib/*.so
make[1]: quittant le répertoire « /home/pi/OMXPLAYER/omxplayer »

6) Compilation de omxplayer :
– Configuration du Makefile :
Ouvrir :

Makefile.include

Chercher :

INCLUDES        += -I/opt/vc/include/interface/vcos/pthreads                    -I/opt/vc/include                       -I/opt/vc/include/interface/vmcs_host                   -I/opt/vc/include/interface/vmcs_host/linux                     -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include                         -I/usr/include                  -I/usr/include/freetype2

Ajouter à la fin :

-I /usr/include/dbus-1.0

– Compilation :

pi@framboisepi ~/OMXPLAYER/omxplayer $ make
bash gen_version.sh > version.h
...
/usr//bin/strip omxplayer.bin

– Création de la distribution :

pi@framboisepi ~/OMXPLAYER/omxplayer $ sudo make dist
bash gen_version.sh > version.h
...
cp COPYING omxplayer-dist/usr/share/doc/
cp README.md omxplayer-dist/usr/share/doc/README
cp -a ffmpeg_compiled/usr/local/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
cd omxplayer-dist; tar -czf ../omxplayer-dist.tgz *

– Installation :

pi@framboisepi ~/OMXPLAYER/omxplayer $ sudo make install
bash gen_version.sh > version.h
cp README.md omxplayer-dist/usr/share/doc/README
cp -a ffmpeg_compiled/usr/local/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
cd omxplayer-dist; tar -czf ../omxplayer-dist.tgz *
cp omxplayer-dist/* / -r
pi@framboisepi ~/OMXPLAYER/omxplayer $ sudo /sbin/ldconfig

– Installation sur le système :

pi@framboisepi ~/OMXPLAYER/omxplayer $ sudo cp omxplayer-dist.tgz /
pi@framboisepi ~/OMXPLAYER/omxplayer $ sudo tar xvfz /omxplayer-dist.tgz
usr/
usr/bin/
usr/bin/omxplayer.bin
usr/bin/omxplayer
...
usr/share/
usr/share/doc/
usr/share/doc/README
usr/share/doc/COPYING

– Vérification :

pi@framboisepi ~/OMXPLAYER/omxplayer $ ls -l /usr/bin/omxplayer*
-rwxr-xr-x 1 pi pi   3076 mai    1 11:33 /usr/bin/omxplayer
-rwxr-xr-x 1 pi pi 344860 mai    1 11:33 /usr/bin/omxplayer.bin

7) Test :

pi@framboisepi ~/OMXPLAYER/omxplayer $ cd
pi@framboisepi ~ $ wget http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/tears_of_steel_1080p.mov
pi@framboisepi ~ $ omxplayer tears_of_steel_1080p.mov

8) Lien :
https://github.com/popcornmix/omxplayer/

Leave a Reply

You must be logged in to post a comment.