A marine scientist who was scuba diving off Melbourne has filmed a giant spider crab aggregation on the shores of Port Phillip Bay.

Key points: Exact number of crabs coming to Port Phillip Bay each year unknown

Exact number of crabs coming to Port Phillip Bay each year unknown Crabs congregate for "safety in numbers"

Crabs congregate for "safety in numbers" No hierarchy in "crab pile-up"

Victorian-based aquatic scientist Sheree Marris said approximately hundreds of thousands of crustaceans make their way to southern Australia's shores between May and July each year as the ocean waters cool.

"What I found really interesting about this aggregation is I've never seen so many before," she told the ABC.

"I swam in a straight line for four-and-a-half minutes and the crabs were thick on the sandy shallows. It was gobsmackingly amazing.

"[In previous years] I've swam maybe a minute-and-a-half to two minutes and [this year] I wasn't going slow.

"It's pretty awesome."

But marine research biologist Dr Julian Finn from Museum Victoria said it is hard to know the exact number of crabs coming to Port Phillip Bay and why they choose to aggregate in large piles, because there is not a lot of research available about the crustaceans.

"But it is fantastic what is happening. It's an amazing spectacle that people should go and see," he said.

"We are really lucky that such an amazing thing happens near Melbourne."

Ms Marris said the sight of all the crabs made her feel "like a kid on Christmas day, getting all their presents".

"I was excited. I was like a kid in a candy shop. The ocean is my happy place," she said, noting that, unlike most people, she is not afraid of the crabs.

Sheree Marris takes what she has dubbed "a shelfie" with the spider crab aggregation off Victoria. ( Supplied: The Nature of Science )

Ms Marris said the aggregation allows crabs to moult with "safety in numbers".

"When the crabs have freshly moulted, their bodies are soft, making them vulnerable to predators such as rays and sharks," she said.

"That's why they commit to the shallows. For crustaceans, for them to grow, they need to shed their shell, which is really hard.

"They get out of their old shell and they grow a new shell, which is really soft and takes time to harden.

"So by being in this aggregation, it reduces their chances of being eaten. It's like a case of safety in numbers."

Display was like a 'moving blanket of legs and claws'

In terms of deciding which crabs go on top of the pile, "it's every crab for themselves," Ms Marris said.

"There's no hierarchy. It's just this orange chaos of legs and claws. It's a moving blanket of legs and claws really, it's pretty awesome," she said.

"At times they kind of just stack on top of each other and the maximum I've seen is 10.

"But that's how deep it can actually get, which makes sense because if you're on the top, you're going to be more vulnerable, especially if they've just freshly moulted."

The moulting process is determined by some biological cues and some environmental cues as well, Ms Marris said.

"What happens is when one starts moulting, it sets off a chain reaction and then you'll get these massive moults. At the end of the video, you can see where they do start moulting," she said.

"Some people freak out when they do start seeing [what they think has been] a mass death of crabs."