Difference between revisions of "EBC GStreamer"

From eLinux.org
Jump to: navigation, search
m (Installing GStreamer: Added details)
m (Audio Demos)
Line 62: Line 62:
 
There are several scripts that show what GStreamer can do.  They all begin with '''a''''.  
 
There are several scripts that show what GStreamer can do.  They all begin with '''a''''.  
  
  beagle$ '''cd gstreamer'''
+
  bone$ '''cd exercises/gstreamer'''
  beagle$ '''./a2'''
+
  bone$ '''./a2'''
  
 
Go try all the audio files. Make a note (1 or 2 sentences max) about what each one is showing.
 
Go try all the audio files. Make a note (1 or 2 sentences max) about what each one is showing.

Revision as of 07:23, 31 October 2014

thumb‎ Embedded Linux Class by Mark A. Yoder

Openlogo-50.png


There are many open source efforts that run on desktop Linux that have been ported to the BeagleBoard. One effort is GStreamer a library for constructing graphs of media-handling components, or more simply, a open source multimedia framework.

Here are some audio and video demos based on a RidgeRun talk at ESC.

Installing GStreamer

These installation notes are based on oz9aec's gstreamer 14 on th -beaglebone blog.

The current distribution of Debian (Wheezy) doesn't have a current version of GStreamer, so we'll have to take a couple of extra steps to install it. When we run apt-get to install GStreamer we want to install libgstreamer1.0-0, but apt-get doesn't know where to find it. Try this:

bone$ apt-cache pkgnames | grep gstreamer | sort
...
gstreamer-tools
libcanberra-gstreamer
libcanberra-gstreamer-dbg
libghc6-gstreamer-dev
libghc6-gstreamer-doc
libghc6-gstreamer-prof
libghc-gstreamer-dev
libghc-gstreamer-doc
libghc-gstreamer-prof
libgstreamer0.10-0
libgstreamer0.10-0-dbg
libgstreamer0.10-cil-dev
libgstreamer0.10-dev
...

libgstreamer1.0-0 is listed, but libgstreamer1.0-0 isn't. The following will tell apt-get where the Jessie versions are.

bone$ echo "deb ftp://ftp.debian.org/debian/ wheezy-backports main
deb-src ftp://ftp.debian.org/debian/ wheezy-backports main" > /etc/apt/sources.list.d/wheezy-backports.list
bone$ echo "deb ftp://ftp.debian.org/debian/ jessie main
deb-src ftp://ftp.debian.org/debian/ jessie main" > /etc/apt/sources.list.d/jessie.list
bone$ apt-get update

Now list the packages again.

bone$ apt-cache pkgnames | grep gstreamer | sort
...
gstreamer1.0-x
gstreamer-tools
libcanberra-gstreamer
libcanberra-gstreamer-dbg
libgstreamer0.10-0
libgstreamer0.10-0-dbg
libgstreamer0.10-cil-dev
libgstreamer0.10-dev
libgstreamer1.0-0
libgstreamer1.0-0-dbg
libgstreamer1.0-dev

Now install libgstreamer1.0-0. The first install took some 10 minutes on my Bone. The second took 23.

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

Audio Demos

There are several scripts that show what GStreamer can do. They all begin with a'.

bone$ cd exercises/gstreamer
bone$ ./a2

Go try all the audio files. Make a note (1 or 2 sentences max) about what each one is showing.

a5 is an audio through demo. I've set it up to take input from the PS EYE mikes, but I don't hear anything coming out. Can you make it work? Don't take more that 5 minutes.

Video Demos

The files beginning with v are video demos. There is a handy utility that puts the PS EYE in autogain mode. You can run it by:

beagle$ ../autogain/autogain  # This puts the PS EYE in autogain mode.
  1. Try them and make a note about what each does.
  2. v5 is video through, so you'll need the PS EYE. Use gst-inspect to learn what v4l2src can do. Modify v5 to use a image that half the size.
  3. v6 and v7 save the video in a file. Use mplayer to play the file. Does it work? 604x480 video at 30 frames per second is a lot for the Beagle. Make the image half the size. On v7 slow the audio sampling rate to 8k Hz.

Network Demos (optional)

The scripts starting with n show how GStreamer can send data over the network. n3 and n4 show a Beagle to Beagle link. If you have time, try to make it work.




thumb‎ Embedded Linux Class by Mark A. Yoder