The Oriental Pied Hornbill (Anthracoceros albirostris), as seen in the video below, is scratching its head. Note that the left leg arises from the above of its left wing. This is the indirect method as seen among arboreal birds.
Normal speed may not show the rising of the left leg above the wing clearly, so a slow motion segment is provided below.
There are two ways of scratching the head – direct and indirect methods. The direct method involves raising the foot from under the wing LINK. This is seen mainly among terrestrial birds. However, among arboreal birds like sunbirds and hornbills, the indirect method is used. This method involves the leg extending over the wing to reach the head – see HERE.
Now why do birds need to scratch the head in the first place? Obviously when there is an itch on the head. The foot is used, as using the bill is out of the question. The foot is also used to preen the head feathers LINK.
20th June 2019