Read and write Different bag files in one programme
Hi,
I am trying out simple programme. I read from a bag file and write to a new bag file. Is there any way to do this? looking at some code snippets,
and also rs-capture-playback example, i tried but i am not successful. essentially, in the cfg
rs2::config cfg; cfg.enable_record_to_file("path_to_output_file.bag"); rs2::pipeline pipe;
The programme starts reading from the default device which is the camera.
But, if i set the input file, as well as the output file, nothing happens
and the program exits after sometime. I have packed this in a try catch but
i could no see any exception being thrown. I checked the staus of rs2::device
whether it is in playback mode or recording mode, but not getting that status
message also.
Please let me know how this can be done. Maybe i am missing something
really elementary.
Regards,
Krishnan
-
Hello Srikrishnan V,
Thank you for your interest in the Intel RealSense Technology.
You can start to record and write to and from a .bag file by following the example linked below:
https://github.com/IntelRealSense/librealsense/tree/master/examples/record-playback
The example linked above demonstrates usage of the recorder and playback devices.
Best regards,
Alexandru
Please sign in to leave a comment.
Comments
1 comment