2012-01-29 19:36:24 +01:00
2012-01-27 20:02:06 +01:00
2012-01-28 02:43:15 +01:00
2012-01-28 01:57:37 +01:00

SyncPlay

Solution to synchronize video playback across many instances mplayer and media player classic

Motivation

Watching videos with friends and commenting them live on IRC or Mumble

Solution

One of the users sets up a server. It keeps track of clients's playback position and paused status.

Client connecting to the server identifies itself with some name (user nickname for example) so other peers will know who connected/started/paused playback. After identifying server sends current state: is movie paused, on what position it currently is, and who was the last one to change playback state. Client also receives current state after sending his own state update, after global state change and after other client update (with predefined shortest time between messages). Every some predefined period of time client sends its own state. If global state is paused, and his is playing (or other way around), and he was the last one to change the global state (or few seconds passed since then), state is changed and broadcasted to connected clients.

(tbc)

Protocol

Protocol is line-based. First word is "command", the rest are the command arguments, space-separated.

Client to server

iam name

Client identifies itself with a name. After sending this line he receives from server state line, and can send other commands.

state playback_state position

playback_state can be either playing or paused, positon is fixed point integer - playback position in seconds with two fraction digits. Value 1200 equals 12 seconds.

(tbc)

Server to client

state playback_state position [name]

Similar to client's state command, with exception of optional name at the end - clients may use it to display who paused/resumed playback.

(tbc)

TODO

  1. Implement seek
  2. Implement "knowing" what filename is played
  3. Implement client side
  4. Implement mplayer master
  5. Implement mpc client
Description
Client/server to synchronize media playback on mpv/VLC/MPC-HC/MPC-BE on many computers
Readme Apache-2.0 21 MiB
2024-11-17 13:19:02 -08:00
Languages
Python 94.7%
Lua 4.2%
Shell 0.8%
Makefile 0.3%