The city’s police unions lost in court last week, in a win for … well, everyone except them and bad cops. Yet even a win for the unions wouldn’t have meant much in the long run.

Body-camera footage, the Appellate Division-First Department ruled, is not “a personnel record covered by the confidentiality and disclosure requirements” of state law or labor contracts.

The unions’ claim was dubious from the start: Body-cams, after all, record what public employees (police) are doing in public. The idea that they’re somehow exclusively or even predominantly a part of a personnel record is just silly.

It’s certainly true that video doesn’t always give the full story. For starters, it can’t show what’s happening just off-screen, nor provide context for actions that don’t immediately make sense to non-expert viewers.

But it does, on balance, add hugely to the available information about any incident that proves controversial — and so benefits officers falsely accused of wrongdoing.

In other words, body cams are a deterrent both to cops who might otherwise be tempted to cross the line and to perps eager to make false claims in pursuit of get-out-of-jail-free cards. Indeed, by preventing frivolous brutality suits, they could easily wind up a huge money-saver for the public.

Overall, research shows that body cams lead to fewer complaints against police — down by 93 percent in a recent University of Cambridge study.

An earlier study on body cams in Rialto, Calif. (one of the first adopters of the tech), showed that it brought officer use of force down 59 percent and civilian complaints down 87 percent.

Some fear that being constantly on camera might leave police too risk-averse, afraid they’ll be disciplined for legitimate actions that just don’t “look good.” Thing is, the proliferation of cameras (and not just on smartphones) makes it ever more likely that part of an officer’s actions will be recorded: Body cams at least ensure that the record will be as complete as possible.

Which, of course, is a big plus for a force as high-quality as the NYPD. As Police Commissioner James O’Neill noted in support of the court ruling, this “footage overwhelmingly shows just how brave, skilled and dedicated our cops are every single day in the service of the people of New York City.”

Yes, body cams are a big problem for bad cops: Ex-Commissioner Ray Kelly switched from opposing to supporting them after seeing video of a South Carolina cop shooting a fleeing unarmed man in the back.

But cameras also mean trouble for bad civilians: Chicago police used video from a host of sources to crack the Jussie Smollett case.

Guarding against misuse may require some system for review of body-cam footage before it’s made public, but maximum transparency is in the interest of all law-abiding civilians and police.