Live data from Hacker News

YouTube video has its own URL in it

youtube.com

1–10 of 160 posts

Re: YouTube video has its own URL in it

#3
This looks really interesting. Has YouTube ever published their URL generation technique?

Any one has a guess how this was done? If they use a one way hash over metadata and content if video does this not mean that someone has figured out their secret key.

Re: YouTube video has its own URL in it

#4
post #2

Anybody knows how?

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

#6
post #2

Anybody knows how?

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

#7

Interestingly, there's a frame or two at the very beginning that shows a document open that could suggest an exploit of some kind. Screenshot: https://i.imgur.com/3oTXTDK.png

Those look like "show notes" for the video creator to cover/notes to themselves.

Re: YouTube video has its own URL in it

#8
post #3

This looks really interesting. Has YouTube ever published their URL generation technique? Any one has a guess how this was done? If they use a one way hash over metadata and content if video does this not mean that someone has figured out their secret key.

As far as I was aware, the ID is just a hashed version of the actual database id being passed through an algorithm using base64. hashids[0] implements a similar method of obfuscating IDs.

0: https://hashids.org/

Re: YouTube video has its own URL in it

#9
post #6
post #2

Anybody knows how?

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…

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

#10

Interestingly, there's a frame or two at the very beginning that shows a document open that could suggest an exploit of some kind. Screenshot: https://i.imgur.com/3oTXTDK.png

I believe that’s just part of the joke. It’s a mock email from the future, telling him what the URL will be and how to make the video.
Post reply on HN