crop the .bag file
I used the D415 camera to record a bag file, but I only need the video recording after 5s of the file, is there a way to crop the file
-
Hello, although there are tools for editing rosbag bag files recorded in ROS, there are not similar editing tools available for bag files recorded with the RealSense SDK. The possibilities that you could investigate include:
1. Extract the individual frames of the SDK-bag with the SDK's rs-convert tool. This will likely not meet your requirements though if you need a 5 second long recording.
https://github.com/IntelRealSense/librealsense/tree/master/tools/convert
2. Play the bag file on-screen whilst a video screen-capture tool is active and make a video recording of everything after the 5 second point. Since a video file (such as mpeg or avi) would be non-interactive, this may also not meet your needs.
3. Create a bag recording program script and set your existing bag file as the script's data source instead of a live camera. Set the script to skip 5 seconds worth of frames before it begins recording. This should write a new bag file that only contains data from the 5 second point onwards of the original bag.
Please sign in to leave a comment.
Comments
1 comment