Why are my macarons cracking on top? I've tried to make macarons eight times in a row and I failed. I used this recipe (text version is in the description below the video).

They all cracked on top and the surface collapsed as you see in the picture. I did some research and watched youtube videos to find out what I am doing wrong. As I figured the following factor could be the reason behind ugly macaroons:


I read somewhere that the time you let the batch sit and dry before putting i the oven is an important factor. I let it rest for 45 minutes to one hour instead of 20-30 minutes, but the result was the same, if not worse.
The other factor is beating egg whites to stiff peaks. There, I think this is where my problem come from. So I beat the egg whites with a pinch of salt to medium peak stage, then add in the sugar in 3 batches while mixing with hand mixer. After watching several videos I know what stiff peaks look like, or at least I think so. But trying the recipe keeping that point in mind it still had the same result: 




What else is important in making macarons that avoid them crack? What am I missing?

The weird thing is, my first batch was a success without precise measurements and so on! Here is the picture:
You had too much air in your batter. This isn't a result of beating to much, but rather insufficient macaronage after folding in the sugar and almonds. The excess air expands in the oven and creates a hollow shell that then collapses.

The macaronage is really the trickiest thing about macarons - it is very hard to convey in recipes exactly what the texture of the batter should be after the process. It just takes practice and experience. It is hard to get out of the sponge-making mindset of gently folding ('must retain air, must not overdevelop gluten!'), but you must in fact beat the air out of the batter like nobody's business. Knowing when to stop so you don't end up with batter puddles is the key.

For what it's worth, I have tried many macaron recipes over the years, all with varying degrees of fussiness regarding age of the egg whites, texture of the almonds, stiffness of the peaks and so on, but the best recipe I have ever used is the one that does away with most of that nonsense - you can find it here.