Play Media
An action that plays audio and video. Supports most formats of local files and web streaming such as mp3, mp4, etc.
• For non-Raspberry Pi OS, additional plugin installation is required. You can install by referring to here.

[Media Player]
Select the media player to use.


[Command]
Select the command to execute.

- Play: Plays local files or web streaming.
- Pause: Pauses playback.
- Resume: Resumes paused media.
- Stop: Stops playback.
- Set Volume: Adjusts the sound volume.
- Set Speed: Adjusts the playback speed.
- Seek: Moves the media playback position.
- Get Status: Reads the current state of the media.
[Media Type]
Select the type of media. This field is only displayed when [Command] is “Play”.

- File: Plays local files stored on the controller. Supports most formats such as mp3, mp4, etc.
- Streaming: Plays from web streaming.
[File Path]
Enter the path to the local file stored on the controller. This field is only displayed when [Command] is “Play” and [Media Type] is “File”.

[Streaming URL]
Enter the URL address for streaming. This field is only displayed when [Command] is “Play” and [Media Type] is “Streaming”.

[Wait for Playback End]
Set whether to wait for actions while media is playing. If true, the action becomes “In Progress…” during play or pause state. If false, the action becomes “Complete” immediately after starting playback. This field is only displayed when [Command] is “Play”.

[Audio Analysis]
Real-time audio analysis to determine sound intensity, frequency distribution, and other audio characteristics. This field is only displayed when [Command] is “Play”.

[Analysis Data]
Configure the data for real-time audio analysis. This field is only displayed when [Audio Analysis] is checked.


> [Name]
Enter the name of the data to analyze. You can use any name.

> [Data Type]
Select the type of data to analyze.

- Overall RMS: RMS (Root Mean Square) value of all channels representing the overall sound level.
- Channel RMS: RMS (Root Mean Square) value of a specific channel representing the sound level per channel.
- Frequency Amplitude: Gets the intensity of a specific frequency in a specific channel.
- Peak Frequency Amplitude: Gets the frequency and intensity with maximum intensity in a specific channel.
- Centroid Frequency: Gets the centroid frequency in a specific channel. Centroid frequency refers to the center frequency where energy is concentrated, representing sound brightness. Higher centroid frequency produces bright and sharp sounds, while lower frequency produces dark and dull sounds.
> [Channel]
Enter the index number of the channel to analyze. Channel configuration varies according to audio samples, and typical channel numbers are as follows.
- Mono: 0
- Stereo: 0-Left, 1-Right
- 5.1 Channel: 0-Front Left, 1-Front Right, 2-Center, 3-Subwoofer, 4-Rear Left, 5-Rear Right

> [Frequency (Hz)]
Enter the frequency to analyze. Generally, the range of frequencies audible to humans is 20Hz~20000Hz.

> [Intensity (dBFS)]
Select a [Number] type variable to store the intensity. dBFS represents relative decibel values based on 0dB, which is the maximum signal level (Full Scale) in digital audio systems. Therefore, values are displayed as negative numbers, and closer to 0 means larger values. This field is only displayed when [Data Type] is “Overall RMS”, “Channel RMS”, or “Frequency Amplitude”.

> [Peak Intensity Frequency (Hz)]
Select a [Number] type variable to store the frequency with maximum intensity. This field is only displayed when [Data Type] is “Peak Frequency Amplitude”.

> [Peak Intensity (dBFS)]
Select a [Number] type variable to store the peak intensity. This field is only displayed when [Data Type] is “Peak Frequency Amplitude”.

> [Centroid Frequency (Hz)]
Select a [Number] type variable to store the centroid frequency. This field is only displayed when [Data Type] is “Centroid Frequency”.

[Volume (%)]
Enter the audio output volume as a value between 0~100%. This field is only displayed when [Command] is “Set Volume”.

[Playback Speed]
Select or directly enter the playback speed. This field is only displayed when [Command] is “Set Speed”.

[Playback Position]
Enter the playback position to move to. This field is only displayed when [Command] is “Seek”.

[Status]
Select a [Number] type variable to store the current state of the media. This field is only displayed when [Command] is “Get Status”.

The states according to variable values are as follows.
- 0: Initial state
- 1: Playing
- 2: Paused
- 3: Stopped
- 4: Playback complete
- 5: Error