HN Theater

The best talks and videos of Hacker News.

Hacker News Comments on
YouTube URL in the video

pi314159265358978 · Youtube · 681 HN points · 1 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention pi314159265358978's video "YouTube URL in the video".
Youtube Summary
Just for fun :-)
No D6Lorean was harmed in the making of this video.
HN Theater Rankings
  • Ranked #6 this year (2020) · view

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Oct 24, 2019 · schappim on News
Next up the op will be predicting youtube ids:
Jul 16, 2019 · 681 points, 147 comments · submitted by ignaloidas
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:
What an odd video!
Oh hi, creator of the video here!

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 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 [] (apparently used the API) and the channel NightFalls Studios has also used this trick in their My Little Pony comic animations [ and]

I always see creators popping up when something they made is mentioned. I find it too coincidental that you just happened to be on HN and happened to find the comment mentioning it. Do you use a service that scrapes sites and pings you of keyword mentions?
I do use a keyword notifier on Reddit (mostly just for my name), but in this case, I just coincidentally noticed the spike of views on my video and put the video url into Google, which led me here
Websites can use the "referer" [1] property to show you where visitors are coming from.


This is true, but for YouTube, the "referer" stats won't appear for a couple of days
Definitely not the same technique, but at one point I watched a Mario Maker puzzle level someone had uploaded that used part of its own level code as a clue. The trick was that only two characters of the level code were used, which is hexadecimal, so there are 256 combinations of those two characters, allowing the level creator to brute force re-uploading the level until getting the desired combination.
Reminds me of the brilliant New York Times crossword which "predicted" the winner of the US election in 1996:

This page seems to have zero text or image content unless I let SquareSpace run Javascript (and ostensibly track me).
Would your quality of life browsing the web not be infinitely better if you just span up a VM and sat behind a vpn on it?
Um, no. No, I don't think so.
But then they couldn’t be part of the group of people complaining about a website not working with JS anymore in almost every HN thread.
Just running uBlock Origin, the pictures did not load for me either.

I imagine that website is doing something that I wouldn't approve of.

The crossword ran on election day. The clue for the big across line was something like "headline tomorrow" and the crossing clues worked equally well to match "CLINTON ELECTED" and "BOBDOLE ELECTED". For example the first crossing was "Halloween animal" (CAT/BAT) and so on.
This crossword is available in NYT Crossword app, I just loaded it!

I'm going to try to solve it both ways. :)

Done more than once before, this one even has an explanation, which matches some of the guesses people already posted I think
Excellent, this explains it. The YouTube video you shared says the trick is to create a resumable upload using YouTube API. The steps involved :

1. create a resumable session (here we specify video length in bytes)

2. YouTube returns a session URI which contains the upload ID

3. create a video with the upload ID baked in (edit video to match length from step 1)

4. upload video to the session URI

Okay, sure. But how did he get a hash with a Back to the Future reference?
I have not been doing any edits of video for a long time... What are most people editing vids with these days?
I like It's free and open source, has good Linux support and all the features I need, and uses ffmpeg under the hood.
I use DaVinci Resolve for video editing on hobby projects.

Its cons, in my opinion: video stabilization results aren’t usable in my case most of the time; using color grading wheels and bars with a mouse is a bit tricky (it is better with a dedicated hardware interface, but I think Blackmagic could’ve improved the UI a bit if they weren’t selling said hardware); color grading node UI seems to be lacking the flexibility around copying and pasting grades. UI in general may be a tiny bit counter-intuitive at times, but the latest version improves on it and adds a dedicated pane for rapid editing workflows. Responses to UI input sometimes lag slightly on my MBPr circa 2015 with 16 GB RAM and built-in Intel Iris for GPU. Its pros are probably, well, everything else.

In a year or two of working with it I ran into only one feature unavailable in free version: lens distortion correction, which didn’t have a preset for the lens I have anyway so that didn’t justify a purchase.

When I do something VFX-y and augment live footage, I add After Effects to the mix (recently in tandem with Blender for 3D) due to superior out-of-the-box video stabilization results. AE’s UI seems to be feature-oriented, as opposed to streamlining particular use cases and workflows, which steepens the learning curve but to a degree makes sense as its use cases can be extremely diverse. I still prefer DaVinci on color grading and final rendering stages.

On Windows I'm using DaVinci Resolve. It's closed source but free, and professional quality.
I'm using kdenlive in linux, works great for my use. I know others are using blender too but I prefer the kdenlive UI.
Same, but I'm looking forward to trying the new Blender UI.
The one I'm familiar with is ffmpeg, a free, programmatic tool for simple to advanced use cases:
The free version of Hit Film is really excellent:

