Greasy Fork is available in English.
Download YouTube videos. Video formats are listed at the top of the watch page. Video links are tagged so that they can be downloaded easily.
Show video formats at the top of the watch page. Tag every video link so that they can be downloaded easily.
The video links on the page are scanned in batches to avoid overloading the network. This works out nicely because YouTube has a request flood detector.
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.
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
YouTube now supports 60fps (Oct 2014). The 720p/1080p DASH videos have itag 298/299 instead of 136/137. They can be downloaded as usual. However, I have added HFR (High Frame Rate) to make it more obvious.
Note: this is no longer available since 2016.
256kbps MP4 audio can now be downloaded! The link is only added for the watch page because it requires an additional HTTP request.
Note that just because a file is encoded in 256kbps does not mean it is really 256kbps. Check its spectrogram.
ffmpeg -i video.mp4 -vn audio.wav sox audio.wav -n spectrogram
A real 256kbps audio file is not cut-off at 16kHz (128kbps) or 18kHz (192kbps). Some 192kbps audio are upscaled too.
There are some high-level settings in the script. Search for var userConfig = {
.
var userConfig = { copyToClipboard: true, filteredFormats: [], keepFormats: [], showVideoFormats: true, showVideoSize: true, tagLinks: true };
Note: changes will be lost when the script is updated.
Added in v2.
Possible values: true, false
Default: true
Was false
for Edge browser before v2.41. It used to honour the download attribute for cross-origin resource and prompts to download with the correct filename. Other browsers play the video instead.
The 720p/MP4 tag is exempted as clicking it will download the video.
Added in v2.47.
Possible values: true, false
Default: true
Added in v1.71.
Possible values: 3GP, FLV, M4A, M4V, MP4, WEBM, ...
Default: none
To filter out WEBM videos, set it to [ "WEBM" ]
.
Added in v1.94.
Possible values: 3GP, FLV, M4A, M4V, MP4, WEBM, ...
Default: none
To always show 3GP videos, set it to [ "3GP" ]
.
Added in v1.50, "btn" in v1.62.
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.
Added in v1.62.
Possible values: true, false
Default: true
Set to false if you do not want the video size. It will reduce network traffic slightly.
Added in v1.00, "label" in v2.
Possible values: true, false, "label"
Default: true
Set to false if you do not want to tag the video links. It will reduce network traffic.
If set to "label"
, click on the tag to open pop-up menu.
Added in v2.40.
Possible values: true, false
Default: true
Set to false if you want binary prefix, e.g. MiB. The file size will be in units of 2^n rather than 10^n.
From v2, settings can be changed without editing the script. There is still no UI.
Steps:
Set settings in this format:
localStorage["ujsYtLinks.cfg.<setting>"] = <value>
Examples:
localStorage["ujsYtLinks.cfg.tagLinks"] = false localStorage["ujsYtLinks.cfg.showVideoFormats"] = '"btn"' localStorage["ujsYtLinks.cfg.keepFormats"] = '[ "3GP" ]'
Delete the setting to get back the original behavior:
localStorage.removeItem("ujsYtLinks.cfg.<setting>")
Example:
localStorage.removeItem("ujsYtLinks.cfg.tagLinks")
YouTube Links greatly resembles YouTube HD Suite in both looks and functionality. I had been using it for a long time and like how it worked. I especially like the video link tagging; I could tell at a glance if a video was HD or not. Nowadays, almost every video is at least 720p.
When the script broke after YouTube changed its page format on 3rd August 2011, I decided to learn how it works and write my own from scratch. The first version was uploaded to userscripts.org on 12th Aug 2011.
Does not work in YouTube Premium
Download does not work anymore
Taken directly from http://userscripts-mirror.org/scripts/show/110007.html