If the encoding and other CPU intensive tasks of yours support more than 4 cores then Phenom II all the way.
Your gaming performance with just a 5770 will be virtually the same (especially after you OC) on both systems (on most games).
Overclocked i5s do offer killer performance. However, for gaming the 5770 is going to be the bottleneck here, overclocked or not. Also, the i5's OC headroom isn't quite enough to make up for the 1050T's 50% increase in cores, in multi-threaded apps.
What if he had, oh let's say, a 5850 instead? Would it matter then which one he chose or would they both offer the same performance?