Possible problem with rtpbin when using AAC?

Peter Maersk-Moller pmaersk at gmail.com
Tue May 10 11:12:36 UTC 2016


Hi Sebastian.

Video works fine alone (also works when MP3 audio is included).
Audio alone works for MP3. Audio never gets to play when using AAC. So it
does not work for AAC.

Audio alone scripts are included for you to verify. With rtpbin, they can
now hardly be stripped further.

*Player script:*
#!/bin/bash
port_base=14100
port_audio_rtp=$(($port_base+2))
port_audio_rtcp=$(($port_base+3))
video_caps='application/x-rtp,media=video,payload=96,clock-rate=90000,encoding-name=H264'
if [ X$1 = Xmp3 ] ; then

audio_caps='application/x-rtp,media=audio,payload=14,clock-rate=90000,encoding-name=MPA'
else

audio_caps='application/x-rtp,media=audio,payload=96,clock-rate=44100,encoding-name=MP4A-LATM'
fi
gst-launch-1.0 -v rtpbin name=rtpbin buffer-mode=slave           \
        udpsrc caps=$audio_caps port=$port_audio_rtp !\
        rtpbin.recv_rtp_sink_1                           \
          rtpbin.                                       !\
          decoder2.                                      \
          udpsrc port=$port_audio_rtcp                  !\
          rtpbin.recv_rtcp_sink_1                        \
          decodebin name=decoder2 ! audioconvert        !\
          audioresample ! autoaudiosink


*Encoder script:*
#!/bin/bash

port_base=14000
port_audio_rtp=$(($port_base+2))
port_audio_rtcp=$(($port_base+3))
host=127.0.0.1

AUDSRC="audiotestsrc is-live=1"
channels=2
rate=44100
if [ $1 = "mp3" ] ; then
  AUDIOENCODER="lamemp3enc bitrate=128 cbr=1"
  AUDIOPAY="rtpmpapay"
  AUDIOPARSE=queue
  AUDIOFORMATOUT="audio/mpeg,mpegversion=1"
else
  AUDIOENCODER="faac bitrate=128000"
  AUDIOPAY="rtpmp4apay"
  AUDIOPARSE=aacparse
  AUDIOFORMATOUT="audio/mpeg,mpegversion=4,stream-format=raw"
fi
AUDIOFORMAT="audio/x-raw,format=S16LE,layout=interleaved,rate=$rate,channels=$channels"
gst-launch-1.0 -v rtpbin name=rtpbin                     \
        $AUDSRC                                         !\
        queue                                           !\
        $AUDIOFORMAT                                    !\
        audioparse rate=$rate channels=$channels        !\
        audioconvert                                    !\
        $AUDIOENCODER                                   !\
        $AUDIOPARSE                                     !\
        $AUDIOFORMATOUT                                 !\
        $AUDIOPAY                                       !\
        rtpbin.send_rtp_sink_1                           \
          rtpbin.send_rtp_src_1                         !\
          udpsink host=$host port=$port_audio_rtp        \
          rtpbin.send_rtcp_src_1                        !\
          udpsink host=$host port=$port_audio_rtcp sync=false async=false


On Tue, May 10, 2016 at 12:54 PM, Sebastian Dröge <sebastian at centricular.com
> wrote:

> On Di, 2016-05-10 at 12:47 +0200, Peter Maersk-Moller wrote:
> > Hi.
> >
> > I have a bit of a problem getting rtpbin to work reliably with AAC.
> > Works fine with MP3. The problem can be reproduced with following two
> > scripts. The player part fails in varying ways when using AAC, but
> > works as said fine with MP3. When using BOTH the scripts with the
> > argument 'mp3' it will use MP3, otherwise they will use AAC. Using
> > GStreamer 1.8.1. Note the player does not send stats back to the
> > encoder/sender, but that ought to be okay.
> >
> > When using AAC, the player script fails in one of the following ways:
> > A video window pops up showing the first frame, but no more frames
> > are shown and no audio is coming out.
> > [...]
>
> This looks like some general (gst-launch caused) linking confusion. Can
> you simplify your scripts to only do audio? I would guess that the
> problem with AAC disappears then. Can you confirm?
>
> And I assume the pipelines also works fine if you remove the audio
> parts all together and only have video?
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160510/d2bbbcd8/attachment-0001.html>


More information about the gstreamer-devel mailing list