I don't know which would be best for video editing but regarding the 21.5" iMac it can't be user modified as far a memory RAM is concerned. So be sure you have enough memory in the initial order.
Here's some food for thought;
One can upgrade a 27" iMac's memory with modules from MacSales.com for about 1/2 of what Apple charges. Therefore order the minimum amount of RAM (8 GB) and order upgrades from the providers I mentioned. For the 27" it'll be about $93 for and additional 8 GB and $163 for an additional 16 GB. Macs are very picky about memory compatibility and MacSales guarantees their products. They also have an exceptional customer support group and warranty.
For video editing CPU speed is the primary consideration and then memory. Here are benchmark tests on the various CPUs for the 27" and 21.5" models:


Based on the benchmark values the 27" i5 is a bit faster than the i7 of the 21.5" model. The fact you can upgrade the memory in the 27" model for 1/2 or so of Apple's prices the 27" may make the 27" a better fit. Plus you'll like the extra real estate of the display.
The bottom values in both screenshots is for the i7 CPU.
The screenshots are from the MacTracker app.
