YouTube Links

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.

As of 2014-10-13. See the latest version.

Author
nhyone
Ratings
0 0 0
Version
1.64
Created
2014-10-07
Updated
2014-10-13
License
N/A
Applies to

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.



On DASH videos (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.


On VEVO videos

When a VEVO video is first accessed, the video links will not be shown because the de-obfuscated code is gotten too late. You need to manually refresh to see the links. This should happen just once — until YouTube changes the de-obfuscated code again.

If the video links are still not shown, it could be because the new de-obfuscated code is not recognized anymore. This happens once every few months; it is a cat-and-mouse game. Post in the forum so that I know about it. :-D


Settings

There are some high-level settings in the script. Search for var userConfig = {.

var userConfig = {
  showVideoFormats: true,
  showVideoSize: true,
  tagLinks: true
  };

showVideoFormats: show the video formats at the top of the watch page.

Possible values: true / false / "btn"

Default: true

Set to false if you do not want the video formats.

The value "btn" (with the quotes) will show a VidFmts button at the top of the page. Click on the button to show the video formats.

showVideoSize: show video size.

Possible values: true / false

Default: true

Set to false if you do not want the video size. It will reduce network traffic.

tagLinks: tag all the links.

Possible values: true / false

Default: true

Set to false if you do not want to tag the video links. It will reduce network traffic.

Note: changes will be lost when the script is updated.


Known Issues

Check for update does not work in Firefox. (Since FF 29)


Changes

1.64 (Oct 2014)

  • Fixed event handling on Firefox; broken after FF 29. Hovering and VidFmts btn now work.
  • Use video size from page if available. (Reduce network traffic)
  • Remove 144v/240v videos completely if 720p/1080p are present to eliminate unnecessary querying. (Reduce network traffic)

1.63 (Oct 2014)

  • Change link to Greasy Fork.
  • Fixed video thumbnail text; broken after YouTube update.
  • Improved support for obfuscated-sig videos; broken after YouTube update.
  • Hide 144v and 240v if 720p/1080p are present.
  • Checks for updates every 5 days (not tested on Greasy Fork).

1.62 (Mar 2014)

Taken directly from http://userscripts-mirror.org/scripts/show/110007.html