mcap-codec-support
High-performance decoder and encoder factories for robotics data in MCAP files. It supports regular ROS2 CDR messages, H.264/H.265/VP9/AV1 video, and Cloudini/Draco point clouds.
Install all decoding backends:
uv add "mcap-codec-support[all]"
The base package contains shared protocols and schema helpers and imports without loading any codec backend. Install only the capability needed:
| Extra | Enables |
|---|---|
ros2 |
Fast generic ROS 2 CDR decoding |
video |
Video/image codecs and VideoDecompressFactory |
pointcloud |
Cloudini point-cloud codecs and decoder factories |
draco |
Draco point-cloud codecs |
all |
Combined decoder factory and every backend |
Video, point-cloud, and Draco extras remain separate because their compiled dependencies account for most of the download and installed footprint.
JPEG compression inputs are decoded independently with strict PyAV validation.
Each image uses a fresh decoder and must define the quantization tables its scans
reference; tables from earlier images are never inherited. Standard MJPEG Huffman
defaults remain supported.
Malformed JPEGs raise CorruptImageError; missing dependencies and encoder failures
remain VideoEncoderError. The FFmpeg backend receives validated RGB pixels, so
a damaged JPEG cannot consume bytes from the next image. GStreamer validates each
JPEG before handing it to the hardware pipeline. Install the video extra for all
three compression backends, including ffmpeg-cli and gstreamer.
FFmpeg CLI operations prefer ffmpeg and ffprobe on PATH. When missing,
portable-ffmpeg (included in the video extra) downloads and caches the binaries
on first use. The GStreamer hardware path does not discover or download FFmpeg;
FFmpeg is used only if it needs a software fallback after a hardware failure.
After both encoders fail, the topic's encoder session reports one error and stops
encoding until the session is recreated.
Read every supported message type with small-mcap:
from mcap_codec_support import create_decoder_factories
from small_mcap import read_message_decoded
with open("input.mcap", "rb") as stream:
messages = read_message_decoded(
stream,
decoder_factories=create_decoder_factories(video_format="raw"),
)
for message in messages:
print(message.channel.topic, message.decoded_message)
video_format="raw" produces ROS-like Image dataclass instances.
video_format="compressed" produces JPEG CompressedImage instances.
Compressed point clouds are returned as PointCloud2 instances. Their fields
use the same attribute access as messages from the generic ROS2 decoder. All
other ROS2 messages use the fast CDR decoder.
Use CompressedPointCloudDecoderFactory or Pointcloud2DecoderFactory when a
structured NumPy array is preferred over a ROS-like message.
For more control, compose the individual VideoDecompressFactory,
PointCloudDecompressFactory, and ROS2 DecoderFactory instances yourself.
Keep specialized factories before the general ROS2 factory.
Metadata
Release files for mcap-codec-support 0.18.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcap_codec_support-0.18.0.tar.gz | 42.2 kB | Without provenance | Details for mcap_codec_support-0.18.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcap_codec_support-0.18.0-py3-none-any.whl | Python 3 | none | any | Details for mcap_codec_support-0.18.0-py3-none-any.whl |
Total release size: 96.1 kB
Release files / mcap_codec_support-0.18.0.tar.gz
| Download URL | mcap_codec_support-0.18.0.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5880e769d35ada76ecdb3ebcc5d393b2c2c2bdd173dc0fe08a3d1e80dad5412f
|
|
BLAKE2b-256 checksum How to use checksums |
945ba2592600c3aa82d3f3da7806f72e1ba889872e46c5298d1cb9e4f28bdd3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mcap_codec_support-0.18.0-py3-none-any.whl
| Download URL | mcap_codec_support-0.18.0-py3-none-any.whl |
|---|---|
| Size | 53.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa637ad92cc2be66be4c1cfee1691668d762fb8734a7f9dd54645d760f43a6f6
|
|
BLAKE2b-256 checksum How to use checksums |
dc82358ea52195a4f341a8c3f89287d7699e4f7309cce8c7eeca10dae021cb8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mcap-codec-support 0.18.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.