Edit: I don't know the answer but I assume from all the APIs I worked with in the past, but if you get the URL before the upload is completed then yeah it's pretty easy to "fake".
Maybe with this API, but when uploading a YouTube video through YouTube, you definitely get the URL before the actual upload finishes. I don't imagine it'd be terribly hard to reverse-engineer that API.
My guess is that you can start an upload, get the ID, and then stream unimportant and non-comitall video headers and chunks (e.g. subtitle tracks or other metadata) slowly enough to keep the server from closing the connection on you. Then you can just record your video and start uploading actual video chunks once ready.
Or maybe YouTube doesn't have a huge timeout for starting your upload, so you don't even have to do all of that.
Not for me. When I'm uploading a video even when it's at 0% I see "The URL of your uploaded video will be: blah"
So it seems you can get the URL immediately... maybe then stop the upload mess with the video and then resume the upload... but I assume the resume feature takes a hash or something to make sure it's the same file..
Yes, I thought I saw this too many years ago when I was making youtube videos, and uploading would be slow or broken. Although I never tried changing the video after getting the URL.
Have you confirmed this? In the example the ID is retrieved from the finished upload response, but on the actual YouTube website does tell you the video link with the ID in advance, and the API parameter 'part' does appear to allow you to get the ID.
My guess is that you can start an upload, get the ID, and then stream unimportant and non-comitall video headers and chunks (e.g. subtitle tracks or other metadata) slowly enough to keep the server from closing the connection on you. Then you can just record your video and start uploading actual video chunks once ready.
Or maybe YouTube doesn't have a huge timeout for starting your upload, so you don't even have to do all of that.