ivapylibs / camera

Encapsulation of typical camera functionality.
GNU General Public License v3.0
1 stars 1 forks source link

Rosbag recording: FIle too large #2

Open yiyeChen opened 2 years ago

yiyeChen commented 2 years ago

POssible Solutions:

  1. Compress the data
  2. Reduce the frame rate

Need to be able to record 20 min video

yiyeChen commented 2 years ago

Store the depth before scaling (uint16) instead of after (float64) A 1 minute video is reduced from 8.1G to 4.6G.

Also add the options to reduce the frame rate or the frame size. Noted that reduce the frame size will also reduce the visual field range. If reduce the frame size from 1920x1080 to 640x480, the 1 minute video size is further reduced to around 1.3G. If further reduce the frame rate from 14.5 FPS to 10 FPS, the size is further reduced to around 825MB.

NOTE: The 14.5FPS is less than the camera's capability 30 FPS due to the time cost of the visualization.

yiyeChen commented 2 years ago

The rosbag compression during each save is not a good idea, since it is very time-consuming and will cause severe frame loss.

But compress after the recording via the command: rosbag compress RECORD_NAME.bag is an option. In my test it will reduce a 1 minute 5G video to 869MB. But it is also time-consuming. It took 12 minutes to compress a 1 minute video.