Convert a Video to a Rosbag

asked 2016-08-22 09:25:10 -0500

seb gravatar image

updated 2016-08-26 04:16:02 -0500


I have recorded a Video with 60 FPS on a Smartphone. I now want to use this in ROS. Therefore I like to convert that into a Rosbag. (If you have a other idea I'm open to it)

But I didn't find any solution to this. (Here are only Ideas and its a few years old answersROS)

I can make a rosbag, but I actually have no Idea how I can stream the video file into a Ros topic. (I like to use it with SVO)

Edit: I'm working with ROS Indigo on Ubuntu 14.04

Thanks for Help

edit retag flag offensive close merge delete


Maybe you can use gscam to play the video and rosbag the output topic (which I believe to be camera/image_raw). Follow this tutorial:

DavidN gravatar image DavidN  ( 2016-08-22 21:14:02 -0500 )edit

Or you could do it with python. First you figure out how you can iterate over your images with OpenCV, then use cv_bridge to create the ROS message of type sensor_msgs/Image and then use the rosbag API to write to a bag file.

Dimitri Schachmann gravatar image Dimitri Schachmann  ( 2016-08-23 05:06:23 -0500 )edit

@Dimitri I sadly have no experience with python, I was more looking for a finished solution. @DavidN Nice Idea! I tried it, but I forget to mention that I work with ROS Indigo, with this I couldnt get it running. I saw it should be possible but I didn't managed it.

seb gravatar image seb  ( 2016-08-26 04:15:11 -0500 )edit