The HP Envy with the 8th gen i5 CPU will be better because it has 4 cores and Hyper Threading (HT). Video editing / encoding is very CPU intensive so CPU with 4 cores and HT means it can process up to 8 streams of instructions instead of just 4 that the 7th gen Core i5 can handle because it is a dual core CPU with HT.
While the quad core i5-8250u can burst up to 3.4GHz (when only 1 or 2 cores are being used) for short periods of time as long as the CPU is below a certain temperature threshold, reviews have indicated that when the CPU is stressed it generally hovers in the 2.4GHz to 2.6GHz range. The "u" stands for "ultra low voltage" (15w CPUs) which is why the clockspeed is being limited. If you want a CPU that can stay in the 3.0GHz+ range, then you need to look at laptops with the "HQ" designation which designed to operate at 45w of power for long periods of time.