A Python package to control video players for MultiViewer for F1, the best way to watch 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.
Table of Contents
Features
Command line interface for controlling MultiViewer For F1. Useful for integrations with control interfaces like StreamDeck
Pythonic interface for controlling MultiViewer For F1. No GraphQL needed!
black Praise the Dark Lord
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mvf1-1.1.4.tar.gz
.
File metadata
- Download URL: mvf1-1.1.4.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/5.2.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0288f81e710d16238bf17f8bdeeeafc440528cdd5e8aeae0862231252982f81 |
|
MD5 | f1a23773f0501d342ebf26679fd9a6d1 |
|
BLAKE2b-256 | 4796b66f5aa470c0e994e6b5d545dec510bb8c1e7501d8947d534ad1903825df |
File details
Details for the file mvf1-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: mvf1-1.1.4-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/5.2.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87890dbb1ad228e6eef507da7d99e767a5fa37866ba675f01a06972a1d24266d |
|
MD5 | 3d557cac3ca813b087f9394eed570dd2 |
|
BLAKE2b-256 | fcc5148e4d2e4b7676c67e60316afa77f2a87eb20da99db92fa182afc594c383 |