<div dir="ltr"><div><div><div><div><div>Hi Sebastian.<br><br></div>Video works fine alone (also works when MP3 audio is included).<br></div>Audio alone works for MP3. Audio never gets to play when using AAC. So it does not work for AAC.<br><br></div>Audio alone scripts are included for you to verify. With rtpbin, they can now hardly be stripped further.<br></div><b>Player script:<br></b><br><font size="1">#!/bin/bash<br>port_base=14100<br>port_audio_rtp=$(($port_base+2))<br>port_audio_rtcp=$(($port_base+3))<br>video_caps='application/x-rtp,media=video,payload=96,clock-rate=90000,encoding-name=H264'<br>if [ X$1 = Xmp3 ] ; then<br> audio_caps='application/x-rtp,media=audio,payload=14,clock-rate=90000,encoding-name=MPA'<br>else<br> audio_caps='application/x-rtp,media=audio,payload=96,clock-rate=44100,encoding-name=MP4A-LATM'<br>fi<br>gst-launch-1.0 -v rtpbin name=rtpbin buffer-mode=slave \<br> udpsrc caps=$audio_caps port=$port_audio_rtp !\<br> rtpbin.recv_rtp_sink_1 \<br> rtpbin. !\<br> decoder2. \<br> udpsrc port=$port_audio_rtcp !\<br> rtpbin.recv_rtcp_sink_1 \<br> decodebin name=decoder2 ! audioconvert !\<br> audioresample ! autoaudiosink</font><br><br></div><b>Encoder script:<br></b><div><font size="1">#!/bin/bash<br><br>port_base=14000<br>port_audio_rtp=$(($port_base+2))<br>port_audio_rtcp=$(($port_base+3))<br>host=127.0.0.1<br><br>AUDSRC="audiotestsrc is-live=1"<br>channels=2<br>rate=44100<br>if [ $1 = "mp3" ] ; then<br> AUDIOENCODER="lamemp3enc bitrate=128 cbr=1"<br> AUDIOPAY="rtpmpapay"<br> AUDIOPARSE=queue<br> AUDIOFORMATOUT="audio/mpeg,mpegversion=1"<br>else<br> AUDIOENCODER="faac bitrate=128000"<br> AUDIOPAY="rtpmp4apay"<br> AUDIOPARSE=aacparse<br> AUDIOFORMATOUT="audio/mpeg,mpegversion=4,stream-format=raw"<br>fi<br>AUDIOFORMAT="audio/x-raw,format=S16LE,layout=interleaved,rate=$rate,channels=$channels"<br>gst-launch-1.0 -v rtpbin name=rtpbin \<br> $AUDSRC !\<br> queue !\<br> $AUDIOFORMAT !\<br> audioparse rate=$rate channels=$channels !\<br> audioconvert !\<br> $AUDIOENCODER !\<br> $AUDIOPARSE !\<br> $AUDIOFORMATOUT !\<br> $AUDIOPAY !\<br> rtpbin.send_rtp_sink_1 \<br> rtpbin.send_rtp_src_1 !\<br> udpsink host=$host port=$port_audio_rtp \<br> rtpbin.send_rtcp_src_1 !\<br> udpsink host=$host port=$port_audio_rtcp sync=false async=false<br></font><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 10, 2016 at 12:54 PM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Di, 2016-05-10 at 12:47 +0200, Peter Maersk-Moller wrote:<br>
> Hi.<br>
><br>
> I have a bit of a problem getting rtpbin to work reliably with AAC.<br>
> Works fine with MP3. The problem can be reproduced with following two<br>
> scripts. The player part fails in varying ways when using AAC, but<br>
> works as said fine with MP3. When using BOTH the scripts with the<br>
> argument 'mp3' it will use MP3, otherwise they will use AAC. Using<br>
> GStreamer 1.8.1. Note the player does not send stats back to the<br>
> encoder/sender, but that ought to be okay.<br>
><br>
> When using AAC, the player script fails in one of the following ways:<br>
> A video window pops up showing the first frame, but no more frames<br>
> are shown and no audio is coming out.<br>
</span>> [...]<br>
<br>
This looks like some general (gst-launch caused) linking confusion. Can<br>
you simplify your scripts to only do audio? I would guess that the<br>
problem with AAC disappears then. Can you confirm?<br>
<br>
And I assume the pipelines also works fine if you remove the audio<br>
parts all together and only have video?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>