mmrplay command line

Play a media file through mm-renderer

Synopsis:

mmrplay [-c ctxtname] [-C ctxt_param=val]* [-m mode] [-r connectpath] [-R retries]
        [ [-a audio_url [-A audio_param=val]*] | [-v video_url [-V video_param=val]*] |
            [-s subpicture_url [-S subpicture_param=val]*] |
          [-f file_url [-F file_param=val]*] ]
        [-t inputtype] [-P position] [-T speed] [-I input_param=val]*
        [-M] [-D[D] | -Q] [-B] [-x] [-i | -o ctxtname | input_url]+ 

Options:

-A audio_param=val
Apply a parameter for audio output. The option setting must contain a name-value pair for a parameter applicable to audio output, with the name and value separated by an equal sign (=). For the list of audio output parameters, see the Parameters that affect how the output is delivered section in the mm-renderer documentation.
By default, no parameters are set for audio output. You can name as many output parameters as you need, but each must go in its own -A option.
-a audio_url
Name the URL of an audio device to use for output. The valid URL formats are given in the mmr_output_attach() reference.
This option should be specified only once. If you specify this option multiple times, mmrplay uses only the last option setting and silently ignores the rest. You can combine this option with -v and -s, to direct the audio to one output device and the video and any subtitles to other devices. You can't combine it with -f or -o.
You can provide an empty string for the value (-a "") to tell mmrplay there's no audio output. If you don't provide any -a option, the preferred audio device is attached.
-B
Don't play the input, just attach it and exit. You can use this option to test whether an input is accessible, without playing it. You don't need any other options besides the input URL.
-C ctxt_param=val
Apply a parameter to the context. The option setting must contain a name-value pair for a valid context parameter, with the name and value separated by an equal sign (=). For the list of context parameters, see the Parameters that affect how the input is accessed section in the mm-renderer documentation.
By default, no parameters are applied to the context. You can name as many context parameters as you need, but each must go in its own -C option.
-c contextname
Create a new context to manage the media flow and assign the context the given name. The default name is testplayer. If you do specify -c, you can't specify -o.
-D
Increase verbosity. By default, mmrplay prints the event type, context state, and playback position for each received event. Specifying one -D adds a listing of the changed attributes; two -Ds lists all attributes, even unchanged ones. This option works opposite to -Q.
-F file_param=val
Apply a parameter for file output. The option setting must contain a name-value pair for a parameter applicable to file output, with the name and value separated by an equal sign (=). For the list of file output parameters, see the Parameters that affect how the output is delivered section in the mm-renderer documentation.
By default, no parameters are set for file output. You can name as many output parameters as you need, but each must go in its own -F option.
-f file_url
Name the URL of a file to use for recording media content. See mmr_output_attach() for the list of valid URL formats for file output.
This option should be specified only once. If you specify this option multiple times, mmrplay uses only the last option setting and silently ignores the rest. You can't use this option if you're using any of the -a, -v, or -s options.
-I input_param=val
Apply a parameter to the input. The option setting must contain a name-value pair for a valid input parameter, with the name and value separated by an equal sign (=). For the list of input parameters, see the Parameters that affect how the input is accessed section in the mm-renderer documentation.
By default, no parameters are applied to the input. You can name as many input parameters as you need, but each must go in its own -I option.
-i
Print plugin information. This option makes mmrplay retrieve and print information about all loaded mm-renderer plugins, which manage media flow. The information includes the library file names, descriptions, and other fields set by specific plugins (e.g., supported MIME types). When you use -i, you don't need any other options, not even an input URL.

You must specify at least one the -i, -o, or input_url options. You can specify any two or all three of these options if you like.

-M
For metadata events, extract any attributes (properties) of individual tracks or images inside the input file. The attributes for each metadata category—audio, video, subpicture, and image—are printed. The -M option makes mmrplay print the attributes one per line, for each track or image.
Suppose a song on an album has one artwork image. You could see the following properties:
Parsed track metadata:
  audio track #0:
     bitrate=256000
     channels=2
     fourcc=M1A3
     sample_rate=44100
  image track #0:
     mime=image/jpeg
     type=Front cover
If you don't use -M in this case, but do use -D, you would see the following properties:
New object "metadata":
  md_audio_track0 = "sample_rate=44100,channels=2,bitrate=256000,fourcc=M1A3"
  ...
  md_title_image0 = "mime=image/jpeg,type=Front cover"
-m mode
Set permission bits to control access to the playback context. The -m value must be a three-digit octal number, where the first digit represents the “user” permissions, the second digit the “group” permissions, and the third digit the “other” permissions. Each digit can be an OR of 4 for the “read” bit, 2 for the “write” bit, and 1 for the “execute” bit. For details about how these settings affect playback, see the mmr_context_create() reference.
-o contextname
Open the existing context that has the specified name and reports its events.

