This is the story of Rabbi Azriel David Fastag, who wrote the song Ani Maamin (I believe - the Martyrs' song), while on the train carrying him to the Treblinka concentration camp.
Let's go to the videotape.
For those who read Hebrew, the full story is here.