Advertisement
Guest User

gstreamer rpi build

a guest
Jun 11th, 2013
1,848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.84 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Script to build gstreamer on a raspberry pi
  4. # Slightly modified from http://www.trans-omni.co.uk/pi/GStreamer-1.0/build_gstreamer to
  5. # use 1.0 branch
  6.  
  7. # Create a log file of the build as well as displaying the build on the tty as it runs
  8. exec > >(tee build_gstreamer.log)
  9. exec 2>&1
  10.  
  11. ################# COMPILE GSTREAMER 1.0 ############
  12.  
  13.  
  14. # Update and Upgrade the Pi, otherwise the build may fail due to inconsistencies
  15.  
  16. sudo apt-get update && sudo apt-get upgrade -y
  17.  
  18. # Get the required libraries
  19. sudo apt-get install -y build-essential autotools-dev automake autoconf \
  20.                         libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev \
  21.                         pkg-config bison flex python git gtk-doc-tools libasound2-dev \
  22.                         libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev \
  23.                         libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes \
  24.                         libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev \
  25.                         libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev \
  26.                         libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev \
  27.                         libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev \
  28.                         libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev \
  29.                         libcurl4-gnutls-dev libdca-dev libdirac-dev libdvdnav-dev \
  30.                         libexempi-dev libexif-dev libfaad-dev libgme-dev libgsm1-dev \
  31.                         libiptcdata0-dev libkate-dev libmimic-dev libmms-dev \
  32.                         libmodplug-dev libmpcdec-dev libofa0-dev libopus-dev \
  33.                         librsvg2-dev librtmp-dev libschroedinger-dev libslv2-dev \
  34.                         libsndfile1-dev libsoundtouch-dev libspandsp-dev libx11-dev \
  35.                         libxvidcore-dev libzbar-dev libzvbi-dev liba52-0.7.4-dev \
  36.                         libcdio-dev libdvdread-dev libmad0-dev libmp3lame-dev \
  37.                         libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev \
  38.                         libsidplay1-dev libtwolame-dev libx264-dev
  39. Last login: Tue Jun 11 12:48:14 on ttys000
  40. Welcome to fish, the friendly interactive shell
  41. Type help for instructions on how to use fish
  42. mock@MockAir13 ~> ssh 10.240.0.16
  43. Linux raspberrypi 3.6.11+ #464 PREEMPT Thu Jun 6 18:17:55 BST 2013 armv6l
  44.  
  45. The programs included with the Debian GNU/Linux system are free software;
  46. the exact distribution terms for each program are described in the
  47. individual files in /usr/share/doc/*/copyright.
  48.  
  49. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
  50. permitted by applicable law.
  51. Last login: Mon Jun 10 10:14:44 2013 from 10.240.0.65
  52. mock@raspberrypi:~$ ls
  53. gstbuild2  out.mp4  packages  psips
  54. mock@raspberrypi:~$ cd gstbuild2/
  55. mock@raspberrypi:~/gstbuild2$ ls
  56. build_gstreamer.log  build.sh
  57. mock@raspberrypi:~/gstbuild2$ less build
  58. build: No such file or directory
  59. mock@raspberrypi:~/gstbuild2$ less build.sh
  60. mock@raspberrypi:~/gstbuild2$
  61. mock@raspberrypi:~/gstbuild2$ cat build.sh
  62. #!/bin/bash
  63.  
  64. # Create a log file of the build as well as displaying the build on the tty as it runs
  65. exec > >(tee build_gstreamer.log)
  66. exec 2>&1
  67.  
  68. ################# COMPILE GSTREAMER 1.0 ############
  69.  
  70.  
  71. # Update and Upgrade the Pi, otherwise the build may fail due to inconsistencies
  72.  
  73. sudo apt-get update && sudo apt-get upgrade -y
  74.  
  75. # Get the required libraries
  76. sudo apt-get install -y build-essential autotools-dev automake autoconf \
  77.                         libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev \
  78.                         pkg-config bison flex python git gtk-doc-tools libasound2-dev \
  79.                         libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev \
  80.                         libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes \
  81.                         libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev \
  82.                         libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev \
  83.                         libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev \
  84.                         libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev \
  85.                         libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev \
  86.                         libcurl4-gnutls-dev libdca-dev libdirac-dev libdvdnav-dev \
  87.                         libexempi-dev libexif-dev libfaad-dev libgme-dev libgsm1-dev \
  88.                         libiptcdata0-dev libkate-dev libmimic-dev libmms-dev \
  89.                         libmodplug-dev libmpcdec-dev libofa0-dev libopus-dev \
  90.                         librsvg2-dev librtmp-dev libschroedinger-dev libslv2-dev \
  91.                         libsndfile1-dev libsoundtouch-dev libspandsp-dev libx11-dev \
  92.                         libxvidcore-dev libzbar-dev libzvbi-dev liba52-0.7.4-dev \
  93.                         libcdio-dev libdvdread-dev libmad0-dev libmp3lame-dev \
  94.                         libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev \
  95.                         libsidplay1-dev libtwolame-dev libx264-dev
  96.  
  97. cd $HOME
  98. mkdir packages
  99. cd packages/
  100. mkdir gstreamer-1.0
  101. cd gstreamer-1.0
  102.  
  103.  
  104. git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
  105. cd gstreamer
  106. git checkout -t origin/1.0
  107. ./autogen.sh
  108. make
  109. sudo make install
  110. cd ..
  111.  
  112.  
  113. git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
  114. cd gst-plugins-base
  115. git checkout -t origin/1.0
  116. ./autogen.sh
  117. make
  118. sudo make install
  119. cd ..
  120.  
  121.  
  122. git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
  123. cd gst-plugins-good
  124. git checkout -t origin/1.0
  125. ./autogen.sh
  126. make
  127. sudo make install
  128. cd ..
  129.  
  130.  
  131. git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
  132. cd gst-plugins-ugly
  133. git checkout -t origin/1.0
  134. ./autogen.sh
  135. make
  136. sudo make install
  137. cd ..
  138.  
  139.  
  140. git clone git://anongit.freedesktop.org/git/gstreamer/gst-libav
  141. cd gst-libav
  142. git checkout -t origin/1.0
  143. ./autogen.sh
  144. make
  145. sudo make install
  146. cd ..
  147.  
  148.  
  149. git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
  150.  
  151. # Install libusb-1.0 to enable  uvch264src
  152. sudo apt-get install libusb-1.0
  153.  
  154. cd gst-plugins-bad
  155. git checkout -t origin/1.0
  156. export LD_LIBRARY_PATH=/usr/local/lib/ path
  157. LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh
  158. make CFLAGS+="-Wno-error"
  159. sudo make install
  160. cd ..
  161.  
  162. ################# COMPILE GST-OMX ##########
  163.  
  164.  
  165. git clone git://anongit.freedesktop.org/git/gstreamer/gst-omx
  166. cd gst-omx
  167. git checkout -t origin/1.0
  168. LDFLAGS='-L/opt/vc/lib' CPPFLAGS='-I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux' ./autogen.sh --with-omx-target=rpi
  169. make CFLAGS+="-Wno-error"
  170. sudo make install
  171.  
  172. mock@raspberrypi:~/gstbuild2$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement