Skip to main content

Overview

FastF1’s live timing module allows you to connect to Formula 1’s live timing data stream during sessions and record the data for later analysis. The data is streamed over the SignalR protocol.
Live timing data can only be recorded during a live session, not used in real-time for analysis. After recording, you can load and analyze the data using FastF1’s standard API.

SignalRClient

Client for receiving and recording F1 timing data streamed live via SignalR.

Constructor

Parameters

str
required
Filename (optionally with path) for the output file where data will be saved.
str
default:"'w'"
File mode for writing:
  • 'w': Overwrite existing file
  • 'a': Append to existing file (useful if client restarts during a session)
bool
default:"False"
Debug mode is no longer supported and will raise a ValueError if set to True.
int
default:"60"
Number of seconds after which the client automatically exits when no message data is received. Set to 0 to disable timeout.
logging.Logger | None
default:"None"
Custom logger instance. If None, errors are logged to console using default configuration.
bool
default:"False"
If True, attempts to connect without authentication. May only work for some sessions or return partial/empty data.
Authentication is recommended for complete data access.

start()

Connect to the live timing stream and start recording data to file.
This method blocks until:
  • The session ends
  • Timeout is reached (if configured)
  • User interrupts with Ctrl+C

Example

Connection URL and Topics

The client connects to:
And subscribes to these data topics:
  • Heartbeat - Connection heartbeat
  • AudioStreams - Audio stream information
  • DriverList - List of drivers in session
  • ExtrapolatedClock - Session time extrapolation
  • RaceControlMessages - Race control messages (flags, investigations, etc.)
  • SessionInfo - Session metadata
  • SessionStatus - Session status (started, finished, etc.)
  • SessionData - General session data
  • TeamRadio - Team radio messages
  • TimingAppData - Timing app data
  • TimingData - Lap timing data
  • TimingStats - Timing statistics
  • TrackStatus - Track status (yellow flags, SC, VSC, red flags)
  • WeatherData - Weather information
  • Position.z - Car position data (compressed)
  • CarData.z - Car telemetry data (compressed)
  • ContentStreams - Content stream information
  • TopThree - Top 3 classification
  • RcmSeries - Race control message series
  • LapCount - Current lap count

LiveTimingData

Data object for loading and accessing recorded live timing data.

Constructor

Parameters

str
One or more filenames of recorded live timing data. Files should be in chronological order but may overlap.
If files overlap (e.g., last 5 minutes of file1 match first 5 minutes of file2), duplicates are automatically removed during loading.

load()

Read all files, parse the data, and organize it by category.
Usually not called manually - automatically invoked when you first call get(), has(), or list_categories().

get()

Return data for a specific category.

Parameters

str
required
Name of the data category (e.g., ‘TimingData’, ‘Position.z’, ‘WeatherData’)

Returns

List of [timedelta, message_data] pairs for that category
Automatically calls load() on first access.

has()

Check if data exists for a specific category.

Parameters

str
required
Name of the category to check

Returns

bool - True if category exists, False otherwise
Automatically calls load() on first access.

list_categories()

List all available data categories in the loaded files.

Returns

list[str] - List of category names
Automatically calls load() on first access.

Properties

tuple[str]
Tuple of filenames that were provided to the constructor
dict
Dictionary of parsed data, organized by category. Each category contains a list of [timedelta, message] pairs.
int
Number of JSON parsing errors encountered while loading data

Complete Workflow

Recording Live Data

Loading Recorded Data

After recording, load the data with FastF1’s standard API:

Multiple Files

If you recorded data in multiple files (e.g., due to connection issues), you can load them all:

Inspecting Data Categories

Advanced Usage

Custom Logger

Append Mode (Resume Recording)

No Authentication (Limited Data)

Data Format

Recorded data is saved as text with one message per line:
Each line is a JSON array with:
  1. Category name (string)
  2. Message data (object)
  3. Timestamp (ISO 8601 string)
The format is not meant for direct consumption. Use LiveTimingData to load and parse it.

Helper Functions

messages_from_raw()

Extract data messages from raw recorded SignalR data (debug mode format, no longer used).

Parameters

Iterable
required
Iterable containing raw SignalR response data

Returns

tuple[list, int] - List of extracted messages and error count
This is primarily for legacy debug mode data. Modern recordings don’t need this.

Examples

Basic Live Recording

Load and Analyze Recorded Data

Record with Auto-Timeout

Troubleshooting

  • Ensure you’re connecting during a live F1 session
  • Try without no_auth=True (authentication may be required)
  • Check your internet connection
  • Check F1’s live timing is actually active
Increase the timeout value:
Some parsing errors are normal, but if errorcount is very high:
  • Check if the file was corrupted
  • Ensure recording completed successfully
  • Try re-recording the session
Loading and parsing live timing data can take time for long sessions. This is normal. The data is automatically cached after the first load.

Notes

Live timing data is only available during live sessions. You cannot connect to past sessions.
Authentication is handled automatically via F1’s auth system. You may need to be in a region where F1 TV is available.
Recorded data can be large for full race sessions (10-100 MB). Ensure you have adequate storage.
The SignalR client is not multithreading-safe. Don’t run multiple clients simultaneously in threads.

See Also

  • Live Timing Guide - Comprehensive guide with examples
  • Cache - Caching works with loaded live timing data
  • Session - Use session.load(livedata=...) to load recorded data