Well, the CPU is a Snapdragon 835 and according to wikipedia it support the following video and audio:
Video:H.264, H.265, VP9 UHD/30fps encoding and UHD/60fps 10-bit decodingHigh-dynamic-range video support(HDR10)/Ultra HD Premium (only Decoding)
Audio:DSD and 32-bit/384kHz PCM audio support with WCD9341 codec
https://en.m.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems-on-chip#Snapdragon_835
Depending on if it is VR180, flat 3D or 2D video you aim for the resolution will differ but I'd say it will always be good to use h.265 with 60fps.