Script Summary: Tags every video link on a YouTube page so that they can be downloaded easily, using the title as the filename. On the watch page, it also shows all the available video formats at the top of the page.
YouTube Links does two things. It tags every video link on a YouTube page so that they can be downloaded easily. On the watch page, it also shows all the available video formats at the top of the page.
The look-n-feel resembles YouTube HD Suite. I have been using it for a long time and like how it works. When it broke after YouTube changed its page format on 3rd August 2011, I decided to learn how it works and write my own from scratch.
Tested on Firefox 6.0 (with Greasemonkey), Chrome 13, Opera 11.50 and Safari 5.1.7 (with NinjaKit).
Not tested on IE. Won't work on IE 7.
- Shows the available file format, resolution (info from the page itself) and size
- Scans the video links on the page in batches to avoid overloading the network
- The video links have the correct filename, so they can be saved easily
- Has an updater; checks for updates every 3 days
- Uses localStorage instead of cookies
- There is currently no user options.
- It does not auto-redirect to the highest/preferred video format.
- Does not work on the mobile YouTube pages.
- Most probably won't work on mobile browsers. Shows up on Tampermonkey (Android), but is unable to download the videos.
- Obfuscated-sig videos do not work.
Adaptive Video Streaming
YouTube now uses adaptive video streaming for 480p and 1080p videos (Oct 2013). What this means is that the video and audio streams are now separate.
They are indicated as M4V and M4A. They have to be downloaded separately and mux'ed before playing. If using ffmpeg:
ffmpeg -i vid.m4v -i vid.m4a -vcodec copy -acodec copy vid.mp4
The filename is always
videoplayback. Before saving, select and copy the page title first. Then right-click on the video link, save-as and paste the title. Set the extension to either m4v or m4a to distinguish between video and audio.
Version 1.62 (Mar 2014)
- Use vertical res to map video res (eg ?x720 -> 720p). DASH videos have many odd-ball resolutions.
- Map itags 80-82, 100-102 to 3D.
- Added config option to not get video size.
- Added config option to show VidFmt btn.
Version 1.61 (Feb 2014)
- Improved support for obfuscated-sig videos.
Version 1.60 (Jan 2014)
- Support obfuscated-sig videos.
Version 1.50 (Jan 2014)
- Added config option to not scan the formats for the current video.
- Get video info only for links in the viewport. (Reduce network traffic)
- Mark non-video <a> links so that they will be ignored. (Less overhead)
- Removed special handling for Channel page.
- Fail on DRM videos right away.
- Bugfix (1.00): use page protocol (HTTP/HTTPS) to check for update.
- Bugfix (1.00): fixed scroll event handling.
- Bugfix (1.00): don't add 'position: relative' if the parent node is already absolute/relative.
Version 1.43 (Dec 2013)
- Don't show video link on buttons.
- Map 480x360 to 360f.
Version 1.42 (Dec 2013)
- Don't show video link on Prev, Next and 'Play All' buttons.
- Fail on obfuscated-sig videos right away.
Version 1.41 (Dec 2013)
- Snap to standard resolutions. Some adaptive video streams have odd-ball resolutions.
Version 1.40 (Dec 2013)
- Show adaptive video streams (notably 480p and 1080p).
- Reload the links when the user changes video; YouTube now reuses the same page.
- Make it work on Chrome 27+.
Version 1.36 (Jul 2013)
- Support 87-sig videos.
- Show error if unable to get file size.
Version 1.35 (Jul 2013)
- Support 85-sig videos.
- Bugfix (1.23): check for update broken. Finally detected and fixed!
Version 1.34 (Jul 2013)
- Support 90/92-sig videos.
Version 1.33 (Jul 2013)
- Show "NA" for not-avail videos.
- Support 81/83-sig VEVO videos; broken after YouTube update.
Version 1.32 (Jan 2013)
- Fixed channel video; broken after YouTube update.
- Move video links above the video again; shifted after YouTube update.
- Group video links by video res.
- Shortened video res (1280x720 -> 720p).
- Handles 1.5k video res.
Version 1.31 (Jan 2013)
- Fixed filename; broken after YouTube update.
Version 1.30 (Oct 2012)
- Show file size on Firefox and Chrome.
Version 1.23 (Oct 2012)
- Show available update on Chrome.
- Bugfix (1.00): check for update does not work in Chrome! Sort of fixed. However, Chrome 21 onwards does not allow direct installation of userscripts.
- Bugfix (1.22): forgot to change version from 1.21 to 1.22!
Version 1.22 (Sep 2012)
- Added signature to video link, or YouTube will reject it.
- Show '3GP' instead of '?'.
Version 1.21 (Sep 2011)
- Bugfix (1.20): new version changes is shown as "undefined" if not present.
- Bugfix (1.20): video formats tooltip is positioned wrongly in Chrome if page is scrolled.
- Shows video formats for the current video in the user's channel.
- Implement list of video formats when hover over a video link as a tooltip.
- Show the new version's changes as tooltip in the update notification.
- Slow down scanning for video links.
- Bugfix (1.10): the list of video formats when hover over a video link may be clipped, depending on the page layout.
- Bugfix (1.10): the list of video formats when hover over a video link may wrap in the user's channel page.
- Shows all video formats when hover over the video links.
- Map : to - and " to ' instead of _ in filename.
- Bugfix (1.00): font color is incorrect in playlists. This is because the page's CSS has higher specificity.
- Bugfix (1.00): new video links on the page are not tagged if they are loaded via Ajax.
- Bugfix (1.00): new version is displayed incorrectly — 1.01 will be shown as 1.0!
- Bugfix (1.00): encoded HTML entities & and " are not handled properly in titles.
- Bugfix (1.00): URL to update script is specified wrongly — 1.0 users will not see the update!