Metadata-Version: 2.4
Name: mcap2handvideo
Version: 0.1.0
Summary: Export MCAP camera frames to MP4 with hand tracking skeleton overlays
Author: mcap2handvideo
License-Expression: MIT
Keywords: mcap,robotics,hand-tracking,opencv,video
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcap>=1.1.1
Requires-Dist: av>=12.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: opencv-python>=4.8.0
Requires-Dist: protobuf==4.25.1
Requires-Dist: scipy>=1.10.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

# mcap2handvideo

将 MCAP 文件中的相机视频帧导出为 MP4，并在图像上叠加 hand tracking 骨骼投影。

## 安装

```bash
pip install mcap2handvideo
```

环境要求：Python 3.10 ~ 3.12，macOS / Linux / Windows。

## 快速开始

**单个 MCAP 文件：**

```bash
mcap2handvideo --input /path/to/bag.mcap --output ./output
```

**批量处理（目录下多个 `.mcap`）：**

```bash
mcap2handvideo --input /path/to/mcap_dir --output ./output
```

## 常用参数

| 参数 | 默认值 | 说明 |
|---|---|---|
| `--input` | 必填 | `.mcap` 文件路径，或包含多个 `.mcap` 的目录 |
| `--output` | `./output` | MP4 输出目录 |
| `--cameras` | `2` | 相机编号，逗号分隔 |
| `--hand-topics` | `/robot0/handtracking/left,/robot0/handtracking/right` | HandPointFrameInfo 叠加话题 |
| `--fps` | 自动 | 输出视频帧率 |
| `-v`, `--verbose` | 关闭 | 输出详细日志 |

## 输出说明

- 默认导出 **camera2** 的 MP4：`camera2_hand_overlay.mp4`
- 批量模式下每个 MCAP 在输出目录下按文件名创建子目录
- 若缺少 camera 帧、标定、robot0 位姿或配置的 hand tracking 话题，程序会报错并立即停止
