• Hi all and welcome to TheWoodHaven2 brought into the 21st Century, kicking and screaming! We all have Alasdair to thank for the vast bulk of the heavy lifting to get us here, no more so than me because he's taken away a huge burden of responsibility from my shoulders and brought us to this new shiny home, with all your previous content (hopefully) still intact! Please peruse and feed back. There is still plenty to do, like changing the colour scheme, adding the banner graphic, tweaking the odd setting here and there so I have added a new thread in the 'Technical Issues, Bugs and Feature Requests' forum for you to add any issues you find, any missing settings or just anything you'd like to see added/removed from the feature set that Xenforo offers. We will get to everything over the coming weeks so please be patient, but add anything at all to the thread I mention above and we promise to get to them over the next few days/weeks/months. In the meantime, please enjoy!

YouTube Links

Woodster

Old Oak
Joined
Jan 26, 2017
Messages
2,558
Reaction score
1
Location
Dorset
For some time now I’ve needed to edit YouTube links to embed them on here. It’s not that uncommon as I have to on another site. Just recently thought I’ve needed to delete even more of the URL. Is it this site or YouTube that has changed? It’s not a bother once you know, just wondered?
 
Dunno, but very often links have "how you got here" information embedded, which you can delete without risk:

Here's Steve's latest, in its simplest form:

https://www.youtube.com/watch?v=NWz64eeVbwQ

It's fairly simple to decode. after the basic URL,

  • /watch? - should be self-evident, but the "?" indicates the start of one or more "attribute=value" pairs. In this case there's only one pair.
  • v=NWz64eeVbwQ The aforementioned attribute=value.
    In this case "v" (the "attribute") means 'video'.
    "NWz64eeVbwQ" is the 'value', the identifier ("ID") of the video itself. Note that it's case-sensitive, and has eleven letters and numbers because YT has so many uploads (numbers alone would be unmanageable). This is the important bit. It identifies the wanted video and will always be there (assuming the link works).

Now let's find it via a Google search for "Foolproof grinding station". Note that I'm using Google search to do this (how you search makes a difference):

https://youtu.be/NWz64eeVbwQ?si=7K0tH935aTMX0e7E

For a start the actual URL is different: youtu.be That's essentially just a slightly shortened URL (Google owns both youtube.com and youtube.be).
This time, also the ID NWz64eeVbwQ is straight on the end of the video, but there's still an attribute=value thing at the end: ?si=7K0tH935aTMX0e7E
It's got the same syntax as before: "?" denotes the start of a set of attribute=value pairs (and again there's just one). I'm guessing that "si=7K0tH935aTMX0e7E" tells the YouTube engine that the reference came from a Google search, but there are many, many attributes possible, depending on where you got the URL from, how it'll be used, etc. These strings of characters can get hugely long, and they're typically set by tracking cookies. If there's more than one pair, each is punctuated-off from the preceding ones by an ampersand ("&"), but the whole string of them starts with "?".

In short,
  1. whichever URL you use will get you to the same place (YouTube's normal play-one-video screen).
  2. you can delete anything in the link from immediately after the video's ID to the end, and it will still go to the right place.

There's only one other attribute=value pair I've ever found useful, which is specifying the point in the video where you want playback to start. here it is: https://youtu.be/NWz64eeVbwQ?t=176 You can probably decode it yourself (hint: 't' is for time).

So ?t=176 stuck on the end tells YouTube to start playing from 2min 56secs into the video. That's 176 seconds in...
If you don't want to do the mental arithmetic and you're at a PC, clicking the "Share" button will show you a checkbox (on the copy link option), that appends the start-point time automatically. But it adds some other tracking stuff too, so the link immediately above is constructed to omit that.

Hope that's helpful. I've omitted a lot of detail, but YouTube links can be tiny. And there's even a YouTube player function built into the forum's system, which you can use to embed a video. But to do that you need the video ID...
 
Back
Top