librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Converting bag file to video

Open Loriskar opened this issue 8 years ago • 5 comments

Required Info
Camera Model D410
Firmware Version Newest
Operating System & Version Win10 /Ubuntu 16
Kernel Version (Linux Only) 4.4
Platform PC
SDK Version 2.11.0

I am planning to convert a bag file recorded by a D410 module into video (or jpeg for each frame), I am trying to follow the guide in ROS website(http://wiki.ros.org/rosbag/Tutorials/Exporting%20image%20and%20video%20data), and it is not working, I don't know if the device is not supported or we need a specific launch file design for d410 to acquire video. Or maybe it is a good idea to use the save to disk sample to do it frame by frame.

Loriskar avatar May 15 '18 20:05 Loriskar

Hi, The RealSense bag file uses a "unique" topic for video frames, which is different from the standard ROS topic for video. If you take a look at what you sent, you'll find: <remap from="image" to="/camera/image_raw"/>, which contains the standard ROS topic /camera/image_raw. This topic does not exist in the bag files created by RealSense. The video frames in the RealSense bag files are stored with topics that represent the device and sensor from which this frames we're captured. The topic names are available under the record/playback documentation, and you can use the rosbag-inspector tool (under tools) to see the specific topic in you bag files.

zivsha avatar May 16 '18 18:05 zivsha

Hi @Loriskar We recently added a new utility to the development branch to convert bag files into images. Let us know if it can help you.

dorodnic avatar May 30 '18 12:05 dorodnic

Hi @dorodnic,

Thank you for the util - I tested the code but I get the same issue that I flagged in issue #1579, multiple calls to pause and resume will make the program crash. Does this happen at your end too?

marcovs avatar Jun 01 '18 04:06 marcovs

@dorodnic Thanks a lot

Loriskar avatar Jun 03 '18 19:06 Loriskar

[Realsense Customer Engineering Team Comment] Hi @Loriskar,

Since the util is available there, will close this. If any more concern/question, you can file another issue. Thanks.