Image caption These days many of Macae's boats are either beached or moored

There has been a surge of food trucks recently in Macae, a city that calls itself Brazil's "oil capital".

At first glance, it makes sense that in this seaside town with its beach culture, there would be plenty of street food vendors selling to both tourists and residents.

But many of them did not open because entrepreneurs were discovering a new niche. These trucks belong to people who have lost their jobs and used their compensation money to start a new business.

In fact, on weekdays, most food trucks are just parked around town and closed as there aren't many customers.

In just under two years, this city of 239,000 saw about 22,000 jobs disappear. Many of the unemployed who did not buy food trucks or venture into new business simply left town.

Macae is one of the many cities on Brazil's south-east coast that has seen its dreams of oil-spurred wealth destroyed by the cruel reality of the country's oil crisis that started in 2014.

Media playback is unsupported on your device Media caption Macae has lost some 22,000 jobs due to Brazil's oil crisis

Brazil's oil reserves are buried deep beneath the seabed, miles from the coast. So places like Macae are home to a large number of people who work on the offshore oil platforms and drilling ships.

Since the 1970s, when Brazil's state oil giant Petrobras started its offshore operations here, this sleepy fishing town has seen an influx of highly skilled workers, such as engineers, chemists and professional divers.

Demand slump

Anita Gomide and her husband started their commercial diving firm Tecsubsea in 2011 to service the oil platforms.

Image caption Anita Gomide and her husband regularly wonder whether they should close their diving business

During the good years, they would have up to two jobs a week - each of them requiring a team of at least three divers. But now they say they are lucky to get one job a month.

"Every six months we sit down and consider shutting down our company," says Anita.

"Then we decide, 'Let's just carry on for six months more and see what happens.' We've been doing this for a long time."

Tecsubsea is still operating, but many of its competitors have dropped out.

The upside of this crisis, Anita jokes, is that Macae is now a much nicer place to live, with less traffic and more affordable housing.

Image caption In its boom years Macae became a key servicing centre for offshore exploration

At the local port, most commercial boats that service the oil industry are anchored in the dock. The only vessels in high demand are the fishing ones.

Evanildo Faria, of Patricia Mar Transport, takes people and equipment out to the drilling ships and platforms. He says demand has fallen by about 80% and he has had to fire many employees.

"We've been in this business for four decades. I have never seen things this bad."

Boom years

At the heart of Macae's boom and bust cycle is Petrobras - Brazil's state oil giant.

The euphoria with Petrobras started in 2006, when the company announced massive new oil reserves in the so-called "pre-salt" layer of rocks - some 4,000m beneath the seabed of the Atlantic Ocean (itself up to 3,000m deep at this point).

The new oil find was supposed to turn Brazil into one of the wealthiest non-Opec oil producers.

Image copyright Getty Images Image caption Petrobras was seen as key for Brazil's economic transformation

Over the years, under the leadership of former Presidents Luiz Inacio Lula da Silva and Dilma Rousseff, lawmakers changed the law to ensure that Petrobras would be the main operator here, and that the royalties it paid would go on health and education spending.

Markets rallied with Brazil's good fortune. In 2010, at the height of the global euphoria with Brazilian oil, Petrobras raised $70bn (about £46bn at the time) in what was then the world's largest public share offering.

Crisis and reform

But today the company holds a very different record: it has the highest debt of any corporation in the world - in both relative and absolute terms. Its debt of $120bn is more than five times bigger than its ability to generate cashflow.

A number of factors contributed to Petrobras's downfall over the years. In 2014, a major corruption scandal revealed that $2bn had been stolen from the company by executives and politicians.

It took Petrobras seven months to produce a credible balance sheet.

But corruption was just one factor. Petrobras had also been subsidising domestic petrol prices.

The government, which holds the majority of the company's shares, used this policy to hold down inflation. It may have helped keep retail prices down, but it came at great cost to Petrobras.

Media playback is unsupported on your device Media caption Petrobras chief executive Pedro Parente says the firm can return to its "best days" if it delivers its new strategic plan

International markets did not help either. Oil prices tumbled as China's economy slowed. New onshore shale gas projects became far more competitive than expensive offshore investments.

Since June, a few weeks after Ms Rousseff stepped down from government during her impeachment trial, the new government of President Michel Temer has been moving fast in its bid to reform Petrobras and the sector.

It has pressed on with changes initiated by Ms Rousseff to prevent further corruption scandals - now key company decisions have to be scrutinised by a number of executives and committees.

Crucially the company says it will sell off $15bn in assets - including its biofuel operations.

And Brazil's Congress is moving to remove Petrobras's privileges when it comes to the pre-salt oil, allowing foreign multinationals a bigger role.

Growth potential

In Macae, where the economy is closely linked to the future of Petrobras, people are divided over the reforms.

"I think these reforms will have a great effect here," says Anita Gomide.

"But we are not sure about how quickly they will come. It will open up new jobs and companies that we have lost over the years."

Image copyright Getty Images Image caption Many oil workers say Petrobras should not be run as a private company

But the oil workers' trade unions disagree. They have launched campaigns and strikes against President Temer's reforms, accusing him of giving away prized assets to foreign firms.

Marcelo Abrahao, director of Sindipetro union, says the government has the means to seek loans and new cash to invest in Petrobras.

"Petrobras should not be run like a private company. Its purpose is much greater than just to seek profits," he says.

Pedro Parente, the man appointed by President Temer to reform Petrobras, says no-one is happy with what was done in the past with the company, and that it is still suffering from the effects of past decisions and crises.

But he says once Petrobras reduces its debt by selling assets and scaling down investments, it will grow once again.

"In five years, this company will be bigger than it is today in its main area - oil and gas," says Mr Parente.

Most people in Macae, even those who are not fully behind his plans, hope that this prediction at least will come true for the sake of Brazil's beleaguered oil capital.