I discovered a fascinating, brilliant trick you can use with any YouTube video name string while talking with Stephen Carradini yesterday. I shared a Doctor Who clip (this one, if you’re curious), and it took him a bit to get around to watching it because the URL didn’t exactly make it particularly clear what video I had sent him:
http://www.youtube.com/watch?v=LakwV3P3qII
We started talking about how YouTube should tag the name onto the end of the link, so that people could actually tell what video they were going to see, and Stephen posted an example of how it could work:
http://www.youtube.com/watch?v=LakwV3P3qII_drwhoblink
Lo and behold: that link works. I got curious and started poking around at different videos on YouTube and quickly discovered that you can append whatever text you want after the video ID; you’ll end up at the base URL again. All of YouTube’s link IDs are 10 character strings, with some mix of letters, numbers, and underscores allowed. Everything after the tenth character gets stripped. (Almost everything, that is…)
That’s halfway to fantastic — but only halfway because, as noted, you just get pushed down to that stripped URL. Thus, when I clicked on Stephen’s link, it truncated back down to the original link I sent him. Fine and good for one person, but what if you wanted to re-share it? The link has been changed, so you’d have to go back to where I originally shared it with you, or you’d have to add it on yourself.
Knowing a whee little bit about how these things tend to work,1 I wondered what happens if you use an &
to tell YouTube that you want to add something to the query you’re sending it.2 As I suspected, YouTube hangs onto that. Most likely, there are other queries that include more than just the video name — things like content source — so those parts get left in. In our case, that means that we can add a string to the link and it will be there for others to use if they want to reshare the video themselves.
Anybody who curiously hovered over (or clicked to) the Doctor Who video I referenced at the start of the post went to this link:
http://www.youtube.com/watch?v=LakwV3P3qII&name=DoctorWhoWibblyWobblySpeech
It’s like magic! You can see what the video is about, and even when you click the link, you still have the name of the video to share with all your friends!
And there ends your lesson in cool tricks with YouTube for the day, kids.