AAC/RTP streaming

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

AAC/RTP streaming

Martin Vachovski

Hello everybody,


I am trying to implement AAC streaming overt RTP, but the receiving pipeline doesn't play any audio (although it says it goes to PLAYING state). 

​I am using the following pipelines with gstreamer 1.12.2:


TX:

gst-launch-1.0.exe -v audiotestsrc ! audioconvert ! avenc_aac ! rtpmp4apay ! udpsink


RX:

gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! autoaudiosink


(I have also tried replacing the "avdec_aac" element with a "decodebin").

The pipelines don't report any errors, but the second one doesn't play any sound.

I wonder if there is any other setting, caps I need to specify? I know that the Vorbis codec,

for instance, needs the DCT coefficients of the transform as extra data when streaming over the network?


Also, if I merge the two pipelines together (omitting the udpsink/udpsrc pair), the pipeline works:

audiotestsrc volume=0.1 ! audioconvert ! avenc_aac ! rtpmp4apay ! application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! wavescope ! videoconvert ! autovideosink


I have also tried to supply all the CAPS as reported by the SRC pad of "rtpmp4apay " before the "rtpjitterbuffer", still no luck

/GstPipeline:pipeline0/GstRtpMP4APay:rtpmp4apay0.GstPad:src: caps = application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)MP4A-LATM, cpresent=(string)0, config=(string)40002410adca00, payload=(int)96, ssrc=(uint)3854776221, timestamp-offset=(uint)466007625, seqnum-offset=(uint)12210


Many thanks!

Martin



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AAC/RTP streaming

Martin Vachovski

Hello everybody,


Some update, actually when I use the above pipelines I get some warnings if I set --gst-debug-level=4


0:00:08.188353677 10704   031FBAB8 ERROR                  libav :0:: Input buffer exhausted before END element found
0:00:08.188447229 10704   031FBAB8 WARN                   libav gstavauddec.c:635:gst_ffmpegauddec_frame:<avdec_aac0> avdec_aac: decoding error (len: -1094995529, have_data: 0)

Any idea why is that error and how it can be handled? I've tried to play with the parameters of the encoding and payloading elements, but no luck so far

On a side note... I noticed that under Windows 10/Gstreamer 1.12.2, the pipelines which use the default property host="localhost" for udpsink, won't  work.
The reason is that "localhost" in Windows 10 with IPv6 is treated as the IPv6 ::1 address rather than the 127.0.0.1,
and udpsrc bounds to 0.0.0.0 (which bounds only to the IPv4 addresses of the system). Hope that saves some time if anyone is working with udpsink/src and Win10

Cheers
Martin





From: Martin Vachovski
Sent: Tuesday, September 26, 2017 12:05 PM
To: [hidden email]
Subject: AAC/RTP streaming
 

Hello everybody,


I am trying to implement AAC streaming overt RTP, but the receiving pipeline doesn't play any audio (although it says it goes to PLAYING state). 

​I am using the following pipelines with gstreamer 1.12.2:


TX:

gst-launch-1.0.exe -v audiotestsrc ! audioconvert ! avenc_aac ! rtpmp4apay ! udpsink


RX:

gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! autoaudiosink


(I have also tried replacing the "avdec_aac" element with a "decodebin").

The pipelines don't report any errors, but the second one doesn't play any sound.

I wonder if there is any other setting, caps I need to specify? I know that the Vorbis codec,

for instance, needs the DCT coefficients of the transform as extra data when streaming over the network?


Also, if I merge the two pipelines together (omitting the udpsink/udpsrc pair), the pipeline works:

audiotestsrc volume=0.1 ! audioconvert ! avenc_aac ! rtpmp4apay ! application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! wavescope ! videoconvert ! autovideosink


I have also tried to supply all the CAPS as reported by the SRC pad of "rtpmp4apay " before the "rtpjitterbuffer", still no luck

/GstPipeline:pipeline0/GstRtpMP4APay:rtpmp4apay0.GstPad:src: caps = application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)MP4A-LATM, cpresent=(string)0, config=(string)40002410adca00, payload=(int)96, ssrc=(uint)3854776221, timestamp-offset=(uint)466007625, seqnum-offset=(uint)12210


Many thanks!

Martin



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AAC/RTP streaming

Nicolas Dufresne-5
In reply to this post by Martin Vachovski
Le mardi 26 septembre 2017 à 11:05 +0000, Martin Vachovski a écrit :

