News for hackers. Stuff that matters.
Re:YouTube video has its own URL in it by qpleple on Tuesday July 16, 2019 @02:06PM (#20452422)
Anybody knows how?
Re:YouTube video has its own URL in it by figgyc on Tuesday July 16, 2019 @02:18PM (#20452517)
Just a guess but I assume this was done by starting an upload with the API which gave the guy the ID but then not streaming the actual video file until it was recorded. Looking at an example of the API in use ( https://developers.google.com/youtube/v3/docs/videos/insert#... ) that certainly seems plausible although I would imagine that there would be a timeout making it difficult.

edit: after looking at the other guy mentioning the time machine reference, my theory would be that he just spammed this API until he got a plausible URL and only then recorded and uploaded the video, probably would take a while but not forever considering how loose the URL actually is to delorean

Re:YouTube video has its own URL in it by Thaxll on Tuesday July 16, 2019 @02:21PM (#20452546)
The ID returns once your upload is completed.

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".

Re:YouTube video has its own URL in it by thegeomaster on Tuesday July 16, 2019 @02:32PM (#20452649)
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.

Re:YouTube video has its own URL in it by grecy on Tuesday July 16, 2019 @02:48PM (#20452799)
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..

Re:YouTube video has its own URL in it by cbanek on Tuesday July 16, 2019 @06:01PM (#20454285)
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.
Re:YouTube video has its own URL in it by figgyc on Tuesday July 16, 2019 @02:32PM (#20452645)
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.
Re:YouTube video has its own URL in it by untog on Tuesday July 16, 2019 @02:33PM (#20452661)
Presumably that is not always the case, though. What about live video, for example?
Re:YouTube video has its own URL in it by Avamander on Tuesday July 16, 2019 @02:26PM (#20452585)
Start uploading a video, pause the upload, you could already get the ID of the vid, render rest of the video and then continue the upload that now contains the ID of the video :D
Re:YouTube video has its own URL in it by vortico on Tuesday July 16, 2019 @02:34PM (#20452674)
This is probably it, I'm going to say Bingo.
Re:YouTube video has its own URL in it by techaddict009 on Tuesday July 16, 2019 @02:39PM (#20452708)
How to pause? and re upload pending part with new video?
Re:YouTube video has its own URL in it by adrianmonk on Tuesday July 16, 2019 @03:13PM (#20452994)
Here's a guess: upload from a browser running on Linux, and create a FUSE filesystem that blocks read() calls until you've generated the video.

I tried it with a named pipe ("mknod /tmp/foo.mp4 p") and it gave me an error, but before the error, the web page blocked during upload, but it showed me the URL that will be used (before I gave it a single byte of data).

Re:YouTube video has its own URL in it by zamadatix on Tuesday July 16, 2019 @02:43PM (#20452743)
I'm not sure you could do this in the website itself but this would be trivial using the YouTube APIs.
Re:YouTube video has its own URL in it by _nalply on Tuesday July 16, 2019 @02:32PM (#20452647)
And then cut away the beginning.
Re:YouTube video has its own URL in it by happytoexplain on Tuesday July 16, 2019 @02:07PM (#20452436)
My first guess is that new versions of videos can be uploaded if they're similar enough (not sure how it would judge that? visually???) and/or are updated shortly enough after upload.

Edit: Oh, I didn't even see the time travel reference in the ID. Maybe the ID is generated from metadata, and there's some endpoint where he was able to throw random metadata at it in an automated process until it came out looking somewhat like "delorean". Or he was able to get ahold of the algorithm locally for a quicker version of that process. In any case, I doubt he backwards-engineered anything.

Re:YouTube video has its own URL in it by rwmj on Tuesday July 16, 2019 @02:26PM (#20452580)
Wasn't there some discussion of Youtube allowing videos to be modified recently?
Re:YouTube video has its own URL in it by tudorw on Tuesday July 16, 2019 @02:25PM (#20452572)
Could you start uploading a file then append the video you create before the upload process completes?