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
How to save raw data (.bag) with lesser frame rate #3537
Comments
As well as supporting 30 fps on most resolution modes, 6 fps and 15 fps are also supported. So a good compromise may be to configure your stream to run at 15 fps and record the bag file as normal. When doing the bag recording in the RealSense Viewer program, you can also now set custom save paths so that the file gets saved in a computer location where you have the most spare storage capacity. |
I think you need to use the code below for your cfg stream configuration lines: cfg.enable_stream(rs2.stream.depth, 640, 480, rs2.format.z16, 6) |
I am using C# and the naming is little different. Based on this example: I also noticed following works good and created a good .bag file
but following creates a corrupt .bag file ("Bag unindexed") when I try to open it
|
Yes, sorry, I just realized that the C# format is different. My apologies! Apparently, the unindexed bag error is related to a problem with how the bag recording is closed. Though your code does conform to the suggestion in that discussion to close it with Stop if you are using the pipeline. |
Yes! you're right. Just tried and seems like .bag file is created correctly with following. thanks!
But I am still have issues with this:
6 frame rate works for Stream.Depth but not Stream.Color |
I found another case where someone had trouble with streaming color at 6 fps. No explanation was provided regarding why that may have been happening for that user though, unfortunately. It looks like it may have been a case where it got closed because the user stopped providing responses. Does it work at 15 fps? |
Yup! thank you 15 fps worked with 640 x 480. |
Glad I could help! I just did a test with your configuration in RealSense Viewer (640x480 at 6 fps for depth and color, z16 for depth and rgb8 for color). The most noticeable event was that when a 6 fps color stream was started, a 'no frames received' error briefly flashed up and then the color stream started running normally. This error did not occur at 15 fps and above. |
Oh interesting, maybe I'll try to just ignore first few frames or wait couple seconds before retrieving frames. Will see if that helps. I tried both Color and Depth at 15 fps, and for 1 minute I am getting 1 GB of .bag file. This is acceptable to me. |
Issue Description
I am saving a .bag using
But my .bag file gets huge (GB) very quickly. I am not interested in so much data. I want to record about 1 minute but maybe only 10 frames per second. Is it possible to specify the frame rate for recording data to bag files? thanks
The text was updated successfully, but these errors were encountered: