[Live-devel] AAC RTP Multicast
Ross Finlayson
finlayson at live555.com
Sat Mar 29 14:58:43 PDT 2014
> Now, I want to add Audio AAC stream to it, in the same manner.
>
> Can you help me and tell me that this is the correct way to do it:
>
> 1. Create AACFramedSource (subclass of FramedSource), which will be fed with AAC buffers.
Yes. Have it deliver one AAC audio frame at a time.
> 2. The RTP sink will be MPEG4GenericRTPSink
Yes.
> 2.1. How would I determine rtpPayloadFormat
Use a different value (in the dynamic rage) than the value (96) that you used for H.264. I suggest using 97.
> , rtpTimestampFrequency
This should be the sampling frequency of your AAC audio.
> , sdpMediaTypeString
This must be "audio"
> , mpeg4Mode
This should be "AAC-hbr"
> and configString?
This is a string - consisting of 4 hex digits - that's constructed from parameters of the audio stream. For illustration, see line 108 of "ADTSAudioFileSource.cpp".
> 3. Create another PassiveServerMediaSubsession for AAC stream and add it to sms
Yes.
> 3.1. I should create separate Groupsock's for the AAC, right? (not use the ones for H264)
Yes, you must create separate "Groupsock" objects (for RTP and RTCP) for audio. The destination IP address may be the same (multicast) address that you used for H.264 video, or it could be a different multicast address. The RTP port number must be a different port number from the port number (18888) that you used for H.264 video, and it must be even. I suggest using 18890. The RTCP port number must be the RTP port number +1 (i.e., odd).
> 4. In the case of H264 I have used H264VideoStreamDiscreteFramer. Should I create one for AAC too?
No. You can feed your "AACFramedSource" object directly into your "MPEG4GenericRTPSink".
> 5. Will this scenario work with RAW AAC frames (i.e. not ADTS)?
Yes. "ADTS" is just a file format, but you're not reading from a file.
Be sure to set "fPresentationTime" properly (in your "AACFramedSource" class) for each AAC frame. To get proper audio/video sync in each media player client, this presentation time must be properly aligned with the H.264 video presentation times, and with 'wall clock' time (i.e., the time that you'd get by calling "gettimeofday()").
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/20140329/118b4986/attachment-0001.html>
More information about the live-devel
mailing list