Sony Xperia Z2 won't let you record more than ~5 minutes of 4K video (and neither will Note 3 and S5)
However, it turns out that these phones, even though they are officially capable of recording 4K video, cannot deliver an experience we'd consider truly adequate. Why? The answer is simple: they cannot record more than 5 minutes of footage in 4K resolution.
Now, that issue probably isn't so huge for most people, because no one is really going to capture full-length movies with their smartphones, but still, 5 minutes is a relatively short limit. There are many cases where we start recording a certain event on video, and we often don't know exactly how long that event is going to continue. Obviously, in those situations, the current 4K video support just isn't going to cut it.
Up until now, we weren't completely sure why manufacturers are limiting 4K recording to the 5-minute mark, but Sony's Xperia Z2 might have revealed the answer. While Samsung's Galaxy Note 3 and Galaxy S5 are strictly limited to 5 minutes by their camera apps, the Xperia Z2 doesn't have such a software-defined limit. However, it appears that the Z2 determines when to put an end to your 4K recording session based on the temperature reached by its internals. In short, when things start getting too hot in there, the built-in camera of the phone decides that you'd be better off with a short and potentially ruined video, rather than an overheating phone. We tend to agree, though this raises the question if such a half-baked feature should be included at all.
Starting a recording session from a normal state (idle temperature), and in a room that's air-conditioned to about 77° F / 25° C, the Xperia Z2 usually manages to keep recording for just under 5 minutes. At this point, it gets too hot and the phone shuts the camera app down. If we start a second recording, right after the first one has been terminated, the Z2 would hardly record more than a couple of minutes of 4K video. We've measured the temperature while recording 4K, and the phone's exterior gets very hot indeed, with the glass surface on the back side reaching about 111° K / 44° C. Interestingly, the Note 3 and S5 don't get nearly as warm when recording 4K, but that might be due to their materials not dissipating heat so well.
It's important to note that it's only the temperature of the phone that the Xperia Z2 takes into account when determining when to terminate the recording. There is no fixed time limit as on the Samsung phones, or if there is, it has to be much longer. We figured that out by starting a 4K recording and placing the Xperia Z2 right in the way of the flow from the air conditioner. Utilizing this external source of cooling, the Xperia Z2 successfully recorded over 10 minutes of 4K video and kept on going. Of course, there's always the storage space factor, as a 10-minute 4K video from the Z2 came in at the whopping 4 gigabytes!
And there you have it - current-gen phones cannot be used for 4K video recording of more than about 5 minutes (you obviously can't bring an air-conditioner with you while out and about). As you can imagine, there are solutions for rooted phones that can bypass those time and temperature limits imposed by manufacturers, but we wouldn't really advise you to take advantage of those, if you don't want to risk frying the precious silicon inside your phone!