Download highest quality video and audio then merges them. FFmpeg is required!
youtube-dl is a command line based software for handling media, read more here.