Using mmrplay instead of mm-renderer

Updated: April 19, 2023

Although it conveniently abstracts the many steps required to play media through mm-renderer, mmrplay is limited in terms of the media operations that it supports.

The mmrplay utility can only play a media track or playlist and report any errors and (optionally) the playback completion. It can't accept any commands during playback to select another input or to change the playback position or speed. To support these other operations, you must either use mm-renderer directly or call its API through mmcli.

When to use mmrplay

You should use mmrplay if you want to:
  • rapidly and easily prototype a media app by enabling only basic playback, which lets you focus more on designing other app features
  • play media files by issuing a single command instead of the lengthy API call sequence needed to connect to mm-renderer, configure an output and an input, start playback, and process events

When to use mm-renderer

You shouldn't use mmrplay, but instead use mm-renderer if you want to:
  • offer the ability to pause or stop playback, to adjust the play speed, or to change playlists without interrupting playback
  • reuse the same context for multiple playback operations so that you don't have to redefine the context parameters
  • support configuration of individual playlist tracks
  • customize how playback events and errors are handled and reported