The compilation instructions in the README instruct you to build rosbag2 from source and include a couple of pull requests. However, both of those PRs have since been merged and exist in Humble and later. I was able to clone this repo into a workspace in Humble and colcon build and run the demo successfully without having to build anything else from source.