/python_rosbag_to_video

A python script to extract video in rosbag file

Primary LanguagePython

python_rosbag_to_video

This repo is the python script to extract video from rosbag

Work right away with python2.

It does NOT work with python3 for now because of cv_bridge.

Dependencies

Install the following package using pip

# Cryptodome
pip install pycryptodomex
# gnupg
pip install gnupg

Quick Start

  1. change BAG_PATH in extract.py to the rosbag file path
  2. change OUTPUT_PATH in extract.py to the output path for images
  3. change the topic name for rgb sequences in extract.py
# run this to extract images from rosbag
python extract.py

# images to videos
# might need to install ffmpeg
ffmpeg -framerate 30 -i frame_%06d.png -codec copy output.mp4