diff --git a/about.html b/about.html new file mode 100644 index 000000000..eaf9b09f0 --- /dev/null +++ b/about.html @@ -0,0 +1,35 @@ + + + + +About youtube-dl + + + + + + + +
youtube-dlAbout the program
+ +

What is it?

+ +

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.x (x being at least 4), and it is not platform specific. It should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

+ +

I will try to keep it updated if YouTube.com changes the way you access their videos. After all, it is a simple and short program. However, I can not guarantee anything. If you detect it stops working, check for new versions and/or inform me about the problem, indicating the program version you are using. My contact information is at rg03.wordpress.com. If the program stops working and I can not solve the problem but you have a solution, I would like to know it. Furthermore, if you think you can maintain the program yourself, tell me.

+ +

Thanks for all the feedback received so far. I am glad people find my program useful.

+ +

Authors

+ + + +
Copyright © 2006-2010 Ricardo Garcia Gonzalez
+ + diff --git a/index.html.in b/documentation.html similarity index 67% rename from index.html.in rename to documentation.html index 1c31138dc..989538658 100644 --- a/index.html.in +++ b/documentation.html @@ -3,23 +3,31 @@ -youtube-dl +youtube-dl: Documentation -

youtube-dl: Download videos from YouTube.com

-
(and more...)
+ + + +
youtube-dlDocumentation
-

What is it?

+
+

Index

-

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.x (x being at least 4), and it's not platform specific. It should work in your Unix box, in Windows or in Mac OS X. The latest version is @PROGRAM_VERSION@. It's released to the public domain, which means you can modify it, redistribute it or use it however you like.

+

+Getting started
+More usage tips
+Frequently Asked Questions
+Supported sites
+Proxy support
+YouTube formats
+Output template
+

+
-

I'll try to keep it updated if YouTube.com changes the way you access their videos. After all, it's a simple and short program. However, I can't guarantee anything. If you detect it stops working, check for new versions and/or inform me about the problem, indicating the program version you are using. My contact information is at rg03.wordpress.com. If the program stops working and I can't solve the problem but you have a solution, I'd like to know it. If that happens and you feel you can maintain the program yourself, tell me.

- -

Thanks for all the feedback received so far. I'm glad people find my program useful.

- -

Usage instructions

+

Getting started

In Windows, once you have installed the Python interpreter, save the program with the .py extension and put it somewhere in the PATH. Try to follow the guide to install youtube-dl under Windows.

@@ -29,29 +37,17 @@

If you try to run the program and you receive an error message containing the keyword SyntaxError near the end, it means your Python interpreter is too old or from the 3.x branch.

-

More usage tips

+

More usage tips

The program is usually invoked as youtube-dl followed by options and the video URLs. Listing all the options here would make this text too long, so you can run youtube-dl --help and get a summary of them. From that point on you can start experimenting with the different options yourself. The most common ones are -t (or -l) to include the video title in the file name. Also, the -o option can specify the output file name and path. It allows special character sequences that can be used as templates to be replaced. See the "Output template" section for more details.

Some YouTube videos are served using Adobe's proprietary RTMP protocol, which imposes DRM restrictions and encrypts the connection. youtube-dl is not able to download these videos by itself. However, it will attempt to use the rtmpdump program, if it's installed in your system, to download these videos.

-

Download it

- -

Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called Save Target As or Save Link As, depending on the web browser you are using.

- -

@PROGRAM_VERSION@

- - - -

FAQ

+

Frequently Asked Questions

The Frequently Asked Questions page contains answers to some common questions that pop up in my e-mail and in the issue tracker. Be sure to check it before reporting problems.

-

Supported sites

+

Supported sites

-

Proxy support

+

Proxy support

-

youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in http://proxy_machine_name:port/.

+

youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in http://proxy_machine_name:port/.

-

YouTube formats

+

YouTube formats

Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. Instead of keeping a video format table here, I will refer you to the list of YouTube formats on Wikipedia.

-

Output template

+

Output template

The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in youtube-dl -o funny_video.flv "http://some/video". However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format %(NAME)s. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:

@@ -92,15 +88,6 @@

As you may have guessed, the default template is %(id)s.%(ext)s. When some command line options are used, it's replaced by other templates like %(title)s-%(id)s.%(ext)s. You can specify your own.

