GST cookbook/gNewSense

From XiphWiki

< GST cookbook
Revision as of 15:24, 18 March 2013 by GChriss (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

gNewSense GStreamer 0.10 Build Instructions
Tested on 18-March-2013 by GChriss

Prepare live USB key as documented, double-check boot flag

Boot USB key in BIOS -> Install to disk -> Manual partition
Use a smaller '/' partition (~20GB), ~20GB swap space, the remainder as '/home'

reboot

apt-get update

apt-get dist-upgrade

apt-get install fakeroot kernel-package libncurses5-dev libqt3-mt-dev bzip2 wget build-essential autoconf libtool libglib2.0-dev bison flex libxml2-dev alsa-tools libasound2-dev vim mlocate libxmu-dev libxi-dev libsamplerate0-dev libsndfile1-dev git-core curl lm-sensors sensors-applet openssh-server flex bison iasl automake libsdl1.2-dev libgtk2.0-dev libglib2.0-dev libglade2-dev libffi4-dev pciutils-dev cu sysfsutils mkvtoolnix mkvtoolnix-gui subversion cpuburn

[For realtime GNUSense kernel, optional but helpful for audio quality]
http://www.gnewsense.org/Documentation/BuildKernel
+apply patch: http://twobit.us/blog/2010/06/debian-lenny-make-kpkg-broken-with-new-kernel/
sudo su
cd /usr/src
wget "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.1-gnu.tar.bz2"
tar xvjf linux-libre-3.8.1-gnu.tar.bz2
cd linux-3.8.1/
cp /boot/config-2.6.24-32-generic ./.config
make oldconfig
make gconfig
[See attached .config. 'CONFIG_PREEMPT=y' + ALSA built as modules, 'CONFIG_HZ_100=y']
CONCURRENCY_LEVEL=4 fakeroot make-kpkg --initrd kernel_image kernel_headers
[See http://www.debian-administration.org/articles/90 ]
cd /usr/src/
dpkg -i linux-headers-3.8.1-gnu_3.8.1-gnu-10.00.Custom_i386.deb linux-image-3.8.1-gnu_3.8.1-gnu-10.00.Custom_i386.deb
chmod 4755 /usr/bin/cpufreq-selector
reboot
Test GNOME CPU freq applet

gsc@host:~$ uname -a
Linux host 3.8.1-gnu #1 SMP PREEMPT Sun Mar 3 16:40:14 EST 2013 i686 GNU/Linux

sudo su
mkdir -p /packages/openvideopro && mkdir -p /packages/openvideopro/lib && mkdir -p /packages/openvideopro/bin
mkdir -p /packages/openvideopro/lib/pkgconfig
chown -R gchriss:users /packages/openvideopro
exit
rm -Rf ~/.gstreamer-0.10
vi ~/.bashrc, add the following:
export GST_PLUGIN_SYSTEM_PATH="/packages/openvideopro/lib"
export GST_PLUGIN_PATH="/packages/openvideopro/lib"
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig
export PATH=/packages/openvideopro/bin:$PATH


cd /packages
git clone git://repo.or.cz/nasm.git nasm_3march2013
cd nasm_3march2013
./autogen.sh --no-configure &>gsc_autogen.log
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

[Optional]
cd /packages
git clone git://github.com/yasm/yasm.git && cd yasm
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

git clone git://code.entropywave.com/git/orc.git && cd orc
./autogen.sh &>gsc_autogen.log
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

cd /packages && wget "http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz"
tar -xvzf libogg-1.3.0.tar.gz && cd libogg-1.3.0
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

cd /packages && wget "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz"
tar -xvzf libvorbis-1.3.3.tar.gz && cd libvorbis-1.3.3/
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig
make V=1 &>gsc_config.log
make install &>gsc_install.log

cd /packages && wget "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"
tar -xvjf libtheora-1.1.1.tar && cd libtheora-1.1.1
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_config.log
make install &>gsc_install.log

Open browser, download:
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download
cd /packages && tar -xvzf libjpeg-turbo-1.2.90.tar.gz && cd libjpeg-turbo-1.2.90
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

wget "http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2"
tar -xvjf libebml-1.2.2.tar.bz2 & cd libebml-1.2.2
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log
make install &>gsc_install.log

wget "http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2"
tar -xvjf libmatroska-1.3.0.tar.bz2 && cd libmatroska-1.3.0/
CXXFLAGS='-I/packages/openvideopro/include' make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log
make install &>gsc_install.log

wget "http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz" && tar -xvzf libshout-2.3.1.tar.gz && cd libshout-2.3.1
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

wget "http://ftp.acc.umu.se/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.bz2"
tar -xvjf glib-2.28.8.tar.bz2 && cd glib-2.28.8
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
['make check' failures are "OK"]
make install &>gsc_install.log

cd /packages && wget "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.26.tar.bz2"
tar -xvjf alsa-lib-1.0.26.tar.bz2 && cd alsa-lib-1.0.26
./configure --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

wget "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz"
tar -xvzf gstreamer-0.10.36.tar.gz && cd gstreamer-0.10.36
./configure --enable-failing-tests --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

wget "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz"
tar -xvzf gst-plugins-base-0.10.36.tar.gz && cd gst-plugins-base-0.10.36
export CFLAGS='-msse -mmmx -msse2' && export CXXFLAGS='-msse -mmmx -msse2'
./configure --enable-orc --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_config.log
make install &>gsc_install.log

wget "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz"
export CFLAGS='-msse -mmmx -msse2' && export CXXFLAGS='-msse -mmmx -msse2'
tar -xvzf gst-plugins-good-0.10.31.tar.gz && cd gst-plugins-good-0.10.31
./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &>gsc_configure.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

cd /packages
svn checkout http://gst-plugins-elphel.googlecode.com/svn/trunk/ gst-plugins-elphel
cd gst-plugins-elphel/jp462bayer
./autogen &>gsc_autogen.log
./configure --enable-debug --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log
cd ../bayer2rgb2/

cd /packages
wget "http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz"
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz && cd jack-audio-connection-kit-0.121.3
vi tools/alsa_in.c, change:
delay = snd_pcm_avail( alsa_handle ); ==to==
delay = snd_pcm_avail_update( alsa_handle );
vi tools/alsa_out.c, change:
delay = (num_periods*period_size)-snd_pcm_avail( alsa_handle ) ; ==to==
delay = (num_periods*period_size)-snd_pcm_avail_update( alsa_handle ) ;
[Breaks alsa_in, alsa_out playback/recording but enables compilation...]
./configure --enable-optimize --prefix=/packages/openvideopro &>gsc_config.log
make V=1 &>gsc_make.log
make install &>gsc_install.log

updatedb

Close any extra windows, file caching services, etc.

Set CPU cores to >= 3.2GHz

Stress-test CPU temperature stability (necessary, but proceed at own risk):
burnMMX & burnMMX & burnMMX & burnMMX

Disable screensaver, start JACK, launch GStreamer pipeline, renice pipeline to -18, set color controls via Elphel web interface (adjust brightness to achieve 18FPS, most other controls work).


To use Totem from the command line:
unset GST_PLUGIN_SYSTEM_PATH && unset GST_PLUGIN_PATH
totem
rm -Rf ~/.gstreamer-0.10
exit

Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—