Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Example GStreamer Pipelines

2,957 bytes added, 10:16, 31 December 2013
m
Loopback: Audio
== Notes ==
 
In order to make the next examples work I had to install (apt-get install <package>) the following packages on the target
*gstreamer0.10-tools
*gstreamer0.10-plugins-base
*gstreamer0.10-alsa for alsasrc and alsasink
*gstreamer0.10-plugins-ugly for mad
Perhaps also install gstreamer0.10-plugins-good and gstreamer0.10-plugins-bad...
 
For all examples I had to perform gst-launch-0.10 in stead of gst-launch.
<br>When using the pipelines that use the TI codecs on the DSP, make sure you execute the
gst-launch command in the directory were the codec server (cs.x64P) is present.
<br>You may also make a link to the codecserver in the directory were you execute your command.
<br>
If you do not do this you will get an error like ''gst-launch-0.10: BufTab.c:440: BufTab_getNumBufs: Assertion `hBufTab' failed''
 
== Purpose ==
</pre>
=== Loopback: Audio ===
 
In order to have access to the alsasrc and alsasink plugins perform a 'apt-get install gstreamer0.10-alsa' on the igep board.
<br>
<pre>gst-launch audiotestsrc freq=1000 num-buffers=100&nbsp;! alsasink
</pre>
<pre>mv /etc/asound.conf /etc/asound.conf.orig
</pre>
to move the ALSA configuration file out of the way.
=== Loopback: Audio+Video ===
<pre>gst-launch udpsrc port=5555 caps="application/x-rtp"&nbsp;! queue&nbsp;! rtppcmudepay&nbsp;! mulawdec&nbsp;! audioconvert&nbsp;! alsasink
</pre>
The above example experienced dropped audio, please update pipeline when you get it working properly.
<br> Case 2: sending audio from Ubuntu host to target (BeagleBoard)
<pre>gst-launch udpsrc port=5555 caps="application/x-rtp"&nbsp;! queue&nbsp;! rtppcmudepay&nbsp;! mulawdec&nbsp;! audioconvert&nbsp;! alsasink
</pre>
The above example experienced dropped audio, please update pipeline when you get it working properly.<br>I had the same problem using my IGEP WLAN interface. After direct connect with Ethernet cable the dropped audio problem was solved. I also used these pipelines:<br>On host:<pre>gst-launch filesrc location=DownUnder.mp3 ! mad ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,\rate=44100 ! rtpL16pay ! udpsink host=192.168.2.8 port=5000</pre>On target:<pre>gst-launch udpsrc port=5000 ! “application/x-rtp, media=(string)audio, clock-rate=44100, width=16, height=16, \encoding-name=(string)L16,encoding-params=(string)1, channels=(int)1, channel-position=(int)1, payload=(int)96” ! \gstrtpjitterbuffer do-lost=true ! rtpL16depay ! audioconvert ! alsasink sync=false</pre> And if you want to multicast your stream to multiple computers try this one: On host:<pre>gst-launch filesrc location=DownUnder.mp3 ! mad ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16, \rate=44100 ! rtpL16pay ! udpsink host=224.0.0.15 port=5000</pre> On multiple targets:<pre>gst-launch-0.10 udpsrc port=5000 ! "application/x-rtp,media=(string)audio, clock-rate=(int)44100, width=16, height=16,\ encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, channel-positions=(int)1, payload=(int)96" ! \gstrtpjitterbuffer do-lost=true ! rtpL16depay ! audioconvert ! alsasink sync=false</pre>
==== H.264 RTP Streaming ====
Receiver (target):
<pre>gst-launch udpsrc port=5555 caps="application/x-rtp"&nbsp;! queue&nbsp;! rtppcmudepay&nbsp;! mulawdec &nbsp;! alsasink
</pre><br>  == DSS2 Video Driver == The DSS2 video driver documentation can be found [http://git.igep.es/?p=pub/scm/linux-omap-2.6.git;a=blob;f=Documentation/arm/OMAP/DSS;h=0af0e9eed5d6c1281433b4c0bc26f7c6577fe8a6;hb=refs/heads/linux-2.6.35.y here] for kernel 2.6.35.y
Some useful examples:
omapfb.mode=dvi:1024x768MR-16@60<br>omapfb.mode= DSS2 Video Driver =dvi:1280x720MR-16@60 (for 720p HDTV with 1:1 pixel mapping)<br>omapfb.mode=dvi:1360x768MR-16@60 (works nice on 720p HDMI TV which crops edges due to overscan)<br>
The DSS2 video driver documentation can be found [httpNote://git.igep.es/?p=pub/scm/linuxthe M indicates the kernel will calculate a VESA mode on-omapthe-2fly instead of using modedb lookup.6The R indicates reduced blanking which is for LCD monitors.git;Most HDTV will probably only operate with a=blob;f=Documentation/arm/OMAP/DSS;h=0af0e9eed5d6c1281433b4c0bc26f7c6577fe8a6;hb=refs/heads/linux-2.6.35.y here] for kernel 2.6.35VESA mode.y<br>
Some useful examplesomapfb.mode should be passed in the kernel command line, this is the uboot example:<pre>bootargs-base=mem=430M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1280x720MR-16@60 vram=32M omapfb.vram=0:8M,1:16M,2:8M</pre> <br>
omapfb.mode=dvi:1024x768MR-16@60<br>omapfb.mode=dvi:1280x720MR-16@60 (for 720p HDTV with 1:1 pixel mapping)<br>omapfb.modePerformance ==dvi:1360x768MR-16@60 (works nice on 720p HDMI TV which crops edges due to overscan)<br>
Note: the M indicates the kernel will calculate a VESA mode Here are some test results I measured on-my IGEPV2 board.<br>Decoding an aac music file using software decoder (faad) requires 60% load (top output).<br>Decoding the-fly instead of same file using modedb lookupthe DSP TI framework results in 4% CPU load (top output) and 176kbps / 21 fps DSP "load" (dmaiperf output). The R indicates reduced blanking which is for LCD monitors. Most HDTV will probably only operate with a VESA mode<br><br>To get performance figures from the DSP add dmaiperf in the pipeline.<br><br>I used the following pipelines:<br>
omapfb.mode should be passed in the kernel command line, this is the uboot example:<pre>bootargs*gst-base=mem=430M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1280x720MRlaunch -16@60 vramv filesrc location=32M omapfbsample.vram=0:8M,1:16M,2:8M</pre>aac ! faad ! audioconvert ! audioresample ! alsasink
*gst-launch -v filesrc location=sample.aac ! TIAuddec1 codecName=aachedec engineName=codecServer ! dmaiperf ! alsasink sync=false
[[Category:DMAI_GStreamer_Plug-InGstreamer]] [[Category:GstreamerSoftware applications]]
4,199
edits