-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting bag file into avi file for each stream like RGB and Depth Map #6107
Comments
The RealSense SDK has a conversion tool called rs-convert that can convert a bag file created in the SDK into a range of file formats (though not video formats such as avi). https://github.com/IntelRealSense/librealsense/tree/master/tools/convert A round-about way of creating a video would be to convert the bag into a set of PNG images with the rs-convert tool and then convert that image set into a video. Googling for 'convert png set to video' provides more information about ways to do this. Regarding cropping images, it is possible to define a region of the screen called a 'bounding box' when generating the camera image and exclude data outside of that box area. The link below has more information about this method. Though it may not be an option if you can only use bag files already recorded and not create new bags. If you are able to record bag files outside of the RealSense SDK software by using ROS, an option for making the bag files smaller would be to use the 'split' functions of ROS' bag editing tool. This tool has features such as cutting an already recorded bag by specifying a start and end point and then re-saving it as a new smaller bag, and automatically closing recording and starting recording to a new bag file after a certain time period or file size has been reached. Bag files created in ROS may have incompatibilities with bag functions in RealSense SDK tools such as rs-convert though (intended for using bags created in the RealSense SDK), which would make conversion to other formats difficult. A workaround may be to play the bag file whilst a full-screen video capture program is running, so that everything on the screen is recorded as a video. If you would like to use a free video capture program, google for 'free video capture software' for some suggestions. Of the ones that have free versions but require payment for the fully featured version, fraps for Windows has been popular for many years and has the option to set a custom frame rate. Another popular recording option for Windows, Linux and Mac is OBS (Open Broadcaster Software). |
You can derive the images from the bag and use ffmpeg to create a video again. Works at least for mp4. From mp4 to avi a conversion is possible. |
This case will be closed after 7 days from the time of writing this message if there are no further comments. Thanks! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
I have bag files created using RealSenseD435 camera. I want to convert RGB and Depth image into avi or any other format which can input into Pose Estimation model.
Second, these bag files are very big like in 3 to 5 GB for 1 to 2 minutes video. How can I crop object within the video and also decrease frame per second rate when converting into avi or any other format from bag file.
Thank you.
The text was updated successfully, but these errors were encountered: