A GUI tool to extract videos from a rosbag. Supports ROS 2 Jazzy with MCAP bag formats.
Looking for the ROS 1 (Melodic) version? See the
ros/melodicbranch.
- Clone the repository
git clone git@github.com:stathiw/bag2vid.git
- Add bag2vid command to bashrc
cd bag2vid/scripts
./install.sh
Build or pull the docker image:
cd bag2vid
docker compose build
or
docker pull stathiw/bag2vid:latest
After completing the install and either building or pulling the docker image, the application can be run using either
bag2vid
or
cd bag2vid
docker compose up
- Click Load Bag and select a rosbag. All camera topics are detected automatically.
- Pick a camera topic from the dropdown.
- Use Play / Pause to preview. Adjust playback rate with the speed selector.
- Drag the start and end markers on the timeline to set the clip range. Each marker shows its current timestamp.
- Click Extract Video and choose where to save the clip.
- Press Capture Screenshot at any time to save the current frame as a PNG.
This project is licensed under a Copyleft + Non-Commercial Redistribution model.
- Use it for work: Use this tool internally at your company for free.
- Modify it: Change the code to fit your needs (as long as those changes stay open-source).
- Share it: Give the code to others, provided you keep my name on it and use this same license.
- Sell it: You cannot charge people to download this software.
- SaaS it: You cannot build a website that charges people to use this software's features.
- Close the Source: You cannot take this code and put it into a "closed" proprietary product.
If you want to integrate this into a paid product or service, you need a Commercial Waiver. This will involve a royalty agreement or a licensing fee.
Reach out at: stathi.weir@gmail.com
