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 jessie main contrib non-free #deb-src jessie main contrib non-free  deb jessie-updates main contrib non-free #deb-src jessie-updates main contrib non-free  deb jessie/updates main contrib non-free #deb-src jessie/updates main contrib non-free  #deb wheezy-backports main contrib non-free ##deb-src wheezy-backports main contrib non-free  deb [arch=armhf] wheezy-bbb main #deb-src [arch=armhf] wheezy-bbb main  #Kernel source ( : # #git clone #cd ./linux-stable-rcn-ee #git fetch --tags #git checkout `uname -r` -b tmp # deb [arch=armhf] 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 

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= port=43000

and on the receiving end:

$ gst-launch-1.0 -v tcpclientsrc host= 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.

Author: Alexandru Csete

Embedded software engineer in the satcom industry during the day. Radio amateur and SDR hacker during the night.