To get 4K quality on HandBrake select the Source button. Then select Open a single video file. After that, look for the file that you want to change and open. In the Destination area, choose the Browse button. Click on the Video tab. Then, select x265 as Video Codec. Now, choose the Average Bitrate (kbps) and change it too 25000 kbps. In Optimize Video, choose None or Main. Lastly, click start for the video to encode.