Skip to main content

A tool to convert ROS topics recored with mcap to MP4 file

Project description

mcap-to-mp4

A tool to convert ROS topics recored with mcap to MP4 file

Requirements

  • Python3
    • mcap
    • mcap-ros2-support
    • poetry
    • pillow
    • numpy
    • imageio
  • ffmpeg

QuickStart

pip

# Install
pip install mcap-to-mp4
# Run
mcap-to-mp4 $path_to_the_mcap_file -t $topic_name -o $outputfilename

Docker

# Build
git clone https://github.com/Tiryoh/mcap-to-mp4.git
docker build -t tiryoh/mcap-to-mp4 .
# Run
docker run --rm -it -v "${PWD}:/works" tiryoh/mcap-to-mp4 $path_to_the_mcap_file -t $topic_name -o $outputfilename

Usage

pip

Install the package from PyPI

pip install mcap-to-mp4

Install the pacakge from source (optional)

# optional
git clone https://github.com/Tiryoh/mcap-to-mp4.git
pip install -e .

Download sample mcap rosbag2 file

wget "https://drive.usercontent.google.com/download?id=1TxKxq-SN_9ryiFxH6kQG07Gy90_bpnWW&confirm=xxx" -O "realsense_rosbag2.zip"
unzip realsense_rosbag2.zip

Run

mcap-to-mp4 ./rosbag2_2024_02_18-23_35_48/rosbag2_2024_02_18-23_35_48_0.mcap -t /camera/color/image_raw -o output.mp4

Docker

Install the package

git clone https://github.com/Tiryoh/mcap-to-mp4.git
docker build -t tiryoh/mcap-to-mp4 .

Download sample mcap rosbag2 file

wget "https://drive.usercontent.google.com/download?id=1TxKxq-SN_9ryiFxH6kQG07Gy90_bpnWW&confirm=xxx" -O "realsense_rosbag2.zip"
unzip realsense_rosbag2.zip

Run

docker run --rm -it -v "${PWD}:/works" tiryoh/mcap-to-mp4 ./rosbag2_2024_02_18-23_35_48/rosbag2_2024_02_18-23_35_48_0.mcap -t /camera/color/image_raw -o output.mp4

License

Copyright 2024 Daisuke Sato

This repository is licensed under the MIT license, see LICENSE.
Unless attributed otherwise, everything in this repository is under the MIT license.

Related Projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcap_to_mp4-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcap_to_mp4-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file mcap_to_mp4-0.1.1.tar.gz.

File metadata

  • Download URL: mcap_to_mp4-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mcap_to_mp4-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5cf3c98903da5a36a30c865b96a84cbba88a391c121efdb0ba738bb8b714c156
MD5 12c2cb7040e6ab2e13a0827cac3c8167
BLAKE2b-256 944edbe283cac617bf512d7c0fe23f3e96f7c8955ee6a0a765c5d1eebe21084b

See more details on using hashes here.

File details

Details for the file mcap_to_mp4-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mcap_to_mp4-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mcap_to_mp4-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ccd69715cff9cfcb293097355f5967e9af8662e7092c99f7e2a3ed3a6a49a5b
MD5 a7d160d62c0303e291296da31300db05
BLAKE2b-256 b2857b391b00e24ae29ae4d18fba845bbaa4a3d88e403140322071324abe9272

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page