GST cookbook/Trisquel6: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
(add Pidgin build notes)
m (Tidied external link)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
Trisquel Release 6.0 (toutatis) GStreamer Build Instructions<br>
Moved to: https://gitorious.org/openvideo_reference_build
Tested on a Lenovo x201i by GChriss / 15-April-2013 <br>
<br>
Prepare live USB key as documented:<br>
wget "http://cdimage.trisquel.info/trisquel-images/trisquel_6.0_amd64.iso.torrent"<br>
transmission-gtk trisquel_6.0_amd64.iso.torrent &<br>
dd if=/path/to/trisquel_6.0_amd64.iso of=/dev/sdX bs=8M<br>
sync<br>
cd /media/trisquel\ 6.0\ amd64/<br>
md5sum -c md5sum.txt<br>
<br>
Boot USB key in BIOS -> Install to disk -> Manual partition<br>
Use a smaller '/' partition (~20GB), ~2GB swap space, the remainder as '/home', all primary partitions<br>
<br>
Run through install prompts and reboot<br>
Works out-of-box: backlight, suspend, audio, USB, 10/100 Ethernet, graphics acceleration, Atheros AR5418 Wireless Network Adapter (168c:0024 -- BIOS modification required)<br>
<br>
Trisquel Menu -> System Settings -> Disable screensaver, screen dimming, suspend-on-lid-close, sound effects, window animations<br>
<br>
Open Terminal:<br>
sudo su<br>
<br>
Get this stuff outta here...<br>
/etc/init.d/apparmor stop<br>
update-rc.d -f apparmor remove<br>
apt-get --purge remove apparmor apparmor-utils libapparmor-perl libapparmor1 gnash libjack-jackd2-0 pidgin-data gstreamer0.10-tools gnome-app-install<br>
<br>
apt-get update<br>
<br>
<br>echo "linux-image-generic hold" | dpkg --set-selections<br>
(To undo: echo "linux-image-generic install" | dpkg --set-selections )<br>
apt-get dist-upgrade<br>
<br>
apt-get install bzip2 wget curl bison flex fakeroot vim mlocate subversion git-core openssh-server build-essential libtool intltool checkinstall autoconf automake kernel-package libasound2-dev libcanberra-gtk3-dev libffi-dev libfftw3-dev libgconf2-dev libglade2-dev libglib2.0-dev libglib2.0-dev libgnome-media-profiles-dev libgtk2.0-dev libgtkmm-3.0-dev libjson0-dev libncurses5-dev libqt3-mt-dev libsamplerate0-dev libsdl1.2-dev libsndfile1-dev libspeexdsp-dev libudev-dev libv4l-dev libxi-dev libxml2-dev libxmu-dev libxv-dev pciutils-dev cu sysfsutils gtk-doc-tools gnome-doc-utils iasl alsa-tools lm-sensors mkvtoolnix mkvtoolnix-gui cpuburn indicator-multiload indicator-cpufreq qt4-dev-tools <br>
<br>
chmod 0755 /usr/bin/cpufreq-selector<br>
<br>
Create this file and add the line that follows:<br>
vi /etc/modprobe.d/thinkpad_acpi.conf <br>
options thinkpad_acpi fan_control=1<br>
<br>
vi /etc/rc.local --> add the following:<br>
chmod 666 /proc/acpi/ibm/fan<br>
<br>
exit<br>
<br>
indicator-multiload &<br>
<br>
<br>
Optional but helpful step for realtime audio processing<br>
sudo su<br>
cd /usr/src<br>
wget "http://linux-libre.fsfla.org/pub/linux-libre/releases/LATEST-3.8.N/linux-libre-3.8.6-gnu.tar.bz2"<br>
tar -xvjf linux-libre-3.8.6-gnu.tar.bz2<br>
cd linux-3.8.6/<br>
cp /boot/config-3.2.0-38-generic .config<br>
make oldconfig -> hold down enter key to accept defaults<br>
make gconfig<br>
'CONFIG_PREEMPT=y' + ALSA built as modules, 'CONFIG_HZ_100=y'<br>
Consider adding Easycap: CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + CONFIG_VIDEO_STK1160=m <br>
CONCURRENCY_LEVEL=4 fakeroot make deb-pkg &>gsc_make-deb-pkg.log<br>
dpkg -i ../*.deb<br>
<br>
<br>
reboot and check for PREEMPT in 'uname -a':<br>
Linux x201 3.8.6-gnu #1 SMP PREEMPT Sat Apr 13 02:07:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
<br>
sudo su<br>
mkdir -p /packages/openvideopro && mkdir -p /packages/openvideopro/lib && mkdir -p /packages/openvideopro/bin<br>
mkdir -p /packages/openvideopro/lib/pkgconfig<br>
chown -R gchriss:users /packages<br>
exit<br>
rm -Rf ~/.gstreamer-0.10<br>
vi ~/.bashrc -> add the following:<br>
export GST_PLUGIN_SYSTEM_PATH="/packages/openvideopro/lib"<br>
export GST_PLUGIN_PATH="/packages/openvideopro/lib"<br>
export PKG_CONFIG_PATH=/packages/openvideopro/lib/pkgconfig<br>
export PATH=/packages/openvideopro/bin:$PATH<br>
<br>
<br>
cd /packages<br>
git clone git://repo.or.cz/nasm.git nasm_14april2013 && cd nasm_14april2013<br>
./autogen.sh --no-configure &>gsc_autogen.log<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
YASM is optional:<br>
cd /packages<br>
git clone git://github.com/yasm/yasm.git yasm_14april2013 && cd yasm_14april2013<br>
./autogen.sh --no-configure &>gsc_autogen.log<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages<br>
git clone git://code.entropywave.com/git/orc.git orc_14april2013 && cd orc_14april2013<br>
./autogen.sh &>gsc_autogen.log<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://jackaudio.org/downloads/jack-audio-connection-kit-0.121.3.tar.gz"<br>
tar -xvzf jack-audio-connection-kit-0.121.3.tar.gz && cd jack-audio-connection-kit-0.121.3<br>
./configure --enable-optimize --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
sudo su<br>
vi /etc/security/limits.conf -> add the following line:<br>
@audio          -      rtprio          99<br>
<br>
vi /etc/security/limits.d/audio.conf -> create file with the following line:<br>
@audio - rtprio 95<br>
@audio - memlock unlimited<br>
<br>
usermod -a -G audio gchriss --> subsitute 'gchriss' for your username<br>
exit<br>
<br>
At this point UI volume controls are missing/non-functional, but alsamixer works.<br>
Build pulseaudio if needed, but otherwise optional:<br>
rm -rf  ~/.pulse* /tmp/.esd*<br>
sudo -rf /tmp/pulse*<br>
cd /packages && wget "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-3.0.tar.xz"<br>
tar -xvJf pulseaudio-3.0.tar.xz<br>
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --prefix=/packages/openvideopro  &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
sudo make install &>gsc_install.log<br>
mkdir -p /packages/openvideopro/var/run/pulse &&  mkdir -p /packages/openvideopro/var/lib/pulse<br>
<br>
Also optional:<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.gz"<br>
tar -xvzf gstreamer-0.10.36.tar.gz && cd gstreamer-0.10.36<br>
make install &>gsc_install.log<br>
<br>
Optional:<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.gz"<br>
tar -xvzf gst-plugins-base-0.10.36.tar.gz && cd gst-plugins-base-0.10.36<br>
./configure --enable-orc --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log <br>
<br>
Optional:<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.gz"<br>
tar -xvzf gst-plugins-good-0.10.31.tar.gz && cd gst-plugins-good-0.10.31<br>
See: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=9f2aa8d47f835ea155aaf635f618c0fc1ca87012<br>
--> Remove line containing 'vbuffer.input' in 'sys/v4l2/gstv4l2bufferpool.c'<br>
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig  ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &>gsc_configure.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
Optional:<br>
cd /packages && wget https://launchpad.net/gnome-media/main/2.91.2/+download/gnome-media-2.91.2.tar.bz2<br>
tar -xvjf gnome-media-2.91.2.tar.bz2 && cd gnome-media-2.91.2<br>
./configure --prefix=/packages/openvideopro  &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
<br>
TODO: Figure out how to rebuild UI volume controls (e.g., keyboard volume buttons)<br>
TODO: The following builds but fails to connect to pulseaudio... debug needed?<br>
git clone git://git.0pointer.de/pavucontrol pavucontrol_15april2013 && cd pavucontrol_15april2013<br>
./bootstrap.sh &>gsc_bootstrap.log<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
<br>
TODO: Rebuild Totem + PiTiVi<br>
<br>
cd /packages && wget "http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz"<br>
tar -xvzf libogg-1.3.0.tar.gz && cd libogg-1.3.0<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz"<br>
tar -xvzf libvorbis-1.3.3.tar.gz && cd libvorbis-1.3.3/<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"<br>
tar -xvjf libtheora-1.1.1.tar.bz2 && cd libtheora-1.1.1<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_config.log<br>
make install &>gsc_install.log<br>
<br>
Open abrowser, download:<br>
http://sourceforge.net/projects/libjpeg-turbo/files/1.2.90%20%281.3beta1%29/libjpeg-turbo-1.2.90.tar.gz/download<br>
cd /packages && tar -xvzf libjpeg-turbo-1.2.90.tar.gz && cd libjpeg-turbo-1.2.90<br>
./configure --prefix=/packages/openvideopro --with-jpeg8 &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2"<br>
tar -xvjf libebml-1.2.2.tar.bz2 && cd libebml-1.2.2<br>
make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log<br>
<br>
cd /packages && wget "http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2"<br>
tar -xvjf libmatroska-1.3.0.tar.bz2 && cd libmatroska-1.3.0/<br>
CXXFLAGS='-I/packages/openvideopro/include' make -C make/linux install_staticlib install_headers prefix=/packages/openvideopro &>gsc_make.log<br>
<br>
cd /packages && wget "http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz"<br>
tar -xvzf libshout-2.3.1.tar.gz && cd libshout-2.3.1<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xz"<br>
tar -xvJf glib-2.34.3.tar.xz && cd glib-2.34.3<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
'make check' failures are "OK"<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.27.tar.bz2"<br>
tar -xvjf alsa-lib-1.0.27.tar.bz2 && cd alsa-lib-1.0.27<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.6.tar.xz"<br>
tar -xvJf gstreamer-1.0.6.tar.xz && cd gstreamer-1.0.6<br>
./configure --enable-failing-tests --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make check &>gsc_check.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.6.tar.xz"<br>
tar -xvJf gst-plugins-base-1.0.6.tar.xz && cd gst-plugins-base-1.0.6<br>
./configure --enable-orc --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make check &>gsc_check.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages && wget "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.6.tar.xz"<br>
tar -xvJf gst-plugins-good-1.0.6.tar.xz && cd gst-plugins-good-1.0.6<br>
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/packages/openvideopro/lib64/pkgconfig ./configure --enable-experimental --enable-orc --prefix=/packages/openvideopro &>gsc_configure.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
Optional but really helpful:<br>
cd /packages && wget "http://downloads.sourceforge.net/qjackctl/qjackctl-0.3.10.tar.gz"<br>
tar -xvzf qjackctl-0.3.10.tar.gz && cd qjackctl-0.3.10<br>
./configure --prefix=/packages/openvideopro --with-jack=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
<br>
<br>
===<br>
Create the following block entries for automatic execution @ user login<br>
The first two entries are specific to managing Thinkpad-series laptops<br>
<br>
<br>
gsc@host:~$  cat ~/.config/autostart/cpufreq-selector.desktop <br>
<br>
[Desktop Entry]<br>
Type=Application<br>
Exec=sh -c "/usr/bin/cpufreq-selector -c 0 -g performance & /usr/bin/cpufreq-selector -c 1 -g performance & /usr/bin/cpufreq-selector -c 2 -g performance & /usr/bin/cpufreq-selector -c 3 -g performance"<br>
Hidden=false<br>
NoDisplay=false<br>
X-GNOME-Autostart-enabled=true<br>
Name[en_US]=cpu-freq-selector<br>
Name=cpufreq-selector<br>
Comment[en_US]=Set 2.4GHz (x4)<br>
Comment=Set 2.4GHz (x4)<br>
<br>
<br>
gsc@host:~$ cat ~/.config/autostart/echo.desktop <br>
<br>
[Desktop Entry]<br>
Type=Application<br>
Exec=sh -c "echo level 7 > /proc/acpi/ibm/fan"<br>
Hidden=false<br>
NoDisplay=false<br>
X-GNOME-Autostart-enabled=true<br>
Name[en_US]=Spin up x201i Fan<br>
Name=Spin up x201i Fan<br>
Comment[en_US]=Substitute 'disengaged' for '7' for max speed<br>
Comment=Substitute 'disengaged' for '7' for max speed<br>
<br>
<br>
gsc@host:~$ cat ~/.config/autostart/gnome-terminal.desktop <br>
<br>
[Desktop Entry]<br>
Type=Application<br>
Exec=gnome-terminal<br>
Hidden=false<br>
NoDisplay=false<br>
X-GNOME-Autostart-enabled=true<br>
Name[en_US]=GNOME Terminal<br>
Name=GNOME Terminal<br>
Comment[en_US]=Just to get things started...<br>
Comment=Just to get things started...<br>
<br>
<br>
gsc@host:~$  cat ~/.config/autostart/qjackctl.desktop <br>
<br>
[Desktop Entry]<br>
Type=Application<br>
Exec=sh -c "PATH=/packages/openvideopro/bin:$PATH LD_LIBRARY_PATH=/packages/openvideopro/lib64 /packages/openvideopro/bin/qjackctl"<br>
Hidden=false<br>
NoDisplay=false<br>
X-GNOME-Autostart-enabled=true<br>
Name[en_US]=qjackctl<br>
Name=qjackctl<br>
Comment[en_US]=Launch openvideopro qjackctl / -GChriss<br>
Comment=Launch openvideopro qjackctl / -GChriss<br>
<br>
===<br>
<br>
<br>
sudo updatedb<br>
<br>
Stress-test CPU temperature stability (often necessary, proceed at own risk):<br>
burnMMX & burnMMX & burnMMX & burnMMX<br>
<br>
<br>
network-manager can sometimes be flaky, issue on an as-needed basis:<br>
service network-manager restart<br>
<br>
<br>
Start JACK either via command-line or 'Start' button in QjackCtl, launch GStreamer pipeline, then renice pipeline to -18 or so.<br>
<br>
<br>
==Pidgin==
This section is for building Pidgin and Farsight from source.<br>
Pidgin has XMMP videoconferencing abilities that may be helpful in a A/V production environment.<br>
<br>
apt-get install cdbs dh-autoreconf dh-translations gir1.2-farstream-0.1 hardening-wrapper mercurial-git libavahi-glib-dev libdbus-glib-1-dev libenchant-dev libgadu3 libgadu-dev libgtkspell-dev libgtkspell-3-dev libidn11-dev libjson-glib-dev liblaunchpad-integration-dev libmeanwhile-dev libncursesw5-dev libnspr4-dev libnss3-dev libperl-dev libsasl2-dev libsqlite3-dev libstartup-notification0-dev libwebkitgtk-3.0-dev libxss-dev libzephyr-dev network-manager-dev python-dev python-gtk2-dev python-scour tcl tcl-dev tcl8.5 tcl8.5-dev tk tk-dev tk8.5 tk8.5-dev x11proto-scrnsaver-dev<br>
<br>
cd /packages<br>
wget http://gstreamer.freedesktop.org/src/gst-python/gst-python-0.10.22.tar.gz<br>
tar -xvzf gst-python-0.10.22.tar.gz && cd gst-python-0.10.22<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages<br>
wget "http://nice.freedesktop.org/releases/libnice-0.1.4.tar.gz"<br>
tar -xvzf libnice-0.1.4.tar.gz && cd libnice-0.1.4<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
[Skip the following two blocks if building Pidgin against GStreamer 1.0]<br>
wget http://freedesktop.org/software/farstream/releases/farstream/farstream-0.1.2.tar.gz<br>
tar -xvzf farstream-0.1.2.tar && cd farstream-0.1.2<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.7/pidgin-2.10.7.tar.bz2 ==> download file<br>
cd /packages<br>
tar -xvjf pidgin-2.10.7.tar.bz2 && cd pidgin-2.10.7<br>
./configure --prefix=/packages/openvideopro --with-gstreamer=0.10 &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
sudo make install &>gsc_install.log<br>
[/skip]<br>
<br>
<br>
[Experimental section; builds and launches but Pidgin<->GStreamer 1.0 lockups triggered on events...]<br>
cd /packages<br>
wget "http://freedesktop.org/software/farstream/releases/farstream/farstream-0.2.3.tar.gz"<br>
tar -xvzf farstream-0.2.3.tar.gz && cd farstream-0.2.3<br>
./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
make V=1 &>gsc_make.log<br>
make install &>gsc_install.log<br>
<br>
cd /packages<br>
hg clone http://hg.pidgin.im/pidgin/main pidgin_1may2013 && cd pidgin_1may2013<br>
NOCONFIGURE=1 ./autogen.sh &>gsc_autogen.log<br>
GTK_LIBS='-L/packages/openvideopro/lib -lgstvideo-1.0' ./configure --prefix=/packages/openvideopro &>gsc_config.log<br>
[TODO: Fix 'GtkSpell support' issues]<br>
make V=1 &>gsc_make.log<br>
sudo make install &>gsc_install.log<br>
[/end experimental section]<br>
<br>
<br>
<br>
<br>

Latest revision as of 08:54, 2 October 2013