Media playback is unsupported on your device Media caption In cities around the world, like Berlin and Edinburgh, housing costs are soaring

Joy Rentoul is sitting beside a bunk bed in the living room of her two-bedroom flat in Leith, Edinburgh, the room drenched in sunlight.

Her children - a girl, 12, and boy aged nine - are at their dad's house for the day and Joy is reflecting on her living arrangements, which are not ideal.

"I am sleeping in the living room in a bunk bed so that my son and daughter can have a bedroom each," she tells BBC Scotland's The Nine.

"My baby girl is becoming a young woman and really needs her own privacy - so I am sacrificing my own privacy.

"There's absolutely no way in the world that I could afford to move to a flat that has three bedrooms," she says.

Worse, she fears being driven out of her existing property by rising rent, which her landlord says is necessary to pay for improvements to the ailing block in which she lives.

Image caption Joy Rentoul fears she will be driven out of her property in Edinburgh due to rising rent

Joy's story, and her fears, are typical. Across the city, across the country, across much of the world in fact, housing costs are soaring.

Between 2010 and 2018 the Lothian region, including Edinburgh, saw a 39.8% rise in the average private rent for a one-bedroom property; a 42.3% increase for two-bedrooms; and 46.6% for three-bedrooms, according to the Scottish government.

At the same time the average wage, adjusted for inflation, fell.

'Pushed out'

For critics of capitalism's effect on housing, such as the writer and broadcaster Vonny LeClerc, Scotland's capital is becoming unaffordable, "even on a professional salary".

We take a stroll down Cockburn Street at the heart of Edinburgh's Old Town, once edgy, now chic.

Image caption Vonny LeClerc says she is being "pushed out" of her Edinburgh where she moved to as a student in 2005

"It's lost all of its edges," says Vonny. "The gentrification has just swallowed up everything that was unique."

Vonny rented a flat here when she moved to the city as a student in 2005 but she says there is no way she could have done so had prices been as high as they are now.

Even now, she is struggling to afford a home and is preparing to leave Edinburgh altogether.

"I don't want to go. This has been my home for 14 years...We're being pushed out because we cannot find anywhere that is affordable for us to rent."

The housing shortage has been exacerbated by a rise in holiday lets, especially here in the medieval Old Town, a tourist hot spot.

The city council estimates that there are 240,000 properties in Edinburgh and recent research for BBC News suggests that 12,000 are listed on the Airbnb website - that is one in 20.

Airbnb says its properties represent less than 0.6% of Scotland's available housing stock and boost the nation's economy by £1.5m per day.

Kate Campbell, the council's housing and economy convener and a member of the Scottish National Party, insists the administration, which is run by an SNP/Labour coalition, is taking action.

"We're looking at rent pressure zones. We're looking at how to regulate short-term lets," she says. "We're building a lot of affordable homes and particularly social homes, there's an enormous focus for us on social housing."

A law enacted in December 2017 allows councils to apply to the Scottish government to introduce rent controls in specific "pressure zones" but so far no such zones have been declared.

"The legislation is at a very early stage and it's very much about building the case and gathering the evidence and gathering the data," says the councillor.

In the meantime there is anecdotal evidence that the housing shortage is beginning to affect vital services.

Bringing key workers to cities

Image caption Trainee advanced nurse practitioner Liam Shields says key workers like him are struggling to compete for city homes

Liam Shields, a trainee advanced nurse practitioner points to what he says are 60 nursing and midwifery vacancies at the Western General Hospital where he works.

The nurse, who has himself struggled to find affordable housing since moving to Edinburgh from Dundee, reckons the tight housing market is stifling recruitment.

A city needs nurses, police and firefighters to operate, he says, but they find it hard to compete for homes against highly-paid workers in financial services and the law.

"There certainly needs to be a stronger approach to what qualifies as a key worker and how you bring key workers to your city," he argues.

Image caption Berlin faces similar issues to Edinburgh in terms of housing

And it's not just Edinburgh. Around the world cities are grappling with the same problem - the richer they get, the more desirable property becomes, the harder it can be to find a home.

In recent weeks places as far apart as Dublin, Venice and Johannesburg have seen protests about a lack of affordable housing.

Residents rising up

And in the German capital, Berlin, Joy Rentoul's story sounds very familiar to Marja Müeller, a single mother in a similar apartment block.

Last October, Marja says, she received a notice that the block was to be modernised and her rent would go up - by 76%.

"I'm actually one of the lucky ones," she adds. "Most people have about 80/85% more rent to pay."

Can she afford it? "No I can't. I mean I don't know what I'm going to do then."

Image caption A study suggests rents in Berlin have more than doubled in a decade

For many years after the fall of the Berlin Wall in 1989, and the reunification of Germany, the city had a reputation for cheap rents. A supply of large Soviet-style housing blocks in what was East Berlin helped.

But those days are well and truly over. Last year a study for real estate IT firm Immowelt found monthly rents in Berlin had more than doubled in a decade.

Solutions are being proposed. For one thing, holiday letting is more regulated here than in Edinburgh, for another residents are rising up to demand action from the city government.

Marja's property is owned by Berlin's largest landlord, Deutsche Wohnen, which has around 115,000 flats.

Earlier this month, thousands of Berliners took to the streets to call for some 200,000 properties, including Deutsche Wohnen's, to be nationalised.

If the campaigners can gather a total of 190,000 signatures by February they will be able to put the proposal to city voters in a referendum which will force the municipal government to act. Polls suggest they have a good chance of victory.

Image caption Thomas McGath says housing is now treated as a commodity rather than a utility

Thomas McGath, an American who lives in Berlin, is one of the protest leaders.

"What we're seeing right now is actually an existential moment for Berlin," he says.

"People are afraid of not being able to stay in their neighbourhoods. People are really questioning whether the city is for them anymore."

The core problem, he argues, is that housing is now treated not as a utility but as a commodity, bought up on mass by giant corporations to extract ever-increasing profits, regardless of the effect on tenants or cities.

It is a trend which took off after the global financial crisis a decade ago, argues Saskia Sassen, a professor of sociology at Columbia University in the US.

She has described the process as "a systemic transformation in the pattern of land ownership in cities" with "deep and significant implications for equity, democracy and rights."

Like other big landlords, Deutsche Wohnen defends its investments, insisting its apartments are both affordable and being improved for the good of its tenants.

Chief executive Michael Zahn says any vote for citizens to buy back housing would be a big mistake.

"Expropriation brings no relief for the drastically-tight housing market in the capital," he insists.

The Social Democrats who lead the coalition which governs the city are sceptical too, arguing that it would take billions to purchase the properties (which the city is accused of selling off cheaply in the first place) and that it would be better to invest in new housing and rent freezes.

'People are getting angry'

Image caption Marja Müeller was told her apartment block in Berlin was being modernised and her rent would go up by 76%

Marja is not convinced.

"It's not working," she says, of the existing economic system in Berlin, Edinburgh and the west in general.

"The rich get richer and the poor get poorer...I think it's really at a critical point right now because people are getting so angry.

"Everyone went to school and had some history lessons and we all know where that's going to end," she says.

Asked to explain specifically what she means, Marja says discontent about a lack of affordable housing is fuelling a rise of the far right.

In Germany that sounds like a wake-up call from history.