-

Authors

- - -
Copyright © 2006-2010 Ricardo Garcia Gonzalez
diff --git a/download.html b/download.html new file mode 100644 index 000000000..ecf68cfa5 --- /dev/null +++ b/download.html @@ -0,0 +1,30 @@ + + + + +youtube-dl: Download Page + + + + + + + +
youtube-dlDownload Page
+ +

Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called Save Target As or Save Link As, depending on the web browser you are using.

+ +

Remember youtube-dl requires Python version 2.x (x being at least 4) to work.

+ +

2010.10.24

+ + + +
Copyright © 2006-2010 Ricardo Garcia Gonzalez
+ + diff --git a/download.html.in b/download.html.in new file mode 100644 index 000000000..3c070f376 --- /dev/null +++ b/download.html.in @@ -0,0 +1,30 @@ + + + + +youtube-dl: Download Page + + + + + + + +
youtube-dlDownload Page
+ +

Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called Save Target As or Save Link As, depending on the web browser you are using.

+ +

Remember youtube-dl requires Python version 2.x (x being at least 4) to work.

+ +

@PROGRAM_VERSION@

+ + + +
Copyright © 2006-2010 Ricardo Garcia Gonzalez
+ + diff --git a/faq.html b/faq.html index a5cef0159..d5d0972ce 100644 --- a/faq.html +++ b/faq.html @@ -3,31 +3,47 @@ -youtube-dl Frequently Asked Questions +youtube-dl: Frequently Asked Questions -

youtube-dl Frequently Asked Questions

-

The program has stopped working. Please fix it.

+ + + +
youtube-dlFrequently Asked Questions
+ +
+

Questions

+ +

+The program has stopped working. Please fix it.
+Can you please put the -b option back?
+I get HTTP error 402 when trying to download a video. What's this?
+I have downloaded a video but how can I play it?
+Sometimes the program does not download the best quality format
+

+
+ +

The program has stopped working. Please fix it.

First, that is not a question. Second, when reporting this type of issue please make sure you're using the latest version, and mention the version you're using in the bug report. You should also copy the command line you're using to call the program, and the program output so I can see how it fails and have an example of a specific video that's giving you problems.

-

The preferred method to report bugs is to write me an e-mail. You can find my address in the contact information page at rg03.wordpress.com. Together with this, you should check if there's a similar recent issue reported in the issue tracker. If you decide to open a new issue or post a comment in an existing issue, mention that in the e-mail as well. Writing me by e-mail lets me answer you directly and I have your contact information, so I can get back to you for more information or ask you to test a solution for your problem.

+

The preferred method to report bugs is to write me an e-mail. You can find my address in the contact information page at rg03.wordpress.com. Together with this, you should check if there's a similar recent issue reported in the issue tracker. If you decide to open a new issue or post a comment in an existing issue, mention that in the e-mail as well. Writing me by e-mail lets me answer you directly and I have your contact information, so I can get back to you for more information or ask you to test a solution for your problem.

-

Can you please put the -b option back?

+

Can you please put the -b option back?

Most people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the -b option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the -f option and youtube-dl will try to download it.

-

I get HTTP error 402 when trying to download a video. What's this?

+

I get HTTP error 402 when trying to download a video. What's this?

Apparently YouTube requires you to pass a CAPTCHA test if you download too much. At this moment, there is no plan to solve this issue, as youtube-dl is a command line program that is many times used without X and in an unattended fashion, so there's no easy way of solving this, in my humble opinion. I have no plans to solve it at this moment, but let me know your ideas and code if you come up with something.

-

I have downloaded a video but how can I play it?

+

I have downloaded a video but how can I play it?

If you used youtube-dl to download a video and it wrote the video file to your hard drive, finishing with a completion message of 100%, the video is downloaded, so youtube-dl has finished its job and usually it's not to blame for problems that happen later. Not every video player supports FLV or MP4 files and every codec out there needed to play YouTube videos. In Linux, for example, I am generally pleased with MPlayer. In Windows, I tend to use VLC. Those usually work flawlessly.

-

Sometimes the program does not download the best quality format

+

Sometimes the program does not download the best quality format

