[Live-devel] About AAC Streaming

Togba Liberty togba.liberty at ipconfigure.com
Fri Jan 25 11:13:46 PST 2013


Hi All,
Thanks for the expedient response.  What I failed to mention in my original email was that we are developing a transcoding server that will encode mjpeg stream to H264 stream in real time and send out both streams through RTSP to multiple clients.  We were able to build the pipeline and grab the mjpeg stream from the camera through Live555 testRTSPClient program and encode the resulting stream and send it out to multiple clients.

The issue we have now is that in retransmitting the audio stream we don't understand if Live555 adds an extra header to the AAC frames.  This is because we are able to use the RTSPClient subsession to generate the initial settings for our server's RTPSink and all works fine.  Also, we have different threads to spool up multiple streams from different cameras and as a result, our clients have different UsageEnvironments and TaskSchedulers from that of the RTSPServer (this was mentioned as a way to implement transferring streams from live sources).  In order to transfer the streams, we copy the Live555 buffers into our shared buffers and call the event trigger on the onDemandMediaServerSubsession creatNewStreamSource function.

So in our project the pipeline looks like:

testRTSPClient (jpeg & aac):TaskScheduler1  --> shared buffer (jpeg & aac) --> H.264 encoder (h.264) --> RTSPServer (jpeg & h.264 & aac):TaskScheduler2 --> Client

We have the jpeg and h.264 pipeline going, we just need to know what headers the MPEG4GenericRTPSource is adding to the aac frames to be able to retransmit it so VLC can play it.

Thanks,

Togba Liberty
C++ Developer | ipConfigure, Inc.
www.ipconfigure.com
[Description: cid:7D82F492-5DFF-427B-9295-2AD8F6DD9DA3]

From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Thursday, January 24, 2013 7:49 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] About AAC Streaming

Can you please provide some insight as to the frames generated by MPEG4GenericRTPSource so that we can have an idea of how to restream the AAC audio.

The frames are simply AAC audio frames, delivered one at a time.

However, to decode (or restream) these frames, you also need extra 'configuration' information.  This is carried 'out of band' in the stream's SDP description (that the client received in response to its initial RTSP "DESCRIBE" command).  You can get this information by calling the following functions on the stream's "MediaSubsession" object:
            MediaSubsession::fmtp_mode()
                        This will return a string like "AAC-hbr" - describing which particular AAC 'mode' this audio stream is
            MediaSubsession::fmtp_config()
                        This returns a string that contains 'configuration' information.  Depending upon your decoder, you can pass this string to your decoder 'as is', or you can translate it into binary form by calling our function "parseGeneralConfigStr()".  However, for restreaming the frames, the configuration information stays in string form (see below).

To restream these frames, you need to create a "MPEG4GenericRTPSink" object, as follows:

            RTPSink* audioRTPSink = MPEG4GenericRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadType, mediaSubsession->rtpTimestampFrequency(),
                                                                                                "audio", mediaSubsession->fmtp_mode(),
                                                                                                mediaSubsession->fmtp_config(), mediaSubsession->numChannels());
and, as always, an associated "RTCPInstance" object (to implement RTCP).

You can then do the restreaming by calling "startPlaying()" on this "MPEG4GenericRTPSink", taking its input from "mediaSubsession->readSource()" - i.e.
            audioRTPSink->startPlaying(*(mediaSubsession->readSource()), <etc>);

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130125/bd2021da/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 25313 bytes
Desc: image001.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130125/bd2021da/attachment-0001.png>


More information about the live-devel mailing list