6 May 2016 Last updated at 17:44 BST
Mr Dundar's wife can be seen restraining the gunman along with an unnamed man, before armed plain-clothed police arrive and order the attacker to get down.
The journalist and a colleague from Cumhuriyet face charges of revealing state secrets.
Witnesses said the assailant fired several shots. Mr Dundar escaped unharmed but a reporter was injured.
Footage from Istanbul shows the aftermath of an attacker opening fire on journalist Can Dundar, outside the court where he is on trial.