3 ms·
Tell HN: You can link to segment of a YouTube video with stop time query string
This began as an Ask HN (after much Googling), but now I’ve found the answer and thought I'd share it. Here are seven seconds of a Joel Spolsky talk:
https://www.youtube.com/embed/0nbkaYsR94c?start=41&end=48
1. Use the embed URL (https://youtube.com/embed/ID) rather than the watch URL (https://youtube.com/watch?v=ID or https://youtube.com/watch/ID)
2. Specify the start time, end time, or both, using the url parameters "start" and "end". The units are seconds. I haven't figured out a way to use other units but it might be possible.
I’d run across mention of YouTube allowing one to link to a segment of a video using ?start=30&end=60 (or in some cases "stop" rather than "end") in various articles, but these parameters don’t work on the watch URL. When sharing a regular YouTube link, start=30 turns into t=30s and the stop or end parameter gets thrown out. I assumed YouTube had removed this useful functionality — but the docs for the embedded player (https://developers.google.com/youtube/player_parameters?csw=1#end) still mentioned the end parameter, so I tried using them on the embed URL when not embedded, and it worked.
- themodelplumber 4y agoThis is great and much appreciated, thank you.