Hi,
Yeah, you would need /tf, /tf_static, the camera_info and the image topics. You could do it on ros1 or ros2, it doesn't matter. ros1 is deprecated this year, so I suggest to record a ros2 bag if you can.
Here an example with an OAK-D.
ros1:
rosbag record /tf /tf_static \
/stereo_inertial_publisher/right/image_rect \
/stereo_inertial_publisher/stereo/depth \
/stereo_inertial_publisher/right/camera_info
ros2:
ros2 bag record /tf /tf_static \
/right/image_rect \
/right/camera_info \
/stereo/depth
When you replay a bag, don't forget to add "--clock" argument.