Housing film and TV crews on location continues to be a lucrative and very competitive niche for the hospitality industry as business and leisure travel has declined significantly over the past two years. Hotels, like film commissions, compete seriously for the coin a production brings with it.

And if there’s highly visible, top-tier talent involved, the PR value adds to the appeal. (Images of Jennifer Aniston circulated around the world during her stay at Miami’s Mandarin Oriental Hotel during “Marley & Me’s” production.)

Essential for a hotel attracting production-related biz is a willingness to not only negotiate rates but also accommodate a production team’s often odd working hours.

“A hotel needs to be extremely flexible to meet a film production clients’ schedule,” says Spencer Wadama, general manager of the Surrey Hotel on Gotham’s upper East Side. “And we want to make sure guests on an off-schedule have the same benefits of those on a standard schedule.”

The Surrey handles nocturnal skeds by adding blackout drapes in rooms and creating an evening, i.e., quieter, environment in the middle of the day. Among the other services available at the Surrey are a 24/7 concierge and a private chef on call for those who want to entertain in the hotel’s penthouse suite, kitted out with digital projector and drop-down screen.

Anton Moore, director of entertainment sales at the Waldorf Astoria in midtown Manhattan, has booked 10 productions over the past five years at the historic hotel that has two separate room types: Those in upper floors of the Waldorf Towers are more spacious and come with access to a private lounge on the concierge level (typically utilized by above-the-line types). “Crews are often here from four to six weeks,” says Moore.

He also finds that Gotham-based actors will opt for the hotel over staying at home. “They can have a chef, housekeeper and security without having to pay for them, as well as room service,” Moore adds.

Crews also take advantage of the inhouse Starbucks, where hotel guests can charge purchases to their room. An off-street motor court entrance, one of the Waldorf’s four entrances and exits, also services notable talent who can enter and exit privately, avoiding paparazzi.

Globally, it’s a hotel’s tech amenities that are deal-breakers. Now considered basic are high-speed Internet access and Skype-enabled direct-line telephones. Other must-haves include iPod/iPhone docking stations and flat-screen LCD TVs with DVD players or with connections for laptop-to-flatscreen hookup for screening digital dailies.

In London, top hotels compete for offshore guests with high-tech gadgets, stellar service (rooms at the Connaught come with butlers) and convenient facilities. The May Fair has one of the city’s most sought-after private screening rooms. Also on site: the Atrium, with digital steroscopic 3D projection capabilities and its own bar.

Luxury hotels like the Connaught pride themselves on creating a home-away-from-home atmosphere for long-term guests who are always addressed by name. Personalized menus and its newly built Aman spa add to the appeal. (Gwyneth Paltrow recently stayed for a month.)

Apartments or villas managed by hotels are also a popular option throughout a location shoot, as they offer more space and room for families, kitchens and private entrances but still have convenient hotel amenities such as maid and room service. The increased privacy is also a selling point. Angelina Jolie, Brad Pitt and their clan are reportedly staying at a historic, Grand Canal-facing Venice palazzo owned by the Hotel Bauer during production of “The Tourist.”

At London’s Athenaeum, across from Green Park, housing options include 30 apartments. To meet a director’s request, management recently turned one of the apartments into an editing suite while the director stayed next door. No request is too offbeat: the concierge aided a thespian guest in buying and selling a car that he used during production.

Long-term guests can also opt into the Athenaeum’s personalized long-stay program, which aims to satisfy guests’ specific demands from bedding to room configuration to the installation of in-room gym equipment. (Christina Ricci asked for and got an in-room treadmill).

Often a hotel will have pre-negotiated rates with studios — the Four Seasons Los Angeles is notable for such relationships, as is the Hotel de Rome in Berlin, the city’s go-to hotel for press junkets that also offers a 20% discount on spa services and food for long-term guests.

But even with lower rates, hotels rarely lose out, seeing that high-profile guests yield free publicity — and any publicity is good is for business.