It's comparing apples to oranges. If you want to compare computers, compare a macbook with an old i5 to your laptop with an old i5. Comparing an M4 to an old i5 is just silly. Of course it's going to be faster.
The i5-1135G7 (17W TDP) has 2 Media Engines which I use for proxy generation in parallel for example and pretty versatile so I use it daily (64GB RAM..).
Still, I think it's a notable achievement to get 4x performance with the M4 for video at similar wattage of the i5. I don't have an M4 MacBook but I guess the M4 would perform similar to the one in the Mac mini.