More stable YouTube HTML5 URL decoding, adapted from https://github.com/endlesshack/youtube-video.