Split apart the demo to be more flexible for different camera scenarios.