Skip to main content

A Python package and MCP server to control video players for MultiViewer, the best way to watch motorsports like Formula 1.

Project description

A Python package and command line interface to control video players for MultiViewer For F1, the best way to watch Formula 1.

https://dl.circleci.com/status-badge/img/gh/RobSpectre/mvf1/tree/main.svg?style=svg https://codecov.io/gh/RobSpectre/mvf1/branch/main/graph/badge.svg?token=L5N96KXN2V Documentation Status

Table of Contents

Features

Installation

The latest version can be installed via pip.

$ pip install mvf1

Quickstart

Command Line

$ mvf1-cli --help

Library

Displaying all players

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> remote.players
[6: INTERNATIONAL, 7: PER]

Pause all players

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> for player in remote.players:
>>>     player.mute()
{'data': {'playerSetMuted': True}}
{'data': {'playerSetMuted': True}}

Retrieve specific player

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> player = remote.player(6)
>>> player.state
{'ts': 1677168293.21, 'paused': False, 'muted': True, 'volume': 100, 'live': False, 'currentTime': 10.002025, 'interpolatedCurrentTime': 363.656025}

Switch stream of player to data channel

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> player = remote.player(6)
>>> player.switch_stream('DATA')
{'data': {'playerCreate': '12'}}

Synchronize all players to specific player

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> player = remote.player(6)
>>> player.sync()
{'data': {'playerSync': True}}

Synchornize all players to player streaming broadcast commentary

>>> from mvf1 import MultiViewerForF1
>>> remote = MultiViewerForF1()
>>> remote.player_sync_to_commentary()
{'data': {'playerSync': True}}

Development

Hacking

To hack on the project, clone the GitHub repo:

$ git clone https://github.com/RobSpectre/mvf1

Then install in a virtualenv.

$ pip install -e ./

Test

The project uses tox for tests. Simply run from project root

$ tox

Meta

  • Written by Rob Spectre.

  • Released under MIT License.

  • Software is as is - no warranty expressed or implied, diggity.

  • This package is not developed or maintained by MultiViewer For F1 or Formula 1 TV.

  • Shout out to the excellent MultiViewer For F1 team! This app absolutely changed how I enjoy Formula 1.

  • 🏎️ ¡Vamos Checo! 🏎️

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mvf1-2.0.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvf1-2.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file mvf1-2.0.0.tar.gz.

File metadata

  • Download URL: mvf1-2.0.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mvf1-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8cd432f2c70e441815a9c3c53fd467ab3915e9abf1f35ded2ab41e1c9f3f7949
MD5 333119462902baa86387e21fcf1936f4
BLAKE2b-256 3a1c31679f95792b0e88d55e2b7df064df66ddaab6b6cbe88160ce47b2a94250

See more details on using hashes here.

File details

Details for the file mvf1-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: mvf1-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mvf1-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fc215a94ad8a7569422730724f3a27c0680c164bcd4a20fe6607d68db9f3f6d
MD5 5670ce0fa6fe574f0c763fdeb3989b7e
BLAKE2b-256 820d52b1f4136ea0bc2dafd77c4f458aee9c41fee42eb85a30372ead28886ddc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page