"playRTPMPEG" - a MP3 multicast helper tool
The "playRTPMPEG" tool can be used to receive multicast MP3 streams
(i.e., MPEG 1 or 2, layer III audio, encapsulated in RTP/UDP multicast),
and play them using a separate, non-multicast-enabled, player
tool - such as RealNetworks' "RealPlayer G2",
Lycos/Mediascience's "Sonique",
or
"Xaudio".
(Users of "Winamp", however, do not need to use "playRTPMPEG".
Instead, they can use a special RTP
input plugin.)
"playRTPMPEG" can now also receive MPEG video,
using the new "-d" command-line option (described below).
Running playRTPMPEG
playRTPMPEG runs as a console application, without a GUI.
It is run using the command:
playRTPMPEG - <multicast address>/<port> <ttl>
or
playRTPMPEG -h <port-number> <command-to-execute> <multicast address>/<port> <ttl>
where
<multicast address>,
<port>
and
<ttl>
are the network parameters of the multicast session.
playRTPMPEG takes the following options:
- -
Output the received MP3 frames to 'stdout'.
You can redirect this output to a file, or to a separate MP3 player application.
(Note that playRTPMPEG does not do any internal buffering; instead, it assumes
that the program that reads from it will buffer the incoming MPEG frames
sufficiently before playing them.)
For example, you can run playRTPMPEG in combination with
the "Xaudio" player,
using the following command:
playRTPMPEG - <multicast address>/<port> <ttl> | xaudio
- -h <port-number> <command-to-execute>
Create an internal, special-purpose HTTP server on port
<port-number>, and allow a separate client application to
receive the MP3 frames by connecting to this port.
<command-to-execute> is a separate command that
playRTPMPEG executes (in addition to creating the internal HTTP server).
This command can be used to read from this server.
For example, you can run playRTPMPEG in combination with
the "RealPlayer G2", using the following command:
playRTPMPEG -h 10006 "realplay http://localhost:10006/dummy.mp3" <multicast address>/<port> <ttl>
This command tells playRTPMPEG to create an internal HTTP server on port 10006,
and launch "realplay" to stream from this port.
(The "/dummy.mp3" component in the RealPlayer's command-line URL argument is important,
otherwise RealPlayer won't recognize it as a URL.)
Notes:
- You must use exactly one of the
"-"
or
"-h ..."
options.
- If you want playRTPMPEG to set up an internal HTTP server, without executing
a separate command,
then use
""
as the <command-to-execute>.
- Only a single client can connect to playRTPMPEG's internal HTTP server.
This mechanism is intended to be used only as a local data delivery mechanism for players that
cannot read from 'stdin'; it is not meant to be used as
a general-purpose server.
- The combination of "playRTPMPEG" with a separate
audio player application (streaming from it)
may not perform well on
Windows 95 or 98 systems, because of the ridiculously large task scheduling
granularity that these OSs use.
(Windows NT has no such problems, however - nor do any Unix systems.)
- -a <RTP-payload-format-number>
This option specifies that the received MP3 data uses a more
loss-tolerant
'ADU-based' RTP payload format
(as defined in RFC 3119),
using the specified dynamic RTP payload format number
(which must be in the range [96,127]).
- -d
Receive MPEG video instead of MPEG audio.
The MPEG video data must be a video elementary stream, using the RTP
payload format defined in RFC 2250 (and RTP payload type 32).
- -C <session-name>
<session-name> is a brief, human-readable title for
the session.
(This option is currently unused.)
- Advanced options
Using playRTPMPEG with "multikit"
If you're running the multikit
session browser,
then "playRTPMPEG" and "RealPlayer G2"
(if installed) will be run automatically whenever
you launch a MPEG audio session.
(To use a MP3 player
other than
"realplay", edit the "mk_sdp_audio.tcl" invoked
command script.)
By default, multikit starts playRTPMPEG using port 10006.
Unicast reception and RTCP reporting (optional)
"playRTPMPEG" can also receive unicast RTP/UDP data sent to the
specified port,
and send back RTCP reports via unicast.
To do this, give a unicast IP address (usually, the address of the sender)
on the command line, instead of a multicast address.
(playRTPMPEG will send its RTCP reports to the specified address, and to the
specified port+1.)
Return to the main multikit page