<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite">Now, I want to add Audio AAC stream to it, in the same manner.<br><br>Can you help me and tell me that this is the correct way to do it:<br><br>1. Create AACFramedSource (subclass of FramedSource), which will be fed with AAC buffers.<br></blockquote><div><br></div>Yes. Have it deliver one AAC audio frame at a time.</div><div><br><blockquote type="cite">2. The RTP sink will be MPEG4GenericRTPSink<br></blockquote><div><br></div>Yes.</div><div><br><blockquote type="cite"> 2.1. How would I determine rtpPayloadFormat</blockquote><div><br></div>Use a different value (in the dynamic rage) than the value (96) that you used for H.264. I suggest using 97.</div><div><br><blockquote type="cite">, rtpTimestampFrequency</blockquote><div><br></div>This should be the sampling frequency of your AAC audio.</div><div><br><blockquote type="cite">, sdpMediaTypeString</blockquote><div><br></div>This must be "audio"</div><div><br><blockquote type="cite">, mpeg4Mode</blockquote><div><br></div>This should be "AAC-hbr"</div><div><br></div><div><blockquote type="cite"> and configString?<br></blockquote><div><br></div>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".</div><div><br><blockquote type="cite">3. Create another PassiveServerMediaSubsession for AAC stream and add it to sms<br></blockquote><div><br></div>Yes.</div><div><br><blockquote type="cite"> 3.1. I should create separate Groupsock's for the AAC, right? (not use the ones for H264)<br></blockquote><div><br></div>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).</div><div><br><blockquote type="cite">4. In the case of H264 I have used H264VideoStreamDiscreteFramer. Should I create one for AAC too?</blockquote><div><br></div>No. You can feed your "AACFramedSource" object directly into your "MPEG4GenericRTPSink".</div><div><br></div><div><br><blockquote type="cite">5. Will this scenario work with RAW AAC frames (i.e. not ADTS)?<br></blockquote><div><br></div>Yes. "ADTS" is just a file format, but you're not reading from a file.</div><div><br></div><div>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()"). </div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>