GStreamer CVS Setup Page

From PiTiViWiKi

The following directions are adapted from the Jokosher Setup Page

Contents

Setting up gstreamer CVS

In order to proceed from here, you need to first have a working build system. At the very least, make sure you have build-essentials and binutils. However, setting up a build environment is beyond the scope of this tutorial.

$ apt-get install build-essential binutils

The SoC branch of Pitivi needs to have the latest gstreamer sources, as there are a number of bugs fixes which Pitivi requires. The following directions will help you set up gstreamer

Set Up ~/bin

We're going to be using a couple of scripts. They'll be easiest to run if you put them somewhere that's in your current path. I have a directory called bin in my home directory that I use for this purpose. If you already know how to do this, or you already have ~/bin in your path, skip this section.

$ cd
$ mkdir bin

Now edit ~/.bashrc, and add this line to the end of the file.

export PATH="~/bin:$PATH"

Save the file.

Now edit ~/.bash_profile and make sure it contains the line

. ~/.bashrc

Save the file, then type

$ exec bash

~/bin should now be in your current path. To check this, type:

$ env | grep PATH

You should see a line that starts with PATH=~/bin

From now on when you log in or create a new terminal window, ~/bin will be in your current path.

Install build dependencies

Exactly how to do this will vary from system to system.

Debain/Ubuntu

On debian/ubuntu the following command should suffice:

$ sudo apt-get build-dep libgstreamer0.10-0\
 gstreamer0.10-plugins-base\
 gstreamer0.10-plugins-good\
 gstreamer0.10-plugins-bad\
 gstreamer0.10-plugins-ugly\
 python-gst0.10\
 gstreamer0.10-gnonlin\
 gstreamer0.10-ffmpeg

Your Distro Here

Add the directions for your distribution

Full List of Dependencies

Someone add the full list of build dependencies here.

Get Latest Gstreamer

Create a Sources directory

Find a place for your gstreamer sources to go. You could use /usr/src/, but I prefer to keep them in my home directory so that I do not need root privileges to update them. For example:

$ mkdir -p ~/src/gstreamer/head
$ cd ~/src/gstreamer/head

N.B. that the lowest level directory must be called head. The rest of this tutorial will assume that you are in your sources directory.

Checkout Sources

We're going to check out gstreamer from cvs. Gstreamer is split up into several modules:

  • gstreamer
  • gst-plugins-base
  • gst-plugins-good
  • gst-plugins-bad
  • gst-plugins-ugly
  • gst-python
  • gnonlin
  • gst-ffmpeg

To check them all out at once, do this:

$ for f in gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-python gnonlin gst-ffmpeg;
do cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer co $f; done

To check them out individually, where module-name is one of the gstreamer modules, do:

$ cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer co module-name

Install GST_Head Script

We do not want to install gstreamer at this point. gstreamer provides the gst-uninstalled script which allows you to temporarily switch your Gstreamer to an uninstalled version.

From your sources directory, copy this script to ~/bin directory:

$ cp ~/src/gstreamer/head/gstreamer/docs/faq/gst-uninstalled ~/bin/gst-head

The reason we rename the script is that the bit after the dash (head) refers to the sub-directory in ~/src/gstreamer (in our case, head). This allows you to easily have multiple un-installed versions of gstreamer.

Now edit this file and look for the MYGST line. Change it to this:

MYGST="$HOME/src/gstreamer"

N.B. Each time you want to use your CVS gstreamer, you will need to run this script. Run it like this:

$ ~/bin/gst-head


Build Sources

This will take a bit of time. First, we need to build gstreamer

$ cd gstreamer
$ ./autogen.sh
$ make
$ cd ..

Now we need to run gst-head. This allows the other plugins to build against this gstreamer.

$ gst-head

You'll notice you're now in the sources directory: this is because the gst-head script starts a subshell in this directory. This is how it is able to make it appear as though your uninstalled version of gstreamer is the current version.

Build all the modules using these commands, where module-name is one of the gstreamer modules.

$ cd module-name
$ ./autogen.sh
$ make
$ cd ..

N.B. do not run make install

Build the modules in this order:

  • gst-plugins-base
  • gst-plugins-good
  • gst-plugins-bad (optional)
  • gst-plugins-ugly (optional)
  • gst-python
  • gnonlin
  • gst-ffmpeg (optional)

Congrats

If you got to this step, you should be able to check out the CVS version of PiTiVi. Make sure you run

$ gst-head

before you try to start PiTiVi, or PiTiVi will not find your new versions of gstreamer. You will have to do this once every time you log in, or every time you want to start PiTiVi in a new terminal. If you decide you are done using the new version of gstreamer, you can type

$ exit

in your terminal to exit the subshell started by running gst-head.

gst-inspect is your friend

This section will explain how to use gst-inspect to verify that your installation is complete.

Install the CVS Update Script

Gstreamer provides a script to automatically update the sources from CVS and make them.

$ cp gstreamer/scripts/cvs-update.sh ~/bin

From your gstreamer sources directory (in this case ~/src/gstreamer/head, and type

$ cvs-update.sh

This will plug away for a while. If nothing goes wrong, you should have gstreamer sources built.