Judging by its specs, the Sony Xperia Z2 is the clear favorite when it comes to video recording. The smartphone can do UHD videos (3840 x 2160 pixels), which adds up to 8 MP or twice the resolution of the HTC One (M8)'s main camera resolution.
We shot two FullHD videos at 30 and 60 fps and took 100% resolution crops from those to put them side by side and see the difference in quality. The Sony Xperia Z2 shoots both modes at the same field of view while the HTC One (M8) looks to have a slightly zoomed-in 1080p@60fps mode compared to the 1080p@30fps mode.
Detail-wise the HTC One (M8)'s videos have higher detail in the 30 fps mode but lower in the 60 fps. If you're shooting in 1080p@30 fps, which is the most common way currently the HTC One (M8) is a tad better performer. You'll note that the 60 fps FullHD video captured with the Sony Xperia Z2 looks to be better-detailed than the 30 fps one but still not as good as the One (M8) sample.
However adding the UHD video sample clearly points to a vastly-superior Sony Xperia Z2. The resolved detail is far higher than on any of the other clips - great result.
The HTC One (M8) captures FullHD videos at 30 fps with a bitrate of 19 Mbps with around 28 frames per second. Audio bitrate sits high at 190 Kbps with stereo channels and 48 kHz sampling rate. FullHD videos at 60 fps have a framerate of around 59 fps and a slightly higher bitrate of 20 Mbps. Audio is recorded at 193 Kbps with the same sampling rate.
The Sony Xperia Z2's 1080p@30 fps video has a lower bitrate in comparison - 17 Mbps. Framerate is a tad higher at 29 fps but audio has a lower bitrate of 154 Kbps. This results in superior audio recording abilities of the HTC One (M8). The Sony Xperia Z2 is again stereo-capable with the same sampling rate of 48 kHz.
Naturally, 1080p@60 fps videos of the Xperia Z2 have much higher bitrate compared to the 1080p@30 fps videos and both the 1080p videos of the HTC One (M8) - 30 Mbps. Framerate was a constant 59 fps but audio sampling rate left something to be desired at 157 Kbps.
Ultra High Definition videos (2160p@30 fps) are the cream of the crop. They offer 29 fps constantly, an audio bitrate of 154 Kbps and an impressive 54 Mbps bitrate.
Here goes the HTC One (M8)'s 30 fps and 60 fps videos.
And the Sony Xperia Z2's 2160p, 1080p@30 fps and 1080p@60 fps videos.
Here goes our video comparison tool. Here you can check out the low light performance of both smartphones. In terms of serving better detail when the lights go dim the HTC One (M8) is a little better at 1080p but can't match Sony's 2160p Sony Xperia Z2.
Winner: Sony Xperia Z2. The HTC One (M8) offers great 1080p videos, beating the Sony Xperia Z2 by a bit in terms of image quality and notably when it comes to audio. However, throw in the 2160p UHD recording and the Xperia Z2 raises to a new level, one which the One (M8) has no answer for.