You must specify at least one the -i, -o, or input_url options. You can specify any two or all three of these options if you like. If you do specify -o, you can't specify -c.

-P position
Start playing the input from a particular position. The required format of the option value (position) depends on the input type. For details, see the mmr_seek() description.
-Q
Decrease verbosity. By default, mmrplay prints the event type, context state, and playback position for each received event. Specifying one -Q suppresses the reporting of all events except errors and warnings; two -Qs disables warnings; three -Qs disables warnings and errors. This option works opposite to -D.
-R retries
If the context can't be created or opened, retry the operation for the indicated number of times, with one-second delays between retries.
-r connectpath
Name of the device path for mm-renderer to use. If you don't provide this option, the default path is used.
-S subpicture_param=val
Apply a parameter for subpicture output. Currently, no useful properties can be set by defining parameters with -S; this option is provided only in case new parameters for screen: URLs or new URL types for subpicture output are defined in future releases.
-s subpicture_url
Name the URL of a device to use for subpicture output. This output type lets you render subtitles on top of videos being played, which means you must also provide a video URL with -v to see any subtitles. See mmr_output_attach() for the valid URL formats.
The -s option should be specified only once. If you specify this option multiple times, mmrplay uses only the last option setting and silently ignores the rest. You can combine this option with -a, to direct the audio to one output device and the video and subtitles to other devices. You can't combine it with -f or -o.
-T speed
Set the playback speed, in units of 1/1000 of normal speed. The default value is 1000.
-t inputtype
Set the input type. Acceptable values are: track, playlist, and autolist. The default setting is track.
-V video_param=val
Apply a parameter for video output. Currently, no useful properties can be set by defining parameters with -V; this option is provided only in case new parameters for screen: URLs or new URL types for video output are defined in future releases.
-v video_url
Name the URL of a device to use for video output. See mmr_output_attach() for the valid URL formats.
This option should be specified only once. If you specify this option multiple times, mmrplay uses only the last option setting and silently ignores the rest. You can combine this option with -a and -s, to direct the audio to one output device and the video and any subtitles to other devices. You can't combine it with -f or -o.
-x
Remain open after the end of playback until explicitly signalled. When this option is enabled, the last rendered screen is kept visible until the client issues either the slay or CtrlC command to terminate mmrplay.
input_url
Name the URL of the input source. This parameter is optional if you specify -i or -o, but otherwise is required because mmrplay must be told what to play or record. The supported input sources are:
  • local files, including those on attached mediastores mounted in the filesystem
  • HTTP streams, including live broadcasts
  • RTSP or RTP sources
  • audio capture devices (microphones)
  • query results from SQL-driven databases

For information about the valid URL formats, see the mmr_input_attach() reference.

You must specify at least one the -i, -o, or input_url options. You can specify any two or all three of these options if you like.

Description:

The mmrplay utility offers a simplified means of using mm-renderer. Through command-line options, you can attach and configure an input and one or more outputs, start playback at a certain position and speed, and print event data and plugin information.

You can name only one input but this input can be a playlist if you want to play multiple tracks in sequence (this is done by specifying the -t playlist option). You can name either one file output or a combination of audio, video, and subpicture outputs (but not multiple outputs of the same type).

The most common mmrplay use cases are:
  • mmrplay input — play the specified audio file: create a context, attach the default audio output, attach the input, start playback, and monitor and report events until playback stops
  • mmrplay -vscreen: input — same as above, but also attach a video output
  • mmrplay -vscreen: -a "" input — same as above, but don't attach any audio output
  • mmrplay -o context — open the specified context, and monitor and report its events
  • mmrplay -f /tmp/audio.wav snd: — record audio from the default audio input (microphone) to a WAV file
  • mmrplay -i — just print information about plugins
  • mmrplay -i -o context input_url — print plugin information, open an existing context, attach a new input to it, and play it. Note that this combination of options can be risky, depending on whether the application that owns the context was designed to expect other clients to attach and detach inputs.
Note: The mmrplay utility detects basic command-line errors, such as unknown options, but doesn't validate the values given for known options. Instead, it forwards these values to mm-renderer (which validates them), then displays any parameter errors reported by mm-renderer.

After playback has started, you can't reconfigure the input or outputs or the playback itself, because mmrplay runs as a stand-alone process that doesn't accept user data or commands.

By default, mmrplay prints the event type, context state, and playback position for each received event. When given the -D option, mmrplay prints additional event details such as changed attributes, or all attributes if multiple -Ds are given. The -Q option restricts the events that get printed to include only errors and warnings.