From 54fb3c3f9f318073aa3dd0578929316ad45af1a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rog=C3=A9rio=20Brito?= Date: Thu, 19 Nov 2009 11:21:36 -0200 Subject: [PATCH] Imported Debian patch 2009.09.13-2 --- debian/changelog | 10 ++ debian/control | 1 + debian/patches/series | 1 + debian/patches/support-1080p-files.patch | 28 ++++ debian/rules | 8 +- debian/source/format | 1 + debian/youtube-dl.1 | 48 ------ debian/youtube-dl.pod | 195 +++++++++++++++++++++++ 8 files changed, 242 insertions(+), 50 deletions(-) create mode 100644 debian/patches/series create mode 100644 debian/patches/support-1080p-files.patch create mode 100644 debian/source/format delete mode 100644 debian/youtube-dl.1 create mode 100644 debian/youtube-dl.pod diff --git a/debian/changelog b/debian/changelog index 6495b02..8094ccb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +youtube-dl (2009.09.13-2) unstable; urgency=low + + * change to "3.0 (quilt)" format. + * add support for 1080p videos. Thanks Josh Triplett. Closes: #557042. + * include a better manpage. Closes: #553919. + * include the DMUA: yes field. + * kindly reviewed by Li Daobing. + + -- Rogério Brito Thu, 19 Nov 2009 11:21:36 -0200 + youtube-dl (2009.09.13-1) unstable; urgency=low * New upstream release diff --git a/debian/control b/debian/control index eef605c..963aab7 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Priority: extra Maintainer: Rogério Brito Build-Depends: debhelper (>= 5) Standards-Version: 3.8.3 +DM-Upload-Allowed: yes Homepage: http://bitbucket.org/rg3/youtube-dl/ Package: youtube-dl diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..789fd8b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +support-1080p-files.patch diff --git a/debian/patches/support-1080p-files.patch b/debian/patches/support-1080p-files.patch new file mode 100644 index 0000000..2422c97 --- /dev/null +++ b/debian/patches/support-1080p-files.patch @@ -0,0 +1,28 @@ +Description: Add support for 1080p videos. +Author: Rogério Brito +--- a/youtube-dl ++++ b/youtube-dl +@@ -530,12 +530,13 @@ + _LOGIN_URL = 'http://www.youtube.com/signup?next=/&gl=US&hl=en' + _AGE_URL = 'http://www.youtube.com/verify_age?next_url=/&gl=US&hl=en' + _NETRC_MACHINE = 'youtube' +- _available_formats = ['22', '35', '18', '5', '17', '13', None] # listed in order of priority for -b flag ++ _available_formats = ['37', '22', '35', '18', '5', '17', '13', None] # listed in order of priority for -b flag + _video_extensions = { + '13': '3gp', + '17': 'mp4', + '18': 'mp4', + '22': 'mp4', ++ '37': 'mp4', + } + + @staticmethod +@@ -1127,7 +1128,7 @@ + video_format.add_option('-m', '--mobile-version', + action='store_const', dest='format', help='alias for -f 17', const='17') + video_format.add_option('-d', '--high-def', +- action='store_const', dest='format', help='alias for -f 22', const='22') ++ action='store_const', dest='format', help='alias for -f 37', const='37') + parser.add_option_group(video_format) + + verbosity = optparse.OptionGroup(parser, 'Verbosity / Simulation Options') diff --git a/debian/rules b/debian/rules index 8271a23..70f28e1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,14 @@ #!/usr/bin/make -f -build: +build: build-stamp + +build-stamp: + pod2man -n YOUTUBE-DL -c "User Commands" debian/youtube-dl.pod > debian/youtube-dl.1 + touch $@ clean: dh_testdir - dh_clean + dh_clean build-stamp debian/youtube-dl.1 install: build dh_testdir diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/youtube-dl.1 b/debian/youtube-dl.1 deleted file mode 100644 index 8f11813..0000000 --- a/debian/youtube-dl.1 +++ /dev/null @@ -1,48 +0,0 @@ -.TH YOUTUBE-DL "1" "March 2008" "youtube-dl" "User Commands" -.SH NAME -youtube-dl \- download a video file from YouTube.com -.SH DESCRIPTION -usage: youtube\-dl [options] video_url -.SS "options:" -.TP -\fB\-h\fR, \fB\-\-help\fR -print this help text and exit -.TP -\fB\-v\fR, \fB\-\-version\fR -print program version and exit -.TP -\fB\-u\fR USERNAME, \fB\-\-username\fR=\fIUSERNAME\fR -account username -.TP -\fB\-p\fR PASSWORD, \fB\-\-password\fR=\fIPASSWORD\fR -account password -.TP -\fB\-o\fR FILE, \fB\-\-output\fR=\fIFILE\fR -output video file name -.TP -\fB\-q\fR, \fB\-\-quiet\fR -activates quiet mode -.TP -\fB\-s\fR, \fB\-\-simulate\fR -do not download video -.TP -\fB\-t\fR, \fB\-\-title\fR -use title in file name -.TP -\fB\-l\fR, \fB\-\-literal\fR -use literal title in file name -.TP -\fB\-n\fR, \fB\-\-netrc\fR -use .netrc authentication data -.TP -\fB\-g\fR, \fB\-\-get-url\fR -print final video URL only -.TP -\fB\-2\fR, \fB\-\-title-too\fR -used with \-g, print title too -.TP -\fB\-f\fR FORMAT, \fB\-\-format\fR=\fIFORMAT\fR -append &fmt=FORMAT to the URL -.TP -\fB\-b\fR, \fB\-\-best-quality\fR -try to download the best quality version diff --git a/debian/youtube-dl.pod b/debian/youtube-dl.pod new file mode 100644 index 0000000..db8eb67 --- /dev/null +++ b/debian/youtube-dl.pod @@ -0,0 +1,195 @@ +# -*- pod -*- +=head1 NAME + +youtube-dl - download videos from youtube.com + +=head1 SYNOPSIS + + youtube-dl [options] url ... + +=head1 DESCRIPTION + +youtube-dl is a script to download videos from youtube.com. + +Once it is installed in your system, you should be able to call it from +the command line. Usage instructions are easy. Use youtube-dl followed +by a video URL or identifier. As an example, consider: + + youtube-dl "http://www.youtube.com/watch?v=foobar" + +The video will be saved to the file C in that example. Many +YouTube.com videos are in Flash Video format and their extension would +be C. Other videos are encoded in H.264 and these usually have the +extension C. In Linux and other unices, video players using a +recent version of ffmpeg can play them. That includes MPlayer, VLC, +xine, among others. + +=head1 OPTIONS + +B accepts options in the following categories + +=over + +=item -h, --help + +Print help text and exit. + +=item -v, --version + +Print program version and exit. + +=item -i, --ignore-errors + +Ignore errors during download and continue processing. + +=item -r B, --rate-limit=B + +Limit the download speed to the specified maximum B (e.g., 50k or 44.6m). + +=item -u B, --username=B + +Specify the youtube account username B. Some videos require an +account to be downloaded, mostly because they're flagged as mature +content. + +=item -p B, --password=B + +Like the username, specifies the account password to be B. + +=item -n, --netrc + +Get authentication data from the standard unix .netrc file on the user's +home directory. The machine name is youtube in regarding this usage. + +=item -f FMT, --format=FMT + +Specify the video format (quality) in which to download the video. Note +that not all videos are available in all formats. + +=item -b, --best-quality + +Download the best video quality available for the video(s) specified by +the user. + +=item -m, --mobile-version + +Synonymous to the option "-f 17", to download videos playable on some +mobile phones. + +=item -d, --high-def + +Synonymous to the option "-f 37", to download videos in HD quality +(1080p). + +=item -q, --quiet + +Activates quiet mode, avoiding many messages being written to the +terminal. + +=item -s, --simulate + +Simulate the operation, but do not download the video. Useful for +testing. + +=item -g, --get-url + +Simulate the operation, like quiet mode, but show the URL that would be +used to download the video. Can be used with other download tools like +wget or aria2c. + +=item -e, --get-title + +Simulate the operation, like quiet mode, but show the title of the video +that would be downloaded. + +=item -t, --title + +Use the title of the video in the file name used to download the video. + +=item -l, --literal + +Use the literal title of the video in file name used to download the +video. Can contain "weird" characters that are not filtered like with +the -t option. + +=item -o B, --output=B + +Specify a template B for the names of the files to be created when +they are downloaded. The default filename is video_id.flv. But you can +also use the video title in the filename with the C<-t> or C<--title> +option, or preserve the literal title in the filename with the C<-l> or +C<--literal> option. + +=item -a B, --batch-file=B + +Specify the name of a file containing URLs of videos to download from +youtube in batch mode. The file must contain one URL per line. + +=item -w, --no-overwrites + +Do no overwrite already existing files. + +=item -c, --continue + +Resume partially downloaded files. + +=back + +=head1 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 C<%(NAME)s>. To clarify, that's a +percent symbol followed by a name in parenthesis, followed by a +lowercase S. Allowed names are: + +=over + +=item id + +The sequence will be replaced by the video identifier. + +=item url + +The sequence will be replaced by the video URL. + +=item uploader + +The sequence will be replaced by the nickname of the person who uploaded +the video. + +=item title + +The sequence will be replaced by the literal video title. + +=item stitle + +The sequence will be replaced by a simplified video title, restricted to +alphanumeric characters and dashes. + +=item ext + +The sequence will be replaced by the appropriate extension (like C +or C). + +=item epoch + +The sequence will be replaced by the Unix epoch when creating the file. + +=back + +As you may have guessed, the default template is C<%(id)s.%(ext)s>. When +some command line options are used, it's replaced by other templates +like C<%(title)s-%(id)s.%(ext)s>. You can specify your own. + +=head1 AUTHOR + +youtube-dl was written by Ricardo Garcia Gonzalez and many contributors +from all around the internet. This manpage was written by Rogério Brito +. + +=cut -- 2.41.1