My understanding is that transcoding utilizes multiple cores, but ...
The i7 might have newer features that are specific to specific transcoding. HEVC transcoding in particular is better off on Kaby Lake processors (2016 and later), which have hardware acceleration built into them. The video card upgradability is definitely a very big consideration. I too was daunted at the prospect of the inability to upgrade the GPU in an iMac.
The next generation Mac Pro comes out in 2019 (though when is anyone's guess). It is supposedly going to be modular, so one would hope that we can slap in our own GPUs again. If you can wait, you will definitely be advantaged by the processor hardware acceleration advancements, as well as superior GPUs, and faster RAM. Even if it costs more, your performance / dollars would be *MASSIVELY* better on the 2019 Mac Pro, simply because of the advancements in chip instruction sets and hardware acceleration, compounded with increased hardware performance.
But if you
MUST upgrade to either of these two machines, the i7 has almost 1 GHz advantage over the Xeon processor in terms of single core performance. In terms of threads, the Xeon 12 core has 24 threads as the Westmere architecture supports hyper threading on both 6 core CPUs. There also will be some minor overhead loss in communication between the two CPUs, so you should factor that in as well. I think because of this, you will notice better CPU performance on the iMac.
Really you will need to decide if the un-upgradable GPU in the iMac is acceptable. You're already buying a pretty lame GPU by today's standards by buying the 2015 iMac. The Mac Pro could be upgraded with a nice NVIDIA GPU, but then you're stuck with slower RAM, and an already aging system. Not to mention the 2012 Mac Pro will likely fall out of hardware support with Apple next year, which gives you two years of software support (High Sierra) remaining on what otherwise is a new purchase for you.
TL;DR - If you can hold off,
wait for the 2019 Mac Pro. If you can't, pick the iMac if you value CPU performance more, and the Mac Pro if you value GPU performance more.
EDIT:
I believe these are the two CPUs in question:
Mac Pro (keep in mind there are two of them):
https://ark.intel.com/products/4792...X5650-12M-Cache-2-66-GHz-6-40-GT-s-Intel-QPI-
iMac:
https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4-00-GHz-