OK, there was a Hollywood movie company in a little German town shooting a movie in the local castle. The movie was about the ancestor of the Count of the castle (Graf in German) who had died a century or two before. I remember two guys show up and one of them auditions for a role in the movie sort of accidentally-- everyone says he would be perfect for the part of the Graf. Turns out he's the ghost of the Graf. The other guy is the ghost of his servant, who died with him when he jumped in the river trying to save the peasant girl he had secretly married. The Graf came back to set the record straight about his wife. There was a part where the servant discovers he's courting a girl whose grandmother or great-grandmother he also courted. Also, the first time the two of them see "moving pictures" they almost faint from the shock.
I think the book came out in the 1960's or so, but I cannot recall the author or the title to save my life.