Gstreamer 1.4 on the Beaglebone

Today I found myself in a situation where I needed the latest Gstreamer 1.4.3 on a Beaglebone running a console image by Robert C. Nelson based on Debian Wheezy. Debian Wheezy comes with the old Gstreamer 0.10 and as far as I could tell the new gstreamer isn’t even available through backports. It is however available in Debian Jessie (testing).

Although Robert C. Nelson has started making Beaglebone images based in Debian testing, at the present only a “lxqt emmc flasher” image is available and that’s not good for me. I need a console image and I need it on the SD card.

The solution was to start with a clean Debian Wheezy console image and upgrade it to wheezy on the Beaglebone. It’s actually very easy.

Once the Beaglebone is up and running with the new Wheezy image, open the /etc/apt/source.list file in an editor as root (e.g. “sudo nano /etc/apt/sources.list”) and replace “wheezy” with “jessie”. Do that everywhere except for the beagleboard repository. This is how my /etc/apt/sources.list looks like after the changes:

deb http://ftp.dk.debian.org/debian/ jessie main contrib non-free #deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free  deb http://ftp.dk.debian.org/debian/ jessie-updates main contrib non-free #deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free  deb http://security.debian.org/ jessie/updates main contrib non-free #deb-src http://security.debian.org/ jessie/updates main contrib non-free  #deb http://ftp.debian.org/debian wheezy-backports main contrib non-free ##deb-src http://ftp.debian.org/debian wheezy-backports main contrib non-free  deb [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main #deb-src [arch=armhf] http://debian.beagleboard.org/packages wheezy-bbb main  #Kernel source (repos.rcn-ee.net) : https://github.com/RobertCNelson/linux-stable-rcn-ee # #git clone https://github.com/RobertCNelson/linux-stable-rcn-ee #cd ./linux-stable-rcn-ee #git fetch --tags #git checkout `uname -r` -b tmp # deb [arch=armhf] http://repos.rcn-ee.net/debian/ wheezy main 

As a side remark, I would also recommend that you disable automatic installation of suggested and recommended packages. As root, create a file called /etc/apt/apt.conf and add the following to it:

APT::Install-Recommends "0";
APT::Install-Suggests "0";

When done run the upgrade:

$ sudo apt-get update
$ sudo apt-get dist-upgrade

In my case this resulted in 142 upgraded, 65 newly installed, and a single removed package.

When the upgrade finishes, restart the computer and install the gstreamer packages:

$ sudo apt-get install 
libgstreamer1.0-0
gstreamer1.0-alsa
gstreamer1.0-tools
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
gstreamer1.0-plugins-bad

8 upgraded, 265 newly installed, 0 to remove and 119 not upgraded.
8 not fully installed or removed.
Need to get 111 MB/121 MB of archives.
After this operation, 312 MB of additional disk space will be used.

That’s quite a lot of extra space so be sure to use a large enough SD card. If you want to free up some space on the SD card after installation, you can clean the apt cache using:

$ sudo apt-get clean

In my case this free up several hundred megabytes.

That’s all. You cna run the gst-inspec-1.0 tool to check that everything is OK and launch your pipelines with gst-launch-1.0. For example, I am using this to send opus encoded audio using:

$ gst-launch-1.0 -v alsasrc device=hw:1 ! 
audio/x-raw, format=S16LE, channels=1, rate=48000 !
opusenc bandwidth=1102 bitrate=12000 frame-size=60 complexity=5 !
rtpopuspay ! tcpserversink host=192.168.1.109 port=43000

and on the receiving end:

$ gst-launch-1.0 -v tcpclientsrc host=192.168.1.109 port=43000 ! 
application/x-rtp, media=audio, clock-rate=48000,payload=96 !
rtpopusdepay ! opusdec ! alsasink device=hw:1 sync=false

With the encoder settings listed above the CPU load on the Beaglebone is between 20-30 % which is not bad. The net bitrate including TCP overhead is around 25 kbps. Clearly, UDP would be better, but in the final setup the client will be behind a firewall and unable to accept UDP connections.

Now that I have the latest Gstreamer running on the Beaglebone I can continue with my IC-706 remote-rig project.

1 thought on “Gstreamer 1.4 on the Beaglebone”

  1. It fails if I directly copy the cross-compiled gstreamer libraries to /usr/lib or /usr/local/lib.
    Can we do so.i used to do so for intel board.Any idea about this

Comments are closed.