package for processing video file(.mp4) to rosbag(.bag) file
- opencv-python
- cv_bridge
- rosbag
- glob
- regex
pip : glob, regex
apt : opencv-python, ros-{distro}-cv-bridge, ros-{distro}-desktop-full
input_file = "./test.mp4"
output_file = "./output.bag"
args = {"output_dir": "./", "sleep_rate": 0.1, "div_num": 2}
python main.py
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.