Starting the mm-stream server

Updated: April 19, 2023

Most likely, you'll want to start mm-stream in an automated way during bootup, so your system is ready to stream media content at any time. Sometimes, though, you may want to run the service manually.

To run mm-stream, you must prepare a configuration file. This required file specifies which plugins the server should load as well as the settings for those plugins. Details about the syntax used in this file are given in the Configuration syntax section.

On the command line, you must provide the -c option followed by the configuration file path:

mm-stream -c /etc/mm/mm-stream.json

The mm-stream server requires a configuration file because it must know the default settings for plugins. These default settings are used when an application or user issues a command to an instance for which no specific configuration data have been given.

You can add the mm-stream startup command to your system's startup script, so that your control programs can begin streaming content as soon as possible after the system boots. Occasionally, you may have to manually run mm-stream; for example, if the process crashes or if you're debugging a program and you want to apply your changes to the default settings without rebooting the system.

Before trying to run mm-stream manually, always confirm that the service isn't already running by checking the list of active processes with pidin or ps. If you suspect that mm-stream has stopped responding and want to terminate its process, you can first try the slay mm-stream command. This makes the service attempt some cleanup before exiting. But if a serious error has made the service lock up, most likely that initial command won't work. In this case, you should use slay -s mm-stream or kill -9 pid.