This issue happens on YouTube and related to formats 34 and 18. Format 34 is, for many videos, 360p widescreen, and of higher quality than the same video in format 18. However, sometimes format 18 provides a better quality version, as format 34 appears to be just 240p for some videos. There is no plan to fix this. Currently the only way of finding out which version gives higher quality is to download a chunk of both formats and peek into the files themselves to find out, if you know how. As, in my experience, format 34 usually wins, and in many future videos uploaded in high definition formats it will be 360p, format 34 will remain as the format to download in case of doubt.

diff --git a/generate-index b/generate-download similarity index 90% rename from generate-index rename to generate-download index b853fd7e7..c5680b8ac 100755 --- a/generate-index +++ b/generate-download @@ -11,7 +11,7 @@ def output(cmdline): return retval # Read template page -template = file('index.html.in', 'r').read() +template = file('download.html.in', 'r').read() # Build replacement strings version = output('cd ../master && git tag | tail -1').strip() @@ -25,4 +25,4 @@ template = template.replace('@PROGRAM_URL@', url) template = template.replace('@PROGRAM_MD5SUM@', md5sum) template = template.replace('@PROGRAM_SHA1SUM@', sha1sum) template = template.replace('@PROGRAM_SHA256SUM@', sha256sum) -file('index.html', 'w').write(template) +file('download.html', 'w').write(template) diff --git a/gradient.png b/gradient.png new file mode 100644 index 000000000..824f84d75 Binary files /dev/null and b/gradient.png differ diff --git a/gradient2.png b/gradient2.png new file mode 100644 index 000000000..aebee76c2 Binary files /dev/null and b/gradient2.png differ diff --git a/gradient3.png b/gradient3.png new file mode 100644 index 000000000..11ad4c87c Binary files /dev/null and b/gradient3.png differ diff --git a/gradient4.png b/gradient4.png new file mode 100644 index 000000000..8227db350 Binary files /dev/null and b/gradient4.png differ diff --git a/gradient5.png b/gradient5.png new file mode 100644 index 000000000..2a1508825 Binary files /dev/null and b/gradient5.png differ diff --git a/index.html b/index.html index a4e517221..0985f046d 100644 --- a/index.html +++ b/index.html @@ -7,99 +7,20 @@ -

youtube-dl: Download videos from YouTube.com

-
(and more...)
+ + + +
youtube-dlDownload videos from YouTube.com + (and mores sites...)
-

What is it?

+

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.x (x being at least 4), and it is not platform specific. It should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

-

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.x (x being at least 4), and it's not platform specific. It should work in your Unix box, in Windows or in Mac OS X. The latest version is 2010.10.24. It's released to the public domain, which means you can modify it, redistribute it or use it however you like.

- -

I'll try to keep it updated if YouTube.com changes the way you access their videos. After all, it's a simple and short program. However, I can't guarantee anything. If you detect it stops working, check for new versions and/or inform me about the problem, indicating the program version you are using. My contact information is at rg03.wordpress.com. If the program stops working and I can't solve the problem but you have a solution, I'd like to know it. If that happens and you feel you can maintain the program yourself, tell me.

- -

Thanks for all the feedback received so far. I'm glad people find my program useful.

- -

Usage instructions

- -

In Windows, once you have installed the Python interpreter, save the program with the .py extension and put it somewhere in the PATH. Try to follow the guide to install youtube-dl under Windows.

- -

In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, /usr/local/bin).

- -

After that, you should be able to call it from the command line as youtube-dl or youtube-dl.py. I will use youtube-dl in the following examples. Usage instructions are easy. Use youtube-dl followed by a video URL or identifier. Example: youtube-dl "http://www.youtube.com/watch?v=foobar". The video will be saved to the file foobar.flv in that example. As YouTube.com videos are usually in Flash Video format, their extension should be flv. In Linux and other unices, video players using a recent version of ffmpeg can play them. That includes VLC, MPlayer, etc. Those two work under Windows and other platforms, but you could also get a specific FLV player of your taste.

- -

If you try to run the program and you receive an error message containing the keyword SyntaxError near the end, it means your Python interpreter is too old or from the 3.x branch.

- -

More usage tips

- -

