Playback

Preparing your files

Mπ4 works best with video files encoded as H.264. Always test your files on the Pi you will use.

Raspberry PiVideo
All modelsH.264, up to 1080p30
Pi 4 and Pi 5Should handle up to 4K30 or 1080p60

Any aspect ratio will work. Pillarbox or letterbox bars are added automatically if your content does not match the native resolution of the display.

HDMI or composite

Mπ4 detects if an HDMI display is connected during boot. If no valid EDID is detected, it assumes analog output is desired and outputs over composite only.

Always connect the HDMI display before powering on the Pi.

Sync and video walls

Synchronised playback

Mπ4 supports synchronised playback of multiple players over an Ethernet connection. To set it up:

  1. Connect all players to the same router or switch. If no router is detected, the players assign themselves an IP address.
  2. Configure one Pi as "Player". This is the main player that all others sync to.
  3. Configure all other Pis as "Sync Follower".
  4. Make sure every player has a file of the same length.

The sync followers adjust their playback to fall in line with the main player.

If no main player is detected, sync followers start playing unsynchronised when booted. They jump to the correct time as soon as a main player comes online, so the boot order of the Pis does not matter.

Sync groups

To run multiple independent sync groups on the same network without interfering, set a "SyncId" in the settings file. Sync followers with a SyncId only synchronise with players that have the same ID. Each sync group needs one main player and any number of followers.

Pis configured as sync followers ignore all control triggers. To control a synchronised group, send commands to the main player.

Control

Mπ4 has three ways to control the player: directly via GPIO connected triggers, via the built-in web page, or over OSC.

GPIO

The Settings Generator has a section to assign triggers to specific GPIO pins, and generates a pin map for you. 17 GPIO pins can be assigned. All GPIO pins are configured with pull-up resistors and need to be connected to GND to be triggered.

When assigning a trigger to play a specific video file, include the full file name with extension: "video1.mp4", not just "video1".

Web interface

Each player serves a basic web page to monitor status, seek, trigger playback and view the playlist. Open it at the IP address of the player, on port 8080: http://<ip-address>:8080

OSC

Triggers can also be sent over OSC to port 8000. Wildcards are allowed in the player name.

AddressSends the command to
/mpi4/<action> [arg]All players on the network
/mpi4/<name>/<action> [arg]Only the player with that name
ActionArgumentWhat it does
playResume playback
pausePause playback
toggleSwitch between play and pause
nextGo to the next file
previousGo to the previous file
gotoindexGo to a file in the playlist by its number
seektimeJump to a position in the current file
videofilenamePlay a specific file (full file name with extension)

Status protocol

Mπ4 broadcasts player status over UDP port 5005 using the following status protocol. The packet is UTF-8 text with fields separated by pipe characters (|).

Packet format

MPI4|1|name|syncid|state|kind|index|count|pos|dur|role|file

The first two fields identify the protocol. MPI4 is the fixed protocol name, and 1 is the protocol version. Receivers should check both before interpreting the remaining fields.

Fields

FieldDescription
nameThe player name.
syncidThe SyncId used to distinguish independent sync groups.
statePlayback state: P playing, H paused, B black/idle, or N no media.
kindMedia type: V video, A audio, S still image, or - none.
indexCurrent file's index in the playlist.
countNumber of files in the playlist.
posCurrent playback position in seconds, sent to two decimal places.
durMedia duration in seconds, sent to one decimal place.
roleP for the main Player, or F for a Sync Follower.
fileCurrent file name, limited to the first 40 characters. This is the final field and may contain pipe characters.