Good to put some VFX.

Aw, I was excited until I realized there's no Linux version :(
I must confess that it was one of the reasons that I left Linux. The other was parental control.
DaVinci Resolve.

Also available for GNU/Linux:

Most professionals use Adobe Premiere (+ Audition/After Effects), Final Cut Pro, DaVinci Resolve or Vegas Pro, some use Blender and Kdenlive is great for smaller and simpler edits and works on Linux
I used shotcut last year, even if it was a little crash-prone on windows 10.
As someone who uses Linux, I've found Blender + ffmpeg to be a powerful combo. Almost all of the videos on my channel use those two.

The video sequence editor in Blender is awesome for arranging tracks, audio, transitions, overlays, text, etc. And with ffmpeg you can move it to any format you need. To clean up audio I use Audacity.

Blender? Really? Huh, I've been looking for a program to do some simple video editing. Would you happen to know of a good tutorial for the basics of non-linear video editing with Blender?
I've used Blender for video editing, but I had to pull up a fairly long Youtube video on how to set up my environment and choose settings in Blender's UI.

I've just pulled down a 2.80 release candidate with the UI overhaul to see if it's any better. It's actually pretty nice. I just selected the video editor option in the startup screen, and things sort of worked like I expect in a NLE.

Oh huh, maybe I'll just get that then, thanks!
The Mike Meyers[1] youtube tutorials are great. He will do 2.8 based tutorials soon.


This seems very helpful, thanks!
It takes some getting used to, but once you do it's pretty easy to use.

I have a project file I use as a template with the top right panel set as Video Sequence Editor "Image Preview", the top left for Graph Editor (for transitions curves and stuff), the bottom half of the screen for the Video Sequence Editor for moving around the tracks. Then I just use Add -> Movie/Sound/Image/Effect for all of the actual editing.

When I'm done I switch one of the panels to Properties where I have the render settings configured to use ffmpeg for MP4 output and hit Animate.

Does Blender allow previewing the sound in videos yet?
Pitivi is great until it starts crashing. Kdenlive is stable but adding texts is painful there. I didn't like Blender video editing much (though I don't remember why anymore).
Interestingly, there's a frame or two at the very beginning that shows a document open that could suggest an exploit of some kind.


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.
In another comment, someone says the trick here is to do a resumable upload.

The document is covering the sign at the start of the video, so the uploader could have uploaded that section (without any text on the sign in-game), then "resumed" the upload with a different video that contains the URL on the sign and starts after he switches to the Minecraft window.

Except that the email at the beginning has the URL in it
Those look like "show notes" for the video creator to cover/notes to themselves.
From: Pi

To: Pi

Subject: Project Time Machine - Test #3

It sounds like someone's trying to create some fun meta-fiction - it looks like a letter from the creator's future self to his past-self, describing future-self's experience going through some iteration of the time-loop ("Don't talk about fate. You did it once and it was cringy.")

Indeed - using the Czech-language version of Word and email client.
Reminds me of the gif showing its own hash
A somewhat related story about why text posts on reddit are called "self posts" (copy-pasted from a thread from 5 years ago where someone asked why, linked near the top of the explanation):


It's actually a bit of a long story, but it's kind of an interesting part of reddit's history. Some of my details are probably off, but this is how I understand it.

A long, long time ago, reddit only supported submitting links. Link submissions were pretty much exactly the same as they still are now, including having a comments page that you could go to with an address like the page we're currently on:

If you look at that address, one thing to notice is that it includes the submission's ID in base-36, which for this post is "2bmy3l". If you go to and look at the links to the comments pages of the newest posts, you'll notice that their IDs are increasing. For example, at the time I'm writing this, the newest IDs are 2bo3uw, 2bo3ux, 2bo3uy.

Since the IDs are increasing, you can predict which ones are coming up. You know that the next ID after those ones should be 2bo3uz. So some person decided it would be funny if they pre-constructed a link like this:<id>/this_post_w... and then checked which IDs were coming up, filled in the "<id>" spot with one that should be used soon, and submitted it.

If they got their timing right, they'd end up with a link post that actually went nowhere. Clicking it would just take you to its own comments page, since they had managed to predict the url that the comments page would have. This was a "self post", a post that linked to itself.

So this was a pretty neat trick, and when it was successfully pulled off for the first time, it got a whole bunch of attention. Unfortunately, reddit's never been very good at just seeing some new popular thing as a novelty and moving on. No, of course pretty much everybody wanted to get their own "self post". The majority of the new submissions to the site were suddenly just people trying to make a self post, completely drowning out all the real submissions.