The program is usually invoked as youtube-dl followed by options and the video URLs. Listing all the options here would make this text too long, so you can run youtube-dl --help and get a summary of them. From that point on you can start experimenting with the different options yourself. The most common ones are -t (or -l) to include the video title in the file name. Also, the -o option can specify the output file name and path. It allows special character sequences that can be used as templates to be replaced. See the "Output template" section for more details.

- -

Some YouTube videos are served using Adobe's proprietary RTMP protocol, which imposes DRM restrictions and encrypts the connection. youtube-dl is not able to download these videos by itself. However, it will attempt to use the rtmpdump program, if it's installed in your system, to download these videos.

- -

Download it

- -

Note that if you directly click on these hyperlinks, your web browser will most likely display the program contents. It's usually better to right-click on it and choose the appropriate option, normally called Save Target As or Save Link As, depending on the web browser you are using.

- -

2010.10.24

- - - -

FAQ

- -

The Frequently Asked Questions page contains answers to some common questions that pop up in my e-mail and in the issue tracker. Be sure to check it before reporting problems.

- -

Supported sites

- - - -

Proxy support

- -

youtube-dl supports downloading videos through a proxy, by setting the http_proxy environment variable to the proxy URL, as in http://proxy_machine_name:port/.

- -

YouTube formats

- -

Using the -f option and other related options, you can specify the video format to be downloaded from YouTube. Instead of keeping a video format table here, I will refer you to the list of YouTube formats on Wikipedia.

- -

Output template

- -

The -o option allows users to indicate a template for the output file names. The basic usage is not to set any template arguments when downloading a single file, like in youtube-dl -o funny_video.flv "http://some/video". However, it may contain special sequences that will be replaced when downloading each video. The special sequences have the format %(NAME)s. To clarify, that's a percent symbol followed by a name in parenthesis, followed by a lowercase S. Allowed names are:

- - - -

As you may have guessed, the default template is %(id)s.%(ext)s. When some command line options are used, it's replaced by other templates like %(title)s-%(id)s.%(ext)s. You can specify your own.

- -

Authors

