Update 19th October 2016
I noticed that my Nvidia module was recompiled during an update today, so I rebooted and tested this again. It looks like the issue has now been fixed. For reference, I am running the driver version 367.57 on an Nvidia GTX 970.
Original Answer
TL;DR
sudo apt-get purge nvidia-* -y
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update && sudo apt-get dist-upgrade -y
The critical point here is that installing the drivers PPA results in
the libcuda1-361
libxnvctrl0
packages being upgraded which resolves the issue. I also found that I had issues with lots of the nvidia drivers so the safest thing to do is go back to the opensource driver. I have had some success with the nvidia-340
driver though.
Full Description
Ok somehow I managed to resolve the situation by accident
Firstly I installed the drivers ppa:
sudo add-apt-repository ppa:graphics-drivers/ppa
Then I purged the existing nvida drivers
sudo apt-get purge nvidia-*
Then I installed the 364 drivers.
sudo apt-get update
sudo apt-get install nvidia-364 -y
After rebooting, I was unable to log into Ubuntu desktop but could log into Xubuntu desktop from previous testing. This would work long enough for me to see that the video playback worked perfectly, but within a few minutes my computer would lock up and would require hard rebooting. After doing this a few times I purged the nvidia drivers again:
sudo apt-get purge nvidia-*
I no longer have the nvidia binary drivers installed and am on the Nouveau driver but the video playback is working and my computer doesn't lock up!
Best Answer
click tools --> preferences ---> video
first try changing output to opengl before disabling acceleration.