It was causing a gigantic mess, so one of the admins at the time decided to get people to stop by taking all the fun out of the game. They made it so that you could just choose to make a self post. You didn't have to guess the ID or anything, you just selected that you wanted to make a self post and automatically got one. It didn't have the option to add additional text or anything yet (that came later), it was just a title that linked to its own comments page.

So that's how self posts came about, and where the name originated. A quick solution to a mess being made by users that eventually turned into one of the most important pieces of reddit.

Oh man, I remember trying (and succeeding) to do this with comments, back before you had a 30 second grace period before getting the asterisk. I wrote a comment that linked to itself.

I later became "more" famous for inadvertently DDoSing reddit, and forgot all about it until someone replied to one of my comments saying "aren't you the asshole who brought down reddit as an April fool's joke?". "Huh? No! Oh, wait".

I created the f7u12 subreddit, so I thought it would be funny if I put the "reddit is down" graphic over the subreddit front page with CSS.

It had millions of subscribers. They all kept refreshing.

Lol, that's good. Also le f7u12, haven't thought about that in years .. I guess you brought rageguy over from 4chan then?
It had already spread by then, I just created the subreddit and it took off.
Oh, you created that? I am a bit ashamed to admit that you provided quite a lot of hours of entertainment during my university days. 8)
> Unfortunately, reddit's never been very good at just seeing some new popular thing as a novelty and moving on.

So very reddit.

Do you know what year that was?

January 22, 2008 is when the built-in feature to make self-posts was added:
Vaguely related: I noticed that the old reddit UI would display self posts as "self.subredditname" and link posts to as "". I realized there was a potential confusion if your tld is the subreddit name, and the 2nd and only other label is "self". So I registered and posted a link to it to /r/finance .

I guess this could be referred to as a YouTube quine (as opposed to a YouTube queen.) It'd be even more amusing if the video ID contained something meaningful --- I've seen that happen by coincidence.
For some users, at least for me, it is actually possible to just replace the video file in the upload interface on YouTubes website, within the first hour or so. Using this method this would be easy.
Maybe 1) start upload till URL appears 2) go offline 3) replace file 4) go online

1) Make an educated guess about what the URL will be and put it in the video.

2) Upload.

3) If you were wrong, delete it and go to 1).

I'm half joking, but that's basically what they did for a git utility that would let you edit histories so that messages could refer (by partial hash) to later commits. I forget the name, though, and couldn't find it on a quick search.

how long until you get the video id ? if you generate a lazy stream of images you can ~self reference
You're right, I did what you said and it works. This is easier than I expected.

Nice, was a lucky guess!
Another way to achieve this would be to make a video which flashes each possible digit of the YouTube video ID alphabet once for each digit, then use YouTube's video editor to cut out all the incorrect digits.
The video, running at 60fps, would have to be 38996161157 years long for this to be a possibility Even if you predicted the first 3 symbols of the id, you'd still need a 148758 years long video