> Hello everybody,
>
> I am trying to implement AAC streaming overt RTP, but the receiving
> pipeline doesn't play any audio (although it says it goes to PLAYING
> state).
> I am using the following pipelines with gstreamer 1.12.2:
>
> TX:
> gst-launch-1.0.exe -v audiotestsrc ! audioconvert ! avenc_aac !
> rtpmp4apay ! udpsink
>
> RX:
> gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100 !
> rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert !
> autoaudiosink
You are sending RAW AAC, this means the other side require the config
header. It's good, since it's pretty low latency, but you have to
signal that config and add config=... to your receiver caps. For this
pipeline, try:

gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100,config=40002410adca00 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! autoaudiosink

>
> (I have also tried replacing the "avdec_aac" element with a
> "decodebin").
> The pipelines don't report any errors, but the second one doesn't
> play any sound.
> I wonder if there is any other setting, caps I need to specify? I
> know that the Vorbis codec,
> for instance, needs the DCT coefficients of the transform as extra
> data when streaming over the network?
>
> Also, if I merge the two pipelines together (omitting the
> udpsink/udpsrc pair), the pipeline works:
> audiotestsrc volume=0.1 ! audioconvert ! avenc_aac ! rtpmp4apay !
> application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay !
> avdec_aac ! audioconvert ! wavescope ! videoconvert ! autovideosink
>
> I have also tried to supply all the CAPS as reported by the SRC pad
> of "rtpmp4apay " before the "rtpjitterbuffer", still no luck
> /GstPipeline:pipeline0/GstRtpMP4APay:rtpmp4apay0.GstPad:src: caps =
> application/x-rtp, media=(string)audio, clock-rate=(int)44100,
> encoding-name=(string)MP4A-LATM, cpresent=(string)0,
> config=(string)40002410adca00, payload=(int)96,
> ssrc=(uint)3854776221, timestamp-offset=(uint)466007625, seqnum-
> offset=(uint)12210
>
> Many thanks!
> Martin
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AAC/RTP streaming

Martin Vachovski
Hi Nicolas,

Now the pipeline works.

Many thanks!
Martin

________________________________________
From: gstreamer-devel <[hidden email]> on behalf of Nicolas Dufresne <[hidden email]>
Sent: Tuesday, September 26, 2017 7:21 PM
To: Discussion of the development of and with GStreamer
Subject: Re: AAC/RTP streaming

Le mardi 26 septembre 2017 à 11:05 +0000, Martin Vachovski a écrit :

> Hello everybody,
>
> I am trying to implement AAC streaming overt RTP, but the receiving
> pipeline doesn't play any audio (although it says it goes to PLAYING
> state).
> I am using the following pipelines with gstreamer 1.12.2:
>
> TX:
> gst-launch-1.0.exe -v audiotestsrc ! audioconvert ! avenc_aac !
> rtpmp4apay ! udpsink
>
> RX:
> gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100 !
> rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert !
> autoaudiosink

You are sending RAW AAC, this means the other side require the config
header. It's good, since it's pretty low latency, but you have to
signal that config and add config=... to your receiver caps. For this
pipeline, try:

gst-launch-1.0.exe -v udpsrc ! application/x-rtp,clock-rate=44100,config=40002410adca00 ! rtpjitterbuffer ! rtpmp4adepay ! avdec_aac ! audioconvert ! autoaudiosink

>
> (I have also tried replacing the "avdec_aac" element with a
> "decodebin").
> The pipelines don't report any errors, but the second one doesn't
> play any sound.
> I wonder if there is any other setting, caps I need to specify? I
> know that the Vorbis codec,
> for instance, needs the DCT coefficients of the transform as extra
> data when streaming over the network?
>
> Also, if I merge the two pipelines together (omitting the
> udpsink/udpsrc pair), the pipeline works:
> audiotestsrc volume=0.1 ! audioconvert ! avenc_aac ! rtpmp4apay !
> application/x-rtp,clock-rate=44100 ! rtpjitterbuffer ! rtpmp4adepay !
> avdec_aac ! audioconvert ! wavescope ! videoconvert ! autovideosink
>
> I have also tried to supply all the CAPS as reported by the SRC pad
> of "rtpmp4apay " before the "rtpjitterbuffer", still no luck
> /GstPipeline:pipeline0/GstRtpMP4APay:rtpmp4apay0.GstPad:src: caps =
> application/x-rtp, media=(string)audio, clock-rate=(int)44100,
> encoding-name=(string)MP4A-LATM, cpresent=(string)0,
> config=(string)40002410adca00, payload=(int)96,
> ssrc=(uint)3854776221, timestamp-offset=(uint)466007625, seqnum-
> offset=(uint)12210
>
> Many thanks!
> Martin
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel