6 ms·
YouTube seems to use 10 characters for their video id, does anyone know what is the tech behind that?
by orestis 5y ago
YouTube seems to use 10 characters for their video id, does anyone know what is the tech behind that?
- paulgb 5y agoThere’s a way of using some number theory to generate a random-looking sequence of sort codes without repeating them, I wonder if they do something like that. I implemented the technique in Rust here: https://github.com/paulgb/tiny_id https://github.com/paulgb/tiny_id
- traceroute66 5y ago> YouTube seems to use 10 characters FYI no commitment is made to that by YouTube. The API merely defines it as a "string" with no further commitment as to length, format or characters [1] As for the "how?" there is an unsubstantiated answer based on reverse-engineering posted on SO[2] [1] https://developers.google.com/youtube/v3/docs/videos#id [2] https://webapps.stackexchange.com/a/101153
- throwaway525142 5y agoI remembered it being 11 characters, and indeed: https://www.youtube.com/watch?v=dQw4w9WgXcQ https://www.youtube.com/watch?v=dQw4w9WgXcQ.