It's not very accurate.
There are two main problems with the portrayal:
Problem 1: Romans did not use galley slaves
Galley slaves are a phenomenon of the early modern period, when the Habsburg empire, the French, various Italian city states, the Ottomans and the Barbary corsairs all use galley slaves to a greater or lesser extent to man their war-fleets.
In antiquity, however, this was not the case. Ancient warships were crewed by free men. Poor free men, usually. Being a rower in the navy was not a prestigeous or well-paid position. But it was widely believed by the Romans that slaves would make terrible soldiers, and that only free men could be relied upon in battle. Not to mention that having to guard slaves in battle to prevent them from betraying you would be a waste of manpower, to say the least. Rowing galleys was also quite a demanding job, and having skilled rowers made a big difference when doing battle with rams and boarding actions.
On very rare occasions in moments of extreme crisis, the Romans did try to enlist slaves in their armies. But this typically was contingent on liberating them: either before enlisting, or as a promised reward after the battle. This was tried for example after the Roman defeat at Cannae.
Problem 2: Romans did not use drums
They used horns, trumpets, flutes. We have no archaelogical evidence of drums like that, and though people have speculated that drums were used on galleys there's no strong evidence for this.
The Trireme Trust, who made a replica trireme in the 90s, actually tried the drumming method as a way to keep time on their vessel. It failed. Keeping time worked much better by having the rowers chant and sing together. (This would also, of course, help with the boredom of rowing a ship for hours and hours.) It's possible that they had flutes or smaller drums to accompany them, but again we have no real evidence for this.
So when thinking of a Roman warship, instead of picturing slaves chained to benches being lashed by the whip and rowing to the accompanyment of a giant drum, you should picture free men singing as they set to work.
Sources
Norris, John, Marching to the Drums: A history of military drums and drummers
Goldsworth, Adrian, The Complete Roman Army