A former NASA engineer has devised an elaborate way to deal with parcel thieves after police told him they were unable to investigate his case in Los Angeles County.

Mark Rober spent six months designing a "bomb" that would activate when the package containing it was stolen, firing glitter and fart-smelling spray on the thief.

"If anyone was going to make a revenge bait package and over-engineer the crap out of it, it was going to be me," Mr Rober said of the device containing four smartphones, a circuit board, a tube of fart spray and nearly 500 grams of glitter, hidden inside an Apple Homepod box.

Mr Rober came up with the plot when he captured video of thieves stealing a box from his front doorstep on his home security camera, only to be told police could not track them down.

The former worker at NASA's Jet Propulsion Laboratory has taken to YouTube to share footage captured by the phone cameras in the booby-trapped package, which was stolen and triggered several times.

The package, which also contained a motion detector, was left by the door with a label saying it was sent by "Kevin McCallister", the name of Macauley Culkin's character in the Home Alone movies.

Mr Rober's YouTube post detailing his plan was sponsored and some online questioned whether the thieves were real or hired actors, but the engineer told the Washington Post all the footage was genuine.

"I challenge anyone who thinks packages don't get stolen to put a cellophane-wrapped HomePod box on their porch and leave it there day after day and see just how honest people are," Mr Rober told The Post.