Skip to content
0:00 / 0:00

#base64#unique-identifiers#youtube

Will YouTube Ever Run Out Of Video IDs?

Tom Scott

6.7M subscribers • 28 videos on Hallway

YouTube
  • Recommended by 1 person: 1 on Hacker News.
  • Presented by Tom Scott

Beginner. No background in the topic needed.

10M views10 years ago1 recommendation

Computer scienceAlgorithmsComputation and complexity

Tom Scott explains how YouTube's 11-character video IDs work using Base 64 encoding and calculates the astronomical number of unique IDs available.

In the URL of each YouTube video is the 11-character video ID, unique for each video. Can they ever run out? Just how many videos can YouTube handle? To work it out, we need to talk about counting systems, and about something called Base 64. Want to know how the single camera shot was done? "Matt Bought a DJI Osmo and It's Surprisingly Good" is today's video over on the Park Bench: youtube.com/watch?v=Dyy41yAs8nc I'm at tomscott.com/ or on Twitter at twitter.com/tomscott or on Facebook at facebook.com/tomscott or on Instagram as tomscottgo. Filmed by Matt Gray, who's at mattg.co.uk or @unnamedculprit on basically everything everywhere.

Why it's here

1 person recommends this

What people say. Recommended as an entertaining and clear explanation of Base 64 encoding and unique identifier spaces.

apocalyptic0n3on Hacker News • Recommends

On “YouTubers have to declare ads. Why doesn't anyone else? [video]”

Him dancing around and celebrating at the end of his 5 minute explanation of YouTube IDs 1 is such an uplifting thing to watch. 1: link to this video

tabletthrowawayon Hacker News • Mentions

On ““Older unlisted videos will be made private unless you opt out””

Obligatory: link to this video There’s too many IDs to iterate through. Searching for $defatltvideoname for some camera is far more effective for that. Scarily so.

kaliszadon Hacker News • Mentions

On “India is leading IPv6 migration with 61.67% adoption”

Well, have fun guessing 2^64 possibilities. YouTube lists even private videos "secured" using 11 BASE64 characters (66 bits in theory, but they seem to use just 64 bits). You can watch Tom Scott explain it: link to this video CG-NAT doesn't really prevent geolocation. Better services will still pin-point you to the nearest city. There are perhaps easier ways to get your private info or your money - phishing and ransomware seem to be still very popular. Don't have to hack games that only relatively few people have. It is more profitable to attack a bigger market or more wealthy institutions or companies in foreign countries. Also, if you hack the central game server, you will have a lot more victims...…

ChickenNuggeron Hacker News • Mentions

On “Show HN: Spaghettify – A VSCode Extension to make your code worse with AI”

Two thoughts: * This is ridiculous. Why would you do this? Which made think of this quote: "Which is ridiculous and unnecessary but when has that ever stopped programmers?" from one of my favorite Tom Scott videos: link to this video * How to Write Unmaintainable Code: link

dajonkeron Hacker News • Mentions

On “Bye Sequence, Hello UUIDv7”

…(which would be sort of visible with UUIDv7) and prevents anyone from attempting to enumerate data by changing the integer in URLs. I thought about using UUIDs as external keys but the only compelling use case seems to be the ability to generate keys from many decoupled sources that have to be merged later. 64 bit should be enough for most things link to this video…

Vicinity9635on Hacker News • Mentions

On “PySkyWiFi: Free stupid wi-fi on long-haul flights”

>Author and programmer Sam Hughes, by the way, pushed this to the limit and invented Base 65,536, which includes basically every character from every language. It is ridiculous and unnecessary, but when has that ever stopped programmers? link to this video

ekipanon Hacker News • Mentions

On “Cosmologically Unique IDs”

…w 32 bits for a random number. Four billion IDs for each second. There's a Tom Scott video 2 that describes Youtube video IDs as 11-digit base-64 random numbers, but I don't see any official documentation about that. At the end he says how many IDs are available but I don't think he considers collisions via the birthday paradox. 1: link 2: link to this video…