You are probably familiar with naval mutinies of the 1800s and earlier. Successful mutineers would either (a) kill and/or throw overboard the captain and a mate or two. (b) put the captain and a mate or two in a lifeboat with a few days provisions and wave good-bye. (c) chain them below deck. You never know when you might need someone who knows where they’re going. The barrel of a gun or point of a cutlass was usually effective. The cargo could be sold with the proceeds being distributed amongst the mutineers.
Unsuccessful mutinies often ended with a couple of the mutineers being hanged from the yardarm, and the rest soon to bear many red stripes from the lash upon their backs, before being locked below the deck. The survivors would receive traditional justice on land (often more hangings).
Nowadays - sea mutinies are very rare - perhaps to try to sell the cargo as above? (today - it would be more likely a “hijacking”). Can some sort of justice be carried out at sea to unsuccessful mutineers? Or are they locked up and tried on land?
This was definitely a hijacking, since it was outsiders, and not members of the crew that took over.
A few years ago, there was an incident of an alleged mutiny on the Gorch Fock, a sailing ship maintained by the German Navy for training purposes. See news story. It seems as if this was not a case of mutineers taking over control of the vessel, but rather of them refusing to follow an order they disagreed with after an accident that had happened earlier - which, however, is sufficient to constitute mutiny under historical and present maritime laws.
As for the procedure to deal with it, the superiors on the vessel can certainly use disciplinary powers, but proper criminal trial proceedings would have to take place on land - certainly under German law, which does not have a separate military justice systems but rather tries members of the armed forces also before the ordinary civilian courts.