Raspberry Pi · VLC · OSC

A video player for Pis, run from your tablet.

osc-vlc plays every video in ~/Videos, or on a USB drive, fullscreen and on a loop. Control it over the network with TouchOSC, with physical buttons, or both, and keep up to ten Pis playing in step.

TouchOSC OSC / UDP pi-1 · MASTER pi-2 · +0.02s pi-3 · -0.01s

Made for installations that run all day

Exhibitions, shop windows, stage backdrops, video walls. Set it up once, and it starts at boot and recovers from crashes without anyone touching it.

Full playback control

Play/pause, previous/next, seek, skip, scrub, speed, volume, loop modes and A-B loops.

Ready-made TouchOSC layouts

For tablets and phones. One page per Pi, up to 10, plus an ALL page that controls them at once.

Sync & LOCK

One button lines every Pi up on the same frame. LOCK keeps them within about 0.05 s with tiny speed changes.

USB drives

Plug in a drive with videos and it plays those instead, until it's pulled out again. Safe to pull at any time.

Hardware controls

GPIO buttons and a rotary encoder for seeking, working alongside TouchOSC.

Every Pi, Zero to 5

Desktop or Lite mode, picked for your model. Warns in the log about videos your Pi can't decode smoothly.

Quick install

On a Pi running Raspberry Pi OS (desktop or Lite), as your normal user. Not with sudo: the installer asks for your password itself when it needs it.

Get the player onto the Pi

In a terminal or over SSH. (No internet on the Pi? Copy the osc-vlc folder to its home folder instead.)

sudo apt install -y git
git clone https://github.com/bzsqrl/osc-vlc.git ~/osc-vlc

Run the installer

It installs VLC and Python packages, sets up autostart, and picks Desktop or Lite mode for your Pi.

cd ~/osc-vlc
bash install.sh

Add videos

Put them in ~/Videos or on a USB drive. They play in alphabetical order, so number them: 01-intro.mp4, 02-main.mp4…

Reboot

The player starts fullscreen and loops the whole playlist. The installer prints your TouchOSC settings at the end.

sudo reboot

Updating later

On one Pi:

cd ~/osc-vlc && git pull && bash install.sh

Or every Pi at once, from your computer (WSL, Linux or macOS):

bash update_pis.sh

Desktop or Lite?

  • Pi Zero, 2 and 3: Lite mode. Video goes straight to the screen, smooth on every model.
  • Pi 4 and 5: Desktop mode if the desktop is installed, otherwise Lite.
  • Switch any time with bash install.sh --lite or --desktop.

Connect TouchOSC

Open osc_vlc_player.tosc (tablet) or osc_vlc_player_phone.tosc (phone) in TouchOSC, and give each Pi its own connection. Every Pi uses the same install with no per-Pi settings.

ConnectionHostSend portReceive port
1first Pi's IP90009001
2second Pi's IP90009002
……9000…
10tenth Pi's IP90009010
  • ALL page: every button goes to all players at once, with a status line for each.
  • Pages 1–10: the full set of controls for one player, with its hostname, video, time, loop mode and lock state.
  • Find a Pi's IP with hostname -I on the Pi.
  • Phone layout: one column, with a big PLAY / PAUSE in the middle and thumb-sized buttons.

Several screens, one moment

Works with any mix of videos, formats and lengths, and reaches every player on the local network.

SYNC

Every player pauses and jumps to the master's time. 1.5 seconds later, once they've all finished seeking, they start together. Press it once to line them up; they then run on their own.

LOCK

The master sends its position once a second. A follower that drifts more than 0.05 s plays 1–2% faster or slower until it's back in step. No jumps, and the sound keeps its pitch.

MASTER +0.03s WAITING TOO FAR OFF

Pi models and video formats

The same files work on every model. What differs is what each can decode smoothly, so encode for the oldest Pi that will play your videos.

ModelBest formatLimit
Pi Zero / Zero WH.264, 1080p30, Lite modeThrough the desktop, far too slow
Pi Zero 2 W, 2, 3 / 3B+H.264, 1080p30, ≤ 20 MbpsNo HEVC / H.265
Pi 4 / 400HEVC up to 4K60, level 5.1, ≤ 60 Mbps; or H.264 up to 1080p60HEVC above level 5.1 can crash VLC
Pi 5 / 500Same as Pi 4H.264 decoded by the CPU (fine to 1080p60)

Ready-to-paste ffmpeg commands for each are in the README.

OSC reference

Building your own layout, or driving it from QLab, Max, or any OSC app? Send to port 9000.

AddressAction
/togglePlay / pause
/playPlay. From stopped, re-reads the videos first
/pause · /stopPause · Stop
/next · /prevNext · previous video
/ab/a · /ab/b · /ab/clearA-B loop: set A, set B and start looping, clear
/syncLine every player up on this one
/sync/lockLOCK on / off with this player as master
/quitQuit the player

GPIO pin-outs, player settings and troubleshooting are all in the full README.