Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A pure Python library to receive motion capture data from OptiTrack Streaming Engine

Project Description

A pure Python library to receive motion capture data from OptiTrack Streaming Engine.

OptiTrack is a line of motion capture products by NaturalPoint. Their software can broadcast motion capture data via a documented binary protocol. It is supposed to be used together with the proprietary NatNet SDK, which, unfortunately, is not available for Python, nor cannot be used with free toolchains (GCC, Clang). OptiRX is based on the direct depacketization example from the SDK and does not use NatNet SDK.


pip install optirx


Tracking Tools 2.5.0; Motive 1.5.x (NatNet, 1.7.x (NatNet, 1.9.0 (NatNet


Assuming that Tracking Tools or Motion runs on the same machine and broadcasting is enabled on the local network interface (not the loopback), this code receives and prints all data frames:

import optirx as rx

dsock = rx.mkdatasock()
version = (2, 9, 0, 0)  # NatNet version to use
while True:
    data = dsock.recv(rx.MAX_PACKETSIZE)
    packet = rx.unpack(data, version=version)
    if type(packet) is rx.SenderData:
        version = packet.natnet_version
    print packet


  • use VRPN streaming protocol.
  • use Matlab or Microsoft toolchains.
  • use PyNatNet and NatNet SDK



Release History

This version
History Node


History Node


History Node


Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting