{"id":18452021,"url":"https://github.com/SoMuchForSubtlety/f1viewer","last_synced_at":"2025-04-08T02:33:14.394Z","repository":{"id":34602733,"uuid":"172405812","full_name":"SoMuchForSubtlety/f1viewer","owner":"SoMuchForSubtlety","description":"🏎️ TUI for F1TV","archived":true,"fork":false,"pushed_at":"2023-01-06T04:03:20.000Z","size":21559,"stargazers_count":754,"open_issues_count":32,"forks_count":66,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-01T17:07:02.848Z","etag":null,"topics":["f1","f1tv","formula1","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoMuchForSubtlety.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-25T00:06:02.000Z","updated_at":"2024-09-17T20:21:31.000Z","dependencies_parsed_at":"2023-01-15T08:01:56.899Z","dependency_job_id":null,"html_url":"https://github.com/SoMuchForSubtlety/f1viewer","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoMuchForSubtlety%2Ff1viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoMuchForSubtlety%2Ff1viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoMuchForSubtlety%2Ff1viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoMuchForSubtlety%2Ff1viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoMuchForSubtlety","download_url":"https://codeload.github.com/SoMuchForSubtlety/f1viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223300438,"owners_count":17122609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["f1","f1tv","formula1","go","golang"],"created_at":"2024-11-06T07:29:53.548Z","updated_at":"2024-11-06T07:29:58.900Z","avatar_url":"https://github.com/SoMuchForSubtlety.png","language":"Go","funding_links":[],"categories":["Go","Formula 1"],"sub_categories":["Archived / Historical Projects"],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/SoMuchForSubtlety/f1viewer)](https://goreportcard.com/report/github.com/SoMuchForSubtlety/f1viewer)\n![](https://github.com/SoMuchForSubtlety/f1viewer/workflows/Test/badge.svg)\n\n# f1viewer\n\n![preview image](https://user-images.githubusercontent.com/15961647/107859733-c6a8a900-6e3b-11eb-82b8-5b1ee0a16297.png)\n\n## Table of Contents\n\n* [Installation](#Installation)\n* [Login](#Login)\n* [FAQ](#Faq)\n* [Config](#Config)\n* [Custom Commands](#Custom-commands)\n* [Multi Commands](#Multi-commands)\n* [Live Session Hooks](#Live-session-hooks)\n* [Key Bindings](#Key-bindings)\n* [Logs](#Logs)\n* [Credentials](#Credentials)\n\n## Installation\n\n**Note:** You also need a compatible player installed, you can find a list [here](https://github.com/SoMuchForSubtlety/f1viewer/wiki/Players-Supported-by-Default).\n\n## compile form source\nInstall the go compiler, then run the following commands\n```bash\ngit clone https://github.com/SoMuchForSubtlety/f1viewer \u0026\u0026 cd f1viewer\ngo build .\n```\n\n### Windows\n* Download [the latest release directly](https://github.com/SoMuchForSubtlety/f1viewer/releases/latest)\n* Or install with [chocolatey](https://chocolatey.org/packages/f1viewer/) \n\n### macOS\n* You can install f1viewer with Homebrew (recommended)\n\t```bash\n\tbrew tap SoMuchForSubtlety/tap\n\tbrew install SoMuchForSubtlety/tap/f1viewer\n\t```\n* Or [download the binary directly](https://github.com/SoMuchForSubtlety/f1viewer/releases/latest)\n\n### Debian and Ubuntu\nDownload the latest release `.deb` [file](https://github.com/SoMuchForSubtlety/f1viewer/releases/latest)\n\n### Fedora, openSUSE, CentOS\n * Install from the f1viewer [copr repo](https://copr.fedorainfracloud.org/coprs/somuchforsubtlety/f1viewer/)\n\n   ```bash\n   sudo dnf install dnf-plugins-core\n   sudo dnf copr enable somuchforsubtlety/f1viewer\n   sudo dnf install f1viewer\n   ```\n\n * Or download the latest release `.rpm` [file](https://github.com/SoMuchForSubtlety/f1viewer/releases/latest)\n\n### Arch\nInstall the f1viewer [AUR package](https://aur.archlinux.org/packages/f1viewer/).\n\n### Any other Linux distribution\n* Download the binary [directly](https://github.com/SoMuchForSubtlety/f1viewer/releases/latest)\n* Or install it with [Homebrew](https://docs.brew.sh/Homebrew-on-Linux) as described in the [macOS](#macOS) section.\n\n## Login\nLogin via email and password is currently broken dues to anti-bot measures from F1TV. Follow [these steps](https://github.com/SoMuchForSubtlety/f1viewer/wiki/Getting-your-subscription-token) to log in with your subscription token.\n\n## FAQ\n#### why is there a login, what credentials should I use\nYou need an F1TV account created with an IP in a country that has F1TV pro. Use your F1TV account email and password to log in. You can use the tab key to navigate the login form.\n#### when I try to play something I get a 4xx error\nYou need to be logged in and in a country that has F1TV pro. If you get the error but think your account should be able to play the selected content please open an issue.\n#### f1viewer is not showing a live session / loading very slowly\nThis can happen if the F1TV servers are overloaded. There is nothing I can do to fix this.\nStart your stream as soon as possible at the start of the session and you can usually avoid this.\n#### The player starts but then has some issue / error\nPlease make sure you are using the latest version of the player. If you use Windows please download MPV from [here](https://sourceforge.net/projects/mpv-player-windows/files/). Generally once an external program is started f1viewer is done and you should consult the external program's documentation for troubleshooting. \n#### No players are detected\nPlayers need to be in your PATH environment variable to be detected by f1viewer.\n\n## Config\nWhen you first start f1viewer a boilerplate config is automatically generated. On Widows systems it's located in `%AppData%\\Roaming\\f1viewer`, on macOS in `$HOME/Library/Application Support/f1viewer` and on Linux in `$XDG_CONFIG_HOME/f1viewer` or `$HOME/.config/f1viewer`. You can access it quickly by running `f1viewer -config`.\n\n## Custom Commands\nYou can execute custom commands, for example to launch a different player. These are set in the config under `custom_playback_options` in the config file. You can add as many as you want.\n```toml\n[[custom_playback_options]]\n  command = [\"ffmpeg\", \"-hide_banner\", \"-loglevel\", \"error\", \"-i\", \"$url\", \"-c\", \"copy\", \"-f\", \"mp4\", \"$title.mp4\"]\n  proxy   = true\n  title   = \"Download as mp4\"\n```\n\n`title` is the title. It will appear next to the standard `Play with MPV` and `Copy URL to clipboard`.\n\n`command` is where your command goes. It is saved as a list of args like in the examples above. Every argument should be a separate string! The following would be incorrect! `[\"ffmpeg\", \"-i $url\", \"-c copy\", \"$title.mp4\"]`\n\n`proxy` sends http requests through a proxy if they require cookies. This is useful for commands that use ffmpeg (and by extension mpv).\n\nThere are several placeholder variables you can use that will be replaced by f1viewer.\n\n - `$url`: the content's URL\n - `$category`: the content's category (eg. \"Documentary\")\n - `$season`: the season's year (eg. \"2021\")\n - `$event`: the event (eg. \"Belgian Grand Prix\")\n - `$session`: the session (eg. \"F1 Practice 3\")\n - `$perspective`: the perspective (eg. \"F1 Live\", \"Kimi Räikkönen\", etc.)\n - `$title`: the conten's title as reported by F1TV\n - `$filename`: the same as title, but with illegal characters removed\n - `$series`: \"Formula 1\", \"Formula 2\", etc.\n - `$country`: the country an event is held in\n - `$circuit`: the circuirt and event is held at\n - `$time`: the time of the session in RFC3339 format (`$year`, `$month`, `$day`, `$hour` and `$minute` are also available)\n - `$date`: the date of the session in ISO 8601 format\n - `$ordinal`: the ordinal numer of the event\n - `$episodenumber`: the episode number as reported by F1TV\n - `$json`: all metadata fields and the full source metadata from F1TV\n - `$lang`: the preferred languages as a comma separated list\n\nIf you have ideas for more variables feel free to open an issue.\n\n**Tip**: To get Windows commands like `echo`, `dir`, etc. to work, you'll need to prepend them with `\"cmd\", \"/C\"`, so for example `[\"echo\", \"hello\"]` turns into `[\"cmd\", \"/C\", \"echo\", \"hello\"]`\n\n## Multi Commands\nTo make it easy to load the same feeds with the same commands every time, you can map multiple commands to one action. The `match_title` variable will be used to match the session feeds (it also allows regex). For example, if `match_title` is `Lando Norris`, it will load any feed with that name, with the given command.\nYou can specify commands directly with `command`, or reference one of your [custom commands](#custom-command) titles with `command_key`.\n\nFor an explanation on the `command` variable, see [Custom Commands](#custom-commands)\n\n```toml\n[[multi_commands]]\n  title = \"Open F1 Live and HAM onboard\"\n\n  [[multi_commands.targets]]\n    command     = [\"mpv\", \"$url\", \"--alang=$lang\"] # define a command to execute\n    match_title = \"F1 Live\"\n\n  [[multi_commands.targets]]\n    command_key = \"custom mpv\"      # you can also reference previously defined custom commands\n    match_title = \"Lewis [a-zA-Z]+\" # regex is also supported\n```\n\n## Live Session Hooks\nLive session hooks work like multi commands, but they are automatically started when a new live session is detected.\n\n```toml\n[[live_session_hooks]]\n  title = \"Open Pit Lane and Data Channel\"\n\n  [[live_session_hooks.targets]]\n    command     = [\"mpv\", \"$url\", \"--alang=$lang\", \"--quiet\"] # define a command to execute\n    match_title = \"Pit Lane\"\n\n  [[live_session_hooks.targets]]\n    command_key = \"custom mpv\"      # you can also reference previously defined custom commands\n    match_title = \"Data Channel\"\n```\n\n## Key Bindings\n* arrow keys or `h`, `j`, `k`, `l`.  \n* `tab` to cycle through the login form fields\n* enter to select / confirm\n* `q` to quit\n\n## Logs\nBy default f1viewer saves all info and error messages to log files. Under Windows and macOS they are save in the same directory as the config file, on Linux they are saved to `$HOME/.local/share/f1viewer/`. You can access them quickly by running `f1viewer -logs`.\nSaving logs can also be turned off in the config.\n\n## Credentials\nYour login credentials for F1TV are not saved in the config file. On macOS they are stored in the keychain and on Windows the credential store is used. If you're using Linux, where they are saved depends on your distro. Generally [Pass](https://www.passwordstore.org/), [Secret Service](https://specifications.freedesktop.org/secret-service/latest/) / [GNOME Keyring](https://wiki.gnome.org/Projects/GnomeKeyring) and KWallet are supported.\nIf it does not work on your distro or you encounter any problems please open an issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSoMuchForSubtlety%2Ff1viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSoMuchForSubtlety%2Ff1viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSoMuchForSubtlety%2Ff1viewer/lists"}