Spikes from Bright Lights on TV and Pictures

I have noticed it most in movies/shows where the camera will pan past a bright light (the sun, a streetlight, a searchlight) and the light will have 6 or 8 or so spikes coming out of it. I could not think of a good video example off the top of my head, but here and here are photographic examples.

It appears that the number of spikes are different depending on the type of lens? Is it some kind of lens flare, because I normally thinking of lens flare making the standard circular washed out regions like this?

Apparently it is not a diffraction spike, because that only happens if you use a mirror (like a telescope).

What is it and why does it not happen all of the time?

It’s caused by diffraction off of the corners of the aperture blades in the lens.

So, it is a “diffraction spike”, just a different kind.

Incidentally the shape of a lens flare may also be determined by the shape of the aperture (hence the hexagon in the linked picture).

Hmmmm… It’s hard to tell if that “Where the streets have no name” photo is really exhibiting lens-related spikes.

They sell nifty star filters that do precisely this: Star Filter Example

And they make them with two sets of lines (like graph paper), three sets, and four sets, allowing you to add awesome spikes to lights at night.

I was going to mention these, but more for motion scenes than still photos.

The examples linked in this thread seem to be time exposures; i.e., camera on tripod, shutter open for several seconds. For those exposures, no filter is needed. But for film, video and ‘normal’ still exposures, the filter is needed. (The etched lines are fine enough that the filter can be left on all the time; the effect only occurs when a light shines directly at it.)