[Live-devel] numChannels Parameter
Ross Finlayson
finlayson at live555.com
Wed Jul 1 18:33:45 PDT 2009
>I have a SimpleRTPSink that is fed a transport stream from
>MPEG2TransportStreamFramer. That transport stream contains one
>MPEG-4 video elementary stream plus one MPEG-1, Layer 3 stereo
>(2-channel) audio stream. When I call SimpleRTPSink::createNew(),
>what value should I use for the numChannels parameter?
When streamed over RTP, a MPEG Transport Stream - regardless of its
actual contents - is described in SDP as being a "video" stream, and
therefore the "numChannels" parameter is ignored, but should be set
to 1.
See, for example, the code in "MPEG2TransportFileServerMediaSubsession.cpp":
return SimpleRTPSink::createNew(envir(), rtpGroupsock, 33, 90000,
"video", "MP2T", 1, True, False /*no 'M' bit*/);
Note also that - for network efficiency - you should pack as much
Transport Stream data as possible (but with a granularity of 188
bytes) into each RTP packet. Using the default MTU, this usually
means 7*188 bytes of Transport Stream data per RTP packet.
See, for example, code in
"MPEG2TransportFileServerMediaSubsession.cpp" (for streaming via
unicast), or "testMPEG2TransportStreamer" (for streaming via
multicast).
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list