sudo apt-get update && sudo apt-get upgrade -y --force-yes
sudo apt-get install -y --force-yes build-essential autotools-dev automake autoconf libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev pkg-config bison flex python git gtk-doc-tools libasound2-dev libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev libcurl4-gnutls-dev libdca-dev libdirac-dev libdvdnav-dev libexempi-dev libexif-dev libfaad-dev libgme-dev libgsm1-dev libiptcdata0-dev libkate-dev libmimic-dev libmms-dev libmodplug-dev libmpcdec-dev libofa0-dev libopus-dev librsvg2-dev librtmp-dev libslv2-dev libsndfile1-dev libsoundtouch-dev libspandsp-dev libx11-dev libxvidcore-dev libzbar-dev libzvbi-dev liba52-0.7.4-dev libcdio-dev libdvdread-dev libmad0-dev libmp3lame-dev libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev libsidplay1-dev libtwolame-dev libx264-dev
cd ~
mkdir packages
cd packages
mkdir gstreamer-1.2
cd gstreamer-1.2
git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
git clone git://anongit.freedesktop.org/git/gstreamer/gst-libav
git clone git://anongit.freedesktop.org/git/gstreamer/gst-omx
git clone https://github.com/thaytan/gst-rpicamsrc.git
cd gstreamer
./autogen.sh
sudo make
sudo make install
cd ../gst-plugins-base
./autogen.sh
sudo make
sudo make install
cd ../gst-plugins-good
./autogen.sh
sudo make
sudo make install
cd gst-plugins-ugly
./autogen.sh
sudo make
sudo make install
cd ../gst-libav
sudo ./autogen.sh
sudo make
sudo make install
sudo apt-get install -y --force-yes libusb-1.0
cd ../gst-plugins-bad
export LD_LIBRARY_PATH=/usr/local/lib/ path
sudo 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
sudo make CFLAGS+="-Wno-error"
sudo make install
cd ../gst-omx
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
sudo make CFLAGS+="-Wno-error"
sudo make install
cd ../gst-rpicamsrc
./autogen --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/
make
sudo make install
sudo apt-get install -y --force-yes build-essential autotools-dev automake autoconf libtool autopoint libxml2-dev zlib1g-dev libglib2.0-dev pkg-config bison flex python git gtk-doc-tools libasound2-dev libgudev-1.0-dev libxt-dev libvorbis-dev libcdparanoia-dev libpango1.0-dev libtheora-dev libvisual-0.4-dev iso-codes libgtk-3-dev libraw1394-dev libiec61883-dev libavc1394-dev libv4l-dev libcairo2-dev libcaca-dev libspeex-dev libpng-dev libshout3-dev libjpeg-dev libaa1-dev libflac-dev libdv4-dev libtag1-dev libwavpack-dev libpulse-dev libsoup2.4-dev libbz2-dev libcdaudio-dev libdc1394-22-dev ladspa-sdk libass-dev libcurl4-gnutls-dev libdca-dev libdirac-dev libdvdnav-dev libexempi-dev libexif-dev libfaad-dev libgme-dev libgsm1-dev libiptcdata0-dev libkate-dev libmimic-dev libmms-dev libmodplug-dev libmpcdec-dev libofa0-dev libopus-dev librsvg2-dev librtmp-dev libslv2-dev libsndfile1-dev libsoundtouch-dev libspandsp-dev libx11-dev libxvidcore-dev libzbar-dev libzvbi-dev liba52-0.7.4-dev libcdio-dev libdvdread-dev libmad0-dev libmp3lame-dev libmpeg2-4-dev libopencore-amrnb-dev libopencore-amrwb-dev libsidplay1-dev libtwolame-dev libx264-dev
cd ~
mkdir packages
cd packages
mkdir gstreamer-1.2
cd gstreamer-1.2
git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
git clone git://anongit.freedesktop.org/git/gstreamer/gst-libav
git clone git://anongit.freedesktop.org/git/gstreamer/gst-omx
git clone https://github.com/thaytan/gst-rpicamsrc.git
cd gstreamer
./autogen.sh
sudo make
sudo make install
cd ../gst-plugins-base
./autogen.sh
sudo make
sudo make install
cd ../gst-plugins-good
./autogen.sh
sudo make
sudo make install
cd gst-plugins-ugly
./autogen.sh
sudo make
sudo make install
cd ../gst-libav
sudo ./autogen.sh
sudo make
sudo make install
sudo apt-get install -y --force-yes libusb-1.0
cd ../gst-plugins-bad
export LD_LIBRARY_PATH=/usr/local/lib/ path
sudo 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
sudo make CFLAGS+="-Wno-error"
sudo make install
cd ../gst-omx
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
sudo make CFLAGS+="-Wno-error"
sudo make install
cd ../gst-rpicamsrc
./autogen --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf/
make
sudo make install