Items with no label
3338 Discussions

How do I convert .BAG files to videos? (Intel D435, Win10)

RTang10
Beginner
10,180 Views

I am aware of the rs-convert tool, however I do not understand how to install the tool.

 

Could I have some assistance please.

0 Kudos
1 Solution
MartyG
Honored Contributor III
9,690 Views

Whilst RealSense programming is not one of my specialist areas, i can point you in the right direction. You can configure the camera to use a pre-recorded file such as a bag instead of a live stream. The link below, which details the SDK's record and playback functions, has a sample script for setting up cfg configuration instructions at the start of a script to use a bag file.

 

If you go to the link below, a playback script can be found under the 'Playing from file' heading, directly above the point on the page that the link jumps to. Scroll the page up a little to find it.

 

https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md#playback-and-record-in-realsense-viewer

View solution in original post

0 Kudos
3 Replies
MartyG
Honored Contributor III
9,690 Views

The ROS website has a tutorial on converting the contents of a bag into image files and then encoding them into an OGG Theora format video.

http://wiki.ros.org/rosbag/Tutorials/Exporting%20image%20and%20video%20data

Alternatively, if you want to try rs-convert then there is help at the link below.

https://github.com/IntelRealSense/librealsense/issues/2671

​If you are using Windows though, there is also a pre-built executable-file version of Convert in the SDK folder location Intel RealSense SDK 2.0 > Tools

0 Kudos
RTang10
Beginner
9,690 Views

Thank you for the reply, I have worked out to convert however,

 

I currently have an algorithm that does foreground and background subtraction based on Depth Values from a live stream from the camera,

 

How would I do this on pre-recorded data from a .BAG file?

 

I am assuming converting the depth stream to a PNG or video will neglect the depth data?

 

 

 

0 Kudos
MartyG
Honored Contributor III
9,691 Views

Whilst RealSense programming is not one of my specialist areas, i can point you in the right direction. You can configure the camera to use a pre-recorded file such as a bag instead of a live stream. The link below, which details the SDK's record and playback functions, has a sample script for setting up cfg configuration instructions at the start of a script to use a bag file.

 

If you go to the link below, a playback script can be found under the 'Playing from file' heading, directly above the point on the page that the link jumps to. Scroll the page up a little to find it.

 

https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md#playback-and-record-in-realsense-viewer

0 Kudos
Reply