You're so pretty
I watched these two Northern Flickers, Red-shafted, going through a dance which involved soft calls, head bobbing, and tail displays. This went on for well over half an hour. I wrote Cornell Lab of Ornithology regarding the behavior, and it is a territorial display/ mating display. During the mating season two birds of the same sex will do this dance while a third bird of a different gender looks on. They are establishing territory and trying to impress a potential mate. It's interesting that both males and females engage in the same behavior.
In fall the rise of hormones around the equinox causes an increase in mating/territorial behaviors.