According to
Passmark and
Plex's official rough estimations, neither of them is good enough for software 4K transcodes. Plex says that you need a 12,000 Passmark score to transcode 4k SDR, and a 17,000 Passmark score for 4k HDR. The E3-1275 v6 and the E3-1231 v3 have a 11,014 and 9,626 score, respectively, so the E3-1275 v6 is around 15% faster. Considering the E3-1275 v6 is more than twice as expensive, it's not a particularly good deal on the processing power front.
On the hardware side, though, the hardware transcoding silicon in the
E3-1275 v6 should support
HEVC and HEVC 10-bit transcoding, so you could do it in hardware on the E3-1275 v6. Hardware transcoding is supposed to be of lower quality than software, but if you're in a position where those two chips are your only options that might push you towards the E3-1275 v6.