If you want to capture 4K videos using your HTC 10's camera, you just need to set the video resolution to UHD/4K and start shooting. To record 4K videos on HTC 10, do as follows:
1. Open the Camera app on your HTC 10
2. Hit the 2-small-line button on the top center of the screen to open the Camera Modes.
3. Touch the Video button to enable video recording mode
4. Touch the 2-small-line button again and under the Video button, you should see the Quality button
5. Tap the Quality button to change video recording quality.
6. Set it to 4K and hit the Recording button to record UHD vidoes