Which version of the HTC One, the M7 or the M8? (M8 is the newest model, M7 is the version prior). Regardless, all three phones are really great pieces of technology, but I have to give the win to the HTC One, especially if you mean the newer M8. Even the M7 is better in my opinion, for a few reasons. First of all, the speakers on the HTC One are the best on any phone to date commercially available, and blow the S4 or S5 and all others away in terms of audio, so for videos I definitely give it to the One since otherwise the One and S4 are exactly alike in the video regard. With other performance based stuff, the M7 and S4 are pretty similar and the M8 has them both beat (obviously, its a newer phone), but the Sense UI is so much better than touchwiz it makes both Ones perform better than Samsung's offerings. Take a look at this video and you can clearly see the difference, even though this uses The new HTC One (M8) and Galaxy S5, the same thing happened with the S4 and M7:
https/www.youtube.com/watch?v=nQDcfrBS6-c&list=UUhYU73igK5wQhWAXPh3X8PA
Hope this helped!
ALSO: I currently own the HTC One M8, and it is an awesome phone from my personal experience, you can't go wrong with an HTC One M7 or M8, but I have also had extensive use with the Galaxy S4, and it is by no means a bad phone!