I usually direct people to watch the movies Elite Squad 1 and 2. They're entertaining and pretty much explain why Rio is so violent and so corrupt and how both things feed off each other.
I'd like to note that Brazil is not at all unique in being corrupt or even in the methods used. For example, watch HBO's The Wire and you'll find the police and politicians playing the exact same numbers game. It seems to be inherent to democracy, a side effect of reelection.
The films do a wondeful job depicting the poverty of Brazil, and the way it attracts people to organized crime. It attracts so many of them, they form a nation unto themselves. Complete with their own army, territory, laws, tribunals... It gets to the point it's a silent secession.
Not uniquely corrupt but uniquely violent (before the Ukraine invasion one in eight violent homicides happened in Brazil... not South America, Brazil).
Besides, I don't know great movies that explain the corruption and violence on each metropolis, just this one (and The Wire for Baltimore, which is by the way great television).
I'd recommend also watching the Vice piece on how Brazilian gangs are fueling violence in Paraguay. It's quite jarring to see the slang of street criminals of Rio and SP spoken across the border in what is a war like situation.