Compiler GStreamer depuis les sources sous GNU/Linux

Edit: j'ai ajouté un script SHELL "qui fait tout pour vous" en fin de billet...
Voici une petite procédure pour compiler la dernière version du framework multimédia GStreamer tout en préservant la version installée depuis les dépôts officiels. La procédure a été validé sur une GNU/Linux Ubuntu 9.04 mais doit facilement être adaptable à d'autres distribution (pour une procèdure équivalente sous Mac OS X, vous pouvez lire ce billet).
GStreamer étant un framework, il se base sur de nombreuses librairies externes. Pour nous simplifier la tache, nous allons utiliser les dépôts pour l'installation de ces librairies:
sudo aptitude build-dep gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse bison flex git
Ensuite on récupère les dernières versions disponibles de GStreamer et de ses plugins:
mkdir ~/src
cd ~/src
wget http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.25.tar.gz
wget http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.25.tar.gz
wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.17.tar.gz
wget http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.17.tar.gz
wget http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.13.tar.gz
wget http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-0.10.8.tar.gz
On commence par la compilation de GStreamer (core). L'installation se fera dans le répertoire /opt/gstreamer/gstreamer-0.10.24:
tar zxvf gstreamer-0.10.25.tar.gz
cd gstreamer-0.10.25
./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
... puis les plugins "base":
tar zxvf gst-plugins-base-0.10.25.tar.gz
cd gst-plugins-base-0.10.25
PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-0.10.25/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
... puis les plugins "good":
tar zxvf gst-plugins-good-0.10.17.tar.gz
cd gst-plugins-good-0.10.17
PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-0.10.25/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
... puis les plugins "bad":
tar zxvf gst-plugins-bad-0.10.17.tar.gz
cd gst-plugins-bad-0.10.17
PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-0.10.25/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
... les plugins "ugly":
tar zxvf gst-plugins-ugly-0.10.13.tar.gz
cd gst-plugins-ugly-0.10.13
PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-0.10.25/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
... et enfin les plugins FFMPEG (streaming):
tar zxvf gst-ffmpeg-0.10.8.tar.gz
cd gst-ffmpeg-0.10.8
PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-0.10.25/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-0.10.25
make
sudo make install
cd ..
Puis on créé un lien symbolique entre le répertoire /opt/gstreamer/current et /opt/gstreamer/gstreamer-0.10.25. Ce lien nous permet d'avoir plusieur version de GStreamer sur notre système.
sudo cp /opt/gstreamer/gstreamer-0.10.25/lib/gstreamer-0.10.25/* /opt/gstreamer/gstreamer-0.10.25/lib/
sudo ln -s /opt/gstreamer/gstreamer-0.10.25/lib /opt/gstreamer/current
On teste enfin l'installation:
/opt/gstreamer/gstreamer-0.10.25/bin/gst-inspect --gst-plugin-path=/opt/gstreamer/current
Pour les plus faineant, voici un script sheel automatisant ces quelques taches
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | #!/bin/sh # A simple script to get/compile/install GStreamer # Nicolas Hennion - GPL # # Remarks: the version will be installed in the /opt/gstreamer folder # Change this to the latest version GST_CORE=0.10.25 GST_BASE=0.10.25 GST_GOOD=0.10.17 GST_BAD=0.10.17 GST_UGLY=0.10.13 GST_FFMPEG=0.10.8 # Do not edit under this line sudo aptitude build-dep gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse sudo aptitude install bison flex git if [ ! -e gstreamer-$GST_CORE.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$GST_CORE.tar.gz fi if [ ! -e gst-plugins-base-$GST_BASE.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$GST_BASE.tar.gz fi if [ ! -e gst-plugins-good-$GST_GOOD.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$GST_GOOD.tar.gz fi if [ ! -e gst-plugins-bad-$GST_BAD.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$GST_BAD.tar.gz fi if [ ! -e gst-plugins-ugly-$GST_UGLY.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$GST_UGLY.tar.gz fi if [ ! -e gst-ffmpeg-$GST_FFMPEG.tar.gz ] then wget http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-$GST_FFMPEG.tar.gz fi sudo mkdir /opt/gstreamer if [ ! -e gstreamer-$GST_CORE ] then tar zxvf gstreamer-$GST_CORE.tar.gz cd gstreamer-$GST_CORE ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi if [ ! -e gst-plugins-base-$GST_BASE ] then tar zxvf gst-plugins-base-$GST_BASE.tar.gz cd gst-plugins-base-$GST_BASE PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-$GST_CORE/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi if [ ! -e gst-plugins-good-$GST_GOOD ] then tar zxvf gst-plugins-good-$GST_GOOD.tar.gz cd gst-plugins-good-$GST_GOOD PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-$GST_CORE/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi if [ ! -e gst-plugins-bad-$GST_BAD ] then tar zxvf gst-plugins-bad-$GST_BAD.tar.gz cd gst-plugins-bad-$GST_BAD PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-$GST_CORE/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi if [ ! -e gst-plugins-ugly-$GST_UGLY ] then tar zxvf gst-plugins-ugly-$GST_UGLY.tar.gz cd gst-plugins-ugly-$GST_UGLY PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-$GST_CORE/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi if [ ! -e gst-ffmpeg-$GST_FFMPEG ] then tar zxvf gst-ffmpeg-$GST_FFMPEG.tar.gz cd gst-ffmpeg-$GST_FFMPEG PKG_CONFIG_PATH=/opt/gstreamer/gstreamer-$GST_CORE/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ./configure --prefix=/opt/gstreamer/gstreamer-$GST_CORE make sudo make install cd .. fi sudo cp /opt/gstreamer/gstreamer-$GST_CORE/lib/gstreamer-$GST_CORE/* /opt/gstreamer/gstreamer-$GST_CORE/lib/ sudo ln -s /opt/gstreamer/gstreamer-$GST_CORE/lib /opt/gstreamer/current /opt/gstreamer/gstreamer-$GST_CORE/bin/gst-inspect --gst-plugin-path=/opt/gstreamer/current |
- http://haltux.homelinux.org/ Thom1
- http://haltux.homelinux.org/ Thom1
- cenwen
- http://blog.nicolargo.com NicoLargo
- cenwen
- Sparda
- http://www.voyance-consultation.fr/consultation.htm Voyant Alex










Twitter:
Rss: