You need to enable the "universe" repository, that is the repo that contains the libx264-123 package.
You can do this by using the software center.
- open Ubuntu Software Center
- click on "Edit"
- select "Software Sources" from the drop-down menu
- make sure "Community-maintained free and open-source software
(universe)" has a check or is selected
- enter your password to accept the changes
run the following commands
sudo apt-get update
sudo apt-get purge x264 libx264-123 ttf-mscorefonts-installer
Before accepting the changes, take note of what will be uninstalled. You will need to re-install any packages removed with that command!
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get dist-upgrade
sudo apt-get install x264 lib264-123 ttf-mscorefonts-installer
Any other packages that were uninstalled earlier should be included in the final command to be reinstalled.
As a suggestion, you might want to install the synaptic package manager as it is a powerful and resourceful tool that is capable of configuring your sources as well as fixing and resolving dependency issues or broken packages.
sudo apt-get install synaptic
to start it up.