Here is a frame from a video taken last month, made by leaving a camera near two octopuses and collecting it later.
It’s a mating.
When octopuses mate, the male inserts a packet of sperm into the female by passing it along a groove underneath one of his arms – a specialized arm, usually the third right arm, as in this species. So mating often takes place at long distance. A typical example:
And landed in the position in the first image.
I’ve only seen this mating position a few times, and I don’t know why it’s occasionally chosen. Below I’ve increased the contrast in another image and labeled some parts to make clearer who is where.
The female has a shell in front of her. You can only see her eye and the very top of her head.