- - + + + + +
DocumentationDownload itAbout
Copyright © 2006-2010 Ricardo Garcia Gonzalez
diff --git a/style.css b/style.css index a81fba334..4c20dd239 100644 --- a/style.css +++ b/style.css @@ -6,23 +6,80 @@ body { margin-bottom: 3ex; background-color: white; color: black; + /*background-color: #fff1db;*/ + background-color: white; + /* + background-image: url("gradient.png"); + background-repeat: repeat-x; + */ + /* + background-image: url("gradient2.png"); + background-repeat: repeat-y; + */ + /* + background-image: url("gradient3.png"); + background-repeat: repeat-x; + */ + /* + background-image: url("gradient4.png"); + background-repeat: repeat-y; + */ + background-image: url("gradient5.png"); + background-repeat: repeat-x; +} +.heading { + border: 0; + color: black; + font-size: xx-large; + font-weight: bold; + padding-bottom: 1ex; + border-bottom: 1px solid black; + margin-bottom: 2ex; + width: 100%; +} +.heading tr { + border: 0; +} +.heading td { + border: 0; +} +.heading a { + text-decoration: none; + color: black; +} +.title { + text-align: left; +} +.subtitle { + text-align: right; +} +.toc { + padding-left: 2ex; + border: 1px solid #aaaaaa; + background-color: white; + padding-bottom: 1ex; + border-radius: 10px; + -moz-border-radius: 10px; +} +hr { + margin-top: 3ex; + margin-bottom: 3ex; + width: 50%; } .note { + margin-top: 10ex; text-align: center; font-size: x-small; } h1 { - color: #006699; - text-align: center; - border: 1px solid #dddddd; - background: #eeeeee; - margin-bottom: 3ex; + font-size: x-large; + margin-top: 2ex; + color: black; + margin-left: 2%; + margin-right: 2%; } h2 { - margin-top: 2ex; - color: #006699; -} -h3 { + font-size: large; margin-left: 5%; margin-right: 5%; } @@ -40,5 +97,34 @@ li { margin-bottom: 0.5ex; } tt { + padding-left: 0.5ex; + padding-right: 0.5ex; background: #dddddd; } +#rgb { + width: 95%; + margin: 3ex auto; +} +.button { + color: white; + font-weight: bold; + font-size: x-large; + text-decoration: none; + text-align: center; + display: block; + padding: 2ex; + border-radius: 10px; + -moz-border-radius: 10px; +} +#r { + background-color: #884444; + border: 2px solid #880000; +} +#g { + background-color: #448844; + border: 2px solid #006600; +} +#b { + background-color: #444488; + border: 2px solid #000088; +} diff --git a/windows.html b/windows.html index 49db6c9a2..0a3dabbbc 100644 --- a/windows.html +++ b/windows.html @@ -7,17 +7,21 @@ -

youtube-dl under Windows

+ + + + +
youtube-dlRunning it under Windows

The following text explains how to run youtube-dl under Microsoft Windows. The first part describes some generic instructions about installing a command line program, followed by specific instructions on running youtube-dl.

-

Disclaimer

+

Disclaimer

User nishad provides a standalone executable for youtube-dl. With it, you don't need the Python interpreter. In addition, he has created an optional graphical user interface to ease using the program. The following instructions apply if you want to install the official version of youtube-dl with the Python interpreter, and still apply if you want to install the standalone executable. In that case, you can skip the step of installing the Python interpreter.

His contributions can be downloaded from http://www.himili.com/blog/downloads/youtube-video-downloader/. If you use these versions and find a problem, contact him first. He will redirect real youtube-dl issues to me.

-

Preparing to install a command line program

+

Preparing to install a command line program

The Windows command line interpreter is a program called cmd. It can be found somewhere in the applications menu, but many people prefer to run it by clicking on Start > Run and then typing cmd and pressing the enter key. It's very similar to the DOS command line interpreter, if you're old enough to remember it. When you launch it, it will be usually running at your home directory. It's C:\Documents and Settings\<username> usually, where <username> is your user name in that computer, and it will be waiting for you to input commands followed by the enter key. The text to the left of the cursor usually indicates the so-called current working directory, followed by a greater than (>) symbol. You can go up the directory hierarchy with the command cd .., change the current working drive letter by typing its name as a command, like D:, and you can go to a subdirectory (or subfolder, as Windows prefers to call it) by typing the command cd followed by its path, maybe using double quotes if the name contains spaces, like in cd "My Documents\My Porn\My Hardcore Orgies\Animals". Just kidding. The cd command stands for change [to] directory.

@@ -33,7 +37,7 @@

Up to this point, we have created a Commands folder where we can drop command line programs and later use them in the command line interpreter, because the interpreter will be able to find them. These steps were all generic, and you can drop any command line program in there. In the next step, we'll drop youtube-dl.py in it.

-

Running youtube-dl.py

+

Running youtube-dl.py

If the Python interpreter is not installed in your system, install it now. There is a download section in the previous webpage that lets you download a Windows installer to run Python programs. Remember you have to get version 2.x, with x being at least 4.

@@ -43,11 +47,11 @@

Now let's suppose I want to download a video to my Windows Desktop. Piece of cake: go to Start > Run, type cmd and press the enter key. Type the command cd desktop and then type the command youtube-dl.py "<url>", where <url> is a YouTube video URL you can copy from your web browser program address bar, and paste it to the command line interpreter window by right clicking and choosing Paste, for example. Remember commands are always followed by pressing the enter key in the command line interpreter.

-

One final tip

+

One final tip

If you are going to store all your videos in a fixed folder, some people find it handy to create a shortcut to cmd that starts with the current working directory set to that folder, so as to avoid typing a cd command each time they launch cmd. To do this, right click on an empty space in your Desktop and choose to create a new shortcut. The program you want to launch is cmd and you can give the shortcut any name you want. After it's created, right click on it, choose Properties and, in the Shortcut tab, which should be the one selected by default, there's an option called Start in:. Put something like %USERPROFILE%\Desktop or %USERPROFILE%\My Documents in it. Some people also prefer to put that shortcut in the quickstart bar to the right of the Start button. Whatever floats your boat.

-

Conclusions

+

Conclusions

The hardest part is preparing the Windows system to run user command line programs, as it's not initially prepared to do that. Linux, MacOSX and other systems are, in my humble opinion, better prepared, out of the box, for downloading and running your own command line programs easily.