38 frames * 8 (or however many possible characters there are.


It's 62^11 * 0.016 (seconds). 11 because 11-character-long id; 62 because 62 possible characters in each location (26 lowercase, 26 uppercase, 10 numerals); 16ms in each frame of a 60fps video.

I calculated mine by doing 64^11/60/60/60/24/365

YouTube uses base64 for the URLs, which makes 64 different characters

I divided it by 60 frames, 60 seconds, 60 minutes, 24 hours and 365 days

That doesn’t seem to be what is being suggested.

   for idIndex in 0..<11 {
    for character in setOfPossible {
     frame += 1
each possible digit, not each possible ID.

You seem to be calculating some combinatorial explosion, where there probably is none

You need to flash each possible ID, as the YouTube video editor only allows for trimming
No, YouTube lets you cut out parts of a video retroactively. “Video editor” might be the wrong name.
By "only allows for trimming" you're saying that YouTube only allows you to delete from the start or end of a video? You can't delete sections from the middle?
It would be more useful if Google / Youtube's API allowed 'reserving a slot' which would create a video ID endpoint but not finalize the content. Accounts might have a per-account limit of some small number of floating slots which would also timeout after a day or two.

This wouldn't violate the write-once model since the submission wouldn't be completed, it'd just defer finalizing and publishing it for a little.

More useful for what application? Other than a novelty, why would anyone need a reserved spot?
To provide a link to next week's video/ the next of a series inside the previous?
URL shorteners do this trick, can just update the redirect. Most people just put videos in a playlist so it comes recommended next though.
And end cards were made for exactly this purpose - you can't put them in the description but at the end you can link to latest video in a playlist.
Video descriptions can be edited.
Some workflows around video production might find it useful to have the actual YouTube URL early in the process.
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.

I'm wondering how this could actually be exploited. Is there any value in knowing your URL ahead of time besides impressing the HN crowd?
you can post links all around the web and do some kind of SEO-bomb for the video if you can guess the URL before hand, but that quickly happens organically for popular/viral stuff anyway
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.


You can also permute your ID space using a block cipher.
This reminds me of the holy Grail (for me anyway) of a file containing its own hash
It's not that difficult to do if you use a weak hash (eg crc32) and bruteforce it.

Also you could pad the file with some extra data, but that feels like cheating.

How about a comment containing it's own item ID ...? 20456050
Actually, quantum mechanics allows this
What do you know, this has been posted in another comment in the thread:
You know you can edit previously uploaded videos,right?
Ok now give me a text file (or some kind of image file) that contains its own md5/sha1/sha256 hash in the text (or in the image)


  It's a PDF, a ZIP, and an HTML page:
  If you drop it on itself in a browser,
  it can give you a PDF viewer, a video
  and a PNG explaining the whole file structure.
  All these files have the same MD5.

The explanation for how the MD5 trick is achieved is in the PDF, starting on page 21.

Edit: whoops, probably more relevant is this earlier issue, which has the MD5 printed on the cover. The relevant article in that issue starts on page 46.

May be relevant: I have written OSS launcher similar to this. It is search based and you can also hide apps you don't want to see
Can we add "[video]" to this title?
amenghra is a self referencing tweet and more impressive (since there’s no api to “cheat”).
Can't you just upload a video, get the url. Make a new video and upload it as an edit?
No, you can edit a video in YT but you can't reupload a new video with the same URL.
So reupload a new video as an edit?
I am very sure that high profile users can do that.

edit: Yes, sorry for the crappy source though ->

Anybody knows how?
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
How to pause? and re upload pending part with new video?
I'm not sure you could do this in the website itself but this would be trivial using the YouTube APIs.
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).

What size do you return when your browser uses stat on your file before opening it?
And then cut away the beginning.
This is probably it, I'm going to say Bingo.
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.

Wasn't there some discussion of Youtube allowing videos to be modified recently?
Could you start uploading a file then append the video you create before the upload process completes?
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 ( ) 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

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

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.
Presumably that is not always the case, though. What about live video, for example?
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.

Live streaming your live stream
Wouldn't it say streamed instead of published then in the description box?
Somewhat in the same vein:
Clever way to do it :) And the frames at the start are there, because his solution needed time to get the ID in order to dynamically show it inside Minecraft.
well apparently some guy in the comments did it as well. I'd be curious to see someone actually reproduce this on HN.
my guess is the url is a hash of the video upload time, username , video length (is deterministic) so he uploaded 100 (or 1000) and kept the one that worked

tip: if you see something magic it's usually just dilligence in disguise. (like the Prestige)

The video shows a '0' but the url has an 'O'
I thought, '0' (zero) is filled/dashed in that font to distinguish it from 'O'. Or you're trolling. ;-)
If the video was reading the actual url in real time, then, if I add another query string parameter it should show up on the video. Which is not the case. So I assume it was somehow edited.
i thought this was going to be an infinity mirror. oh well
Reminds me of the guy that posted this:

This could be done by editing a comment?

Like this:

Okay, how did you do it?
Post first half, then edit? Just a guess.
My actual technique:

- post first half

- fumble around trying to find the link

- get despearate because my comment only shows an /edit link

- find another link from someone else, paste that in

- change the /item?id=<n> to the id of my /edit?id=<n> comment

- save the change

- follow the link

- follow the link a few more times

- relax.

This explanation totally ruined the magic trick. lol
Let's see if that works.


Haha, gold.
Haha well done! I also remember this:
I thought you were going to link to this thread [0] on HN, which would upvote itself if you clicked on it.

Big F deal
C.f. this tweet, which has a link to itself:

(And as we all know Twitter has no edit button, no post-upload shenanigans are possible here, just some clever guessing and reverse-engineering Twitter's ID generation algorithm)

This tweet (or one like it) caused a massive Twitter outage.
Nothing like finding a loop in a simple graph...
Used to work there :D
Was there a post-mortem about it?
Was it because Twitter tried to recursively load the previews?
Is that because some algorithm assumed link cycles weren't possible?
Yeah, "If you type 'google' into google.. you can breakthe internet, so please no one try it" IT Crowd /s
There's a decent write-up of how to do this here:

As you said, it largely relies on reverse engineering and bruteforcing Twitter's ID generation.

Bot author here. That post was before twitter made changes on the id generation. Now it consists of four parts that you need to guess (the datacenterId, the workerId, a sequence and a timestamp). For more details, the bot repo is here:
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ [email protected]
;laksdfhjdhksalkfj more things ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.