I think it's most likely done with the API. From what I remember from looking at it a while ago you can create the entry before, then it'll give you the right endpoint where you post your actual file to later on in the process. You just have to do that quickly enough so the endpoint doesn't expire.
It's apparently even been done before, see here at around the three minute mark: https://youtube.com/watch?v=UMYTSJTU0Vk
It's just a fun video of me messing around with Windows 8.1 I made a while back, trying out different "apps" and stuff. I thought it'd be a fun easter egg to download the video itself when I was trying out that strange YouTube MP3 downloader app :D
I didn't do it with the API (even though I tried to at first), just the normal youtube.com/upload site. I used Fiddler (Burpsuite alternative) to achieve this
I am not the first person to do this however, Insane Doll Gallery has made a video demonstrating this [youtu.be/ufq2Eb78kSU] (apparently used the API) and the channel NightFalls Studios has also used this trick in their My Little Pony comic animations [youtu.be/FDLvR9xrCag and youtu.be/7oXsOmqs6R4]