Skip to content

package for processing video file to rosbag file

Notifications You must be signed in to change notification settings

Cecilimon/video2bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

video2bag

package for processing video file(.mp4) to rosbag(.bag) file

prerequisites

  • opencv-python
  • cv_bridge
  • rosbag
  • glob
  • regex

Installation

pip : glob, regex
apt : opencv-python, ros-{distro}-cv-bridge, ros-{distro}-desktop-full

Instructions

1. indicate the directories of your input video and output frame in the main.py file

input_file = "./test.mp4"
output_file = "./output.bag"
args = {"output_dir": "./", "sleep_rate": 0.1, "div_num": 2}

2. Extract frame and run video2bag pkg by using main.py

python main.py

Guide

When running video2bag if your ROS default python version is 2.7, you should be using python2.7 environment. Cv_bridge won't work if you use python3.

About

package for processing video file to rosbag file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages