Google happens to have its own upload_video.py script, and I could make it work with some, or rather a lot of, efforts mainly because of authentication. There’s probably a better way (comments welcome), but here’s what I had to do in Ubuntu 14.04, although I should work as well for 12.04 / 13.10:

In a computer with a Desktop interface, create a project called “Youtube Upload Script” with Google Cloud Console (the name and id does not matter) using the YouTube credential, and
Enable YouTube Data API v3 in APIs & auth->API.
In Credentials, click on CREATE NEW CLIENT ID, select Installed application for Application Type, and Other for Installed application type, and click Create Client ID.
You should now have a Client ID for native application that looks like:

privacyStatus lets you choose between unlisted, private or public.
The machine where the script is executed does not have access to a desktop browser, and you need to use a browser in another machine, run the following command instead:

It will provide a link to access in your browser, to get a verification code that you can enter in the terminal. This is only requires for the first time, after you can just upload the videos without user intervention for authentication.
If you run the command without noauth_local_webserver, and if you only have access to a text based web browser this won’t work, as they don’t usually support JavaScript.
That’s it, the video should now upload to your YouTube account.