<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><div><blockquote type="cite">I'm trying to transmit an MP3 file over Transport Stream</blockquote><div><br></div></div></div>Note that a "Transport Stream" is really just a container (i.e. file) format, not a network protocol. So it doesn't really make sense to talk about streaming anything over a "Transport Stream". You can, however, convert, or 'pack' some data type (including MP3 audio) into a Transport Stream file.<div><br></div><div><div><br><blockquote type="cite">I studied the 2 test programs testMP3Streamer and testMPEG2TransportStreamer, but I didn't understand how it can work.<br></blockquote><div><br></div>Those applications are used to stream MP3 and Transport Stream files (respectively) using the standard RTP protocol.</div><div><br></div><div><br></div><div>If you want to convert (not stream) a MP3 file into a Transport Stream file, then you should be able to do so - using our software - by feeding a "MP3FileSource" object into a Transport Stream, by doing something like:</div></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>FramedSource* audioSource = MP3FileSource(*env, mp3FileName);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MPEG2TransportStreamFromESSource* tsFrames = MPEG2TransportStreamFromESSource::createNew(*env);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>tsFrames->addNewAudioSource(audioSource, mpegVersion);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>// Where "mpegVersion" is either 1 or 2, depending on whether your MP3 audio is MPEG-1 or MPEG-2</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>MediaSink* outputSink = FileSink::createNew(*env, outputFileName);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>outputSink->startPlaying(*tsFrames, afterPlaying, NULL);</div><div><br></div><div>(See the "testH264VideoToTransportStream" code for an illustration of how we can convert a H.264 video file into a Transport Stream.)</div><div><br></div><div>However, if you just want to stream a MP3 file over the network, then by far the best way to do this is to stream it via RTP - e.g., using our "testMP3Streamer" demo application, without using Transport Streams at all.</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; font-size: medium; "><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; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>