Commons:YouTube files/Downloading
Downloading videos from YouTube
YouTube's own download option
If you are downloading a video from your own YouTube account, you can try following the instructions here: "Download your own YouTube videos"
Website / Web app
You can search "youtube downloader" or "download youtube video" on Google to find websites / web apps that allow you to enter a YouTube video URL and get download links in many video formats.
Software
JDownloader allows downloading all videos from a specific account (useful for large numbers of videos) and specific formats, but is partly proprietary.
youtube-dl is also available as package in many GNU/Linux distributions, as well as macOS and Windows. However, youtube-dl does not offer a graphical user interface. Command line example:
youtube-dl --title --continue --retries 4 --write-info-json --write-description --all-subs --ignore-errors -f bestvideo+bestaudio --recode-video webm URL
If the video has a webm encoded version published (as according to youtube-dl -F URL
, you can use the following to download the highest quality webm version:
youtube-dl -f bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm] URL
If the YouTube video has subtitles, youtube2srt can be used to download them in SRT format.
Firefox
Apart from various extensions a simple JavaScript bookmarklet will do the job in Firefox. Instructions can be found at github. You can then click on the bookmark anytime while watching a YouTube video. A list of download options will pop up in the top of the page.
Chrome
Chrome extensions claiming to support YouTube downloads are banned from the Webstore, and permitted download extensions in the Webstore (i.e., not working for YouTube) can be still malware.
Nerds comfortable with running Chrome in "developer mode" with locally installed extensions could try the Chrome-Youtube-Downloader.
Various sites offer to determine download URLs for a given YouTube page (and similar providers), e.g., KeepVid.com, SFrom.net, SaveDeo.online, etc. Obviously these sites can track what you are trying to get, but should be less risky than "unknown code from unknown 3rd party" extensions.
- Simple example bookmarklets
javascript:void(window.open('http://savedeo.online/download?url='+location))
javascript:location.href='http://www.genyoutube.com/'+location.href.substring(24)
A recipe for the old (2011) Microsoft Download Manager for Windows: The determined download URLs typically contain some kind of session identification expiring after some time. If that hits you over very slow connections in the middle of a long download get a new URL, start it, stop it immediately, delete the almost empty remains, rename the incomplete old download to the new name, cancel the old download if still listed, and resume the new download. It should then continue where the first attempt was interrupted.
VLC media player
The following directions should work at least for a WebM version: Navigate to the desired video clip in your webbrowser. Copy the URL and open VLC media player and “Open Location from clipboard” (available from menu “Media” or via keyboard shortcut [Ctrl]+[V]). While the clip is playing or paused, open “Codec Infomation” (available from “Tools” menu or via keyboard shortcut [Ctrl]+[J]). Mark the URL string shown after “Location” (e.g. via triple click) and copy it to the clipboard (via context menu entry or keyboard shortcut [Ctrl]+[C]). Then open the dialogue window “Open Network stream...” and insert the copied URL. Click the dropdown menu available through the button next to the “Play” button select “Convert”. In the appearing new window select “Dump raw input”, type in a name for the “Destination file” and press the “Start” button. Now a file should be written to disk.
Conversion
Files not available in WebM have to be converted into WebM or Ogg Theora. See: Help:Converting video. If a file from youtube uses VP9 video, but vorbis audio, it can be converted using ffmpeg (or avconv) using a command like:
avconv -i inputfile.webm -acodec copy -vcodec libvpx out.webm
If you can get the (typically best) MP4 dash video, you might also want the M4A audio, to mux and transcode both into OGV or WebM, example:
ffmpeg -i input.mp4 -i input.m4a -f ogg -c:v libtheora -q:v 9 -c:a libvorbis -q:a 6 output.ogv
WebM
In May 2010, Google introduced the free WebM video encoding format, and many videos from YouTube are available under this format. As of November 2012, Wikimedia Commons accepts WebM uploads. If videos are available in .webm format on YouTube, they may not need to be converted to a different format before uploading them to Commons. However, often the VP9 video streams from youtube do not have audio, and need to be recombined with an audio stream before being uploaded to Commons.
![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Yt2mw.png/220px-Yt2mw.png)
Moving to Commons with youtube2mediawiki
If the YouTube video is available in the WebM format and you are comfortable with running Python scripts on your machine, one possibility is to use youtube2mediawiki:
- Download and install python 2.7
- Download youtube2mediawiki (e.g. as ZIP-file)
- Extract the archive and use the command line to start the python script.
See also
- Commons:Video
- Commons:Chunked uploads for files with 100MB or more
- Help:Converting video#WebM with mkvtoolnix
- Look at the Frequently Asked Questions.
- If you place
{{helpme}}
on your talk page, a volunteer will visit you there as soon as possible! - Join the #wikimedia-commons IRC channel for real-time chat. New to IRC? Click here to be connected instantly!
- Go to the Commons Help Desk.