Germanwings A320 crash in French Alps
French military personel walk up the mountainside near the site where Germanwings flight 4U9525 from Barcelona to Duesseldorf crashed. Getty Images

One of the pilots of the Germanwings Airbus A320 appears to have been locked out of the cockpit before the plane crashed into the mountains northeast of France's Nice, killing all 150 people on board, according to an investigator who analysed a cockpit voice recorder.

The New York Times quoted a senior military official as saying that one of the two pilots left the cockpit and could not get back in.

"The guy outside is knocking lightly on the door, and there is no answer. And then he hits the door stronger, and no answer. There is never an answer.

"You can hear he is trying to smash the door down."

The investigator, who has not been named, said many questions remain unanswered on the reasons why one of the pilots went out. "But what is sure is that at the very end of the flight, the other pilot is alone and does not open the door," he said.

There is no indication regarding the state of the pilot who remained in the cockpit.

Before leaving the cockpit, there was a "very smooth, very cool" conversation between the two pilots.

The NYT report was confirmed by an AFP dispatch quoting a source close to the investigation as saying that one of the pilots had been "locked out" the cockpit.

According to the agency, the seats of one of the pilots was pushed back and the door opened and closed.

The French Bureau d'Enquêtes et d'Analyses (BEA) confirmed that the first black box recorder was damaged but some "usable data" had been retrieved. The extracted recording contained "voices and sounds" from the cockpit of the plane.

The search for the second black box is ongoing. A case has been found, but not the recorder itself. French investigators said they remained "optimistic" the flight data recorder would be found.