-
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
Naming a File After Recording pyrealsense2 #9778
Comments
Hi @codeandstuf If you are seeking to save separate bag files for every frameset then the save_single_frameset() SDK instruction may be suitable if you need to avoid stopping and restarting the pipeline. A RealSense user created a full Python script that uses save_single_frameset https://github.com/soarwing52/RealsensePython/blob/master/separate%20functions/single_frameset.py Alternatively, the C++ SDK tool rs-convert, which extracts frames from a bag and uses timestamps to name the files, takes the approach of retrieving the timestamp with get_timestamp() and storing it as a string. |
@MartyG-RealSense Thank you for your advice! I was able to use save_single_frameset() to get rid of the 1.5 sec it takes to boot up the camera. I would like to still find a way to do multiple depth camera recordings without having to end the pipeline but the images should be fine for my application. |
Great to hear that you made positive progress, @codeandstuf - thanks very much for the update! A good starting point for creating a multicam Python live-streaming application may be the multiple_realsense_cameras.py project that a RealSense user created. https://github.com/ivomarvan/samples_and_experiments/tree/master/Multiple_realsense_cameras |
@codeandstuf Were you able to determine how to use the same pipeline to record separate .bag files? |
Issue Description
<I have a script that starts a pipeline, waits for an object to enter a specified spot (by checking if the depth changes) then starts recording. My goal is to have this setup loop and for each new recording file to be named by a timestamp. My issue is that I can't seem to name the recording file once the pipeline has already started. I have tried stopping the pipeline and starting a new one to record, but this takes too long. If I can't find a solution I will make another script to rename already saved files to the time they were created, but I am hoping there is a better way.
THIS IS HOW I SET UP THE PIPELINE
AFTER A DISTANCE CHANGE IS DETECTED I RUN THIS
Any help would be appreciated.
Thanks in advance!>
The text was updated successfully, but these errors were encountered: