.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CLIVE.1 1p" .TH CLIVE.1 1p "2012-03-16" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" clive \- (c)ommand (li)ne (v)ideo (e)xtraction tool .SH "SYNOPSIS" .IX Header "SYNOPSIS" clive [] [ | ...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" clive is a command line media extraction tool for YouTube and similar websites that require flash. .SS "Background" .IX Subsection "Background" clive originates from a simple shell script that was cooked up to work around the YouTube's flash requirement back in 2006. .SS "Getting started" .IX Subsection "Getting started" \fIConfiguring\fR .IX Subsection "Configuring" .PP Autodetection .IX Subsection "Autodetection" .PP clive will attempt to autodetect the required commands from the \f(CW$PATH\fR, when they have not been defined in either config file or the command line. .PP Configuration file .IX Subsection "Configuration file" .PP See \*(L"\s-1FILES\s0\*(R" for an example configuration file. You may want to consider adding at least the \*(L"\-\-quvi\*(R" and \*(L"\-\-get\-with\*(R" there. .PP See also .IX Subsection "See also" .PP \&\*(L"\s-1TROUBLESHOOTING\s0\*(R", \*(L"\s-1KNOWN\s0 \s-1ISSUES\s0\*(R" and \*(L"\s-1EXAMPLES\s0\*(R". .SH "OPTIONS" .IX Header "OPTIONS" clive expects the URLs to be separated by a newline character when the they are read from either stdin or files. .SS "\-\-help" .IX Subsection "--help" Print help and exit. .SS "\-\-version" .IX Subsection "--version" Print version and exit. .SS "\-\-license" .IX Subsection "--license" Print license and exit. .SS "\-q, \-\-quiet" .IX Subsection "-q, --quiet" Turn off all \fIclive\fR output excluding errors. Note that this switch has no effect on any of the third party commands that clive invokes. .SS "\-F, \-\-query\-formats" .IX Subsection "-F, --query-formats" Query available formats to an \s-1URL\s0. The returned string will contain an array of \fIformat strings\fR, each separated by the '|' character. The array is created, by libquvi, from the data returned by the server. You can use these \fIformat strings\fR with \f(CW\*(C`\-\-format\*(C'\fR. .PP See also \*(L"\s-1EXAMPLES\s0\*(R" and \f(CW\*(C`\-\-format\*(C'\fR. .SS "\-f, \-\-format \fIarg\fP (=default)" .IX Subsection "-f, --format arg (=default)" Download format \fIarg\fR of the media. The \fIarg\fR can also be \f(CW\*(C`default\*(C'\fR, \&\f(CW\*(C`best\*(C'\fR, \f(CW\*(C`help\*(C'\fR or \f(CW\*(C`list\*(C'\fR. Note, however, that of these, the \f(CW\*(C`list\*(C'\fR and the \f(CW\*(C`help\*(C'\fR are deprecated and will be removed in the later versions of clive. .PP The \fIarg\fR value is used with all of the URLs fed to clive at runtime. If the \fIarg\fR is \f(CW\*(C`best\*(C'\fR, libquvi will determine the \f(CW\*(C`best\*(C'\fR format available to an \s-1URL\s0. .PP If the \fIarg\fR is \f(CW\*(C`default\*(C'\fR libquvi attempts to return an \s-1URL\s0 to whatever was deemed to be the \f(CW\*(C`default\*(C'\fR format to the \s-1URL\s0. libquvi will switch to \f(CW\*(C`default\*(C'\fR format if the \fIarg\fR was unregognized or the requested \&\fIarg\fR format was unavailable. .PP For the above reasons, the downloaded format may be different from the requested \fIarg\fR format. .PP For details about the YouTube's \*(L"fmt\*(R" IDs, refer to: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs .PP See also \*(L"\s-1EXAMPLES\s0\*(R", \f(CW\*(C`\-\-query\-formats\*(C'\fR. .SS "\-O, \-\-output\-file \fIarg\fP" .IX Subsection "-O, --output-file arg" Write media to \fIarg\fR. Overrides \f(CW\*(C`\-\-filename\-format\*(C'\fR. .SS "\-n, \-\-no\-download" .IX Subsection "-n, --no-download" Do not download the media, print details only. .SS "\-\-config\-file \fIarg\fP" .IX Subsection "--config-file arg" Path to a file to read clive arguments from. See also \*(L"\s-1FILES\s0\*(R". .SH "OPTIONS \- CONFIGURATION" .IX Header "OPTIONS - CONFIGURATION" The \f(CW\*(C`configuration\*(C'\fR options may be read from the config file. See \*(L"\s-1FILES\s0\*(R". .SS "\-\-quvi \fIarg\fP" .IX Subsection "--quvi arg" \&\fIarg\fR to be invoked to start the \f(CWquvi(1)\fR command which clive uses to parse the media details. This is typically a full path to \f(CWquvi(1)\fR with any additional options. Overrides any value set by autodetection. .PP The following specifiers can be used in the \fIarg\fR: .PP .Vb 1 \& %u .. Media stream URL .Ve .PP \&\fIAll\fR occurences of the specifier will be replaced. clive will automatically append \f(CW\*(C`\-\-quiet\*(C'\fR to \fIarg\fR. .SS "\-\-get\-with \fIarg\fP" .IX Subsection "--get-with arg" Path to a download command (e.g. \f(CWwget(1)\fR or \f(CWcurl(1)\fR) with any additional arguments. clive invokes this command to download the media. Overrides any value set by autodetection. .PP The following specifiers are supported: .PP .Vb 3 \& %n Media filename (after applying \-\-regexp and \-\-filename\-format) \& %f Path to downloaded media file (output path and %n) \& %u Media stream URL .Ve .PP \&\fIAll\fR occurences of the specifier will be replaced. .ie n .SS "\-\-filename\-format \fIarg\fP (=""%t.%s"")" .el .SS "\-\-filename\-format \fIarg\fP (=``%t.%s'')" .IX Subsection "--filename-format arg (=%t.%s)" Use \fIarg\fR to specify the media output filename format. The following specifiers are supported: .PP .Vb 4 \& %t Media title (after applying \-\-regexp) \& %h Media host ID \& %s File suffix \& %i Media ID .Ve .PP \&\fIAll\fR occurences of the specifier will be replaced. .ie n .SS "\-\-regexp \fIarg\fP (=""/(\ew|\es)/g"")" .el .SS "\-\-regexp \fIarg\fP (=``/(\ew|\es)/g'')" .IX Subsection "--regexp arg (=/(w|s)/g)" Use regular expression \fIarg\fR to clean up the media title before it is used in the filename. The syntax supports both \*(L"i\*(R" (case-insensitive) and \*(L"g\*(R" (global or \*(L"find all\*(R"). .SS "\-\-exec \fIarg\fP" .IX Subsection "--exec arg" Invoke \fIarg\fR after media download finishes. The following specifiers are supported: .PP .Vb 1 \& %f Path to the downloaded media file .Ve .PP \&\fIAll\fR occurences of the specifier will be replaced. .SH "TROUBLESHOOTING" .IX Header "TROUBLESHOOTING" .SS "error: specify path to \fIquvi\fP\|(1) command with \-\-quvi" .IX Subsection "error: specify path to quvi command with --quvi" clive uses \f(CWquvi(1)\fR to parse the media details. Use the \f(CW\*(C`\-\-quvi\*(C'\fR to specify the path. See also \*(L"\s-1FILES\s0\*(R". .SS "error: specify path to a download command with \-\-get\-with" .IX Subsection "error: specify path to a download command with --get-with" clive uses a 3rd party command to download the media. Use the \f(CW\*(C`\-\-get\-with\*(C'\fR to specify the path to such command. See also \*(L"\s-1FILES\s0\*(R". .SS "\s-1HTTP/1\s0.0 500 Internal Server Error" .IX Subsection "HTTP/1.0 500 Internal Server Error" Any number of reasons. Some have been tracked back to unacceptable user-agent string value and mangled \s-1HTTP\s0 headers (e.g. a green-eyed \&\s-1HTTP\s0 proxy). See also \*(L"\s-1KNOWN\s0 \s-1ISSUES\s0\*(R". .SH "KNOWN ISSUES" .IX Header "KNOWN ISSUES" .SS "Resuming partially transferred files may fail" .IX Subsection "Resuming partially transferred files may fail" Some websites are known to refuse to work with the \s-1HTTP\s0 requests to resume a file transfer. .PP \fIWorkaround\fR .IX Subsection "Workaround" .PP None known. You will have to remove the existing file before you try again. .SS "\s-1HTTP\s0 user-agent" .IX Subsection "HTTP user-agent" Some websites refuse to play nice with renegade user-agent strings. .PP \fIRecommendations\fR .IX Subsection "Recommendations" .PP Make sure both \f(CWquvi(1)\fR and \f(CWcurl(1)\fR use the same user-agent string. Note that \f(CWquvi(1)\fR uses \*(L"Mozilla/5.0\*(R" by default. See also \&\*(L"\s-1TROUBLESHOOTING\s0\*(R" for \f(CW\*(C`HTTP/500\*(C'\fR. .SS "\s-1HTTP\s0 proxy" .IX Subsection "HTTP proxy" Generally \s-1OK\s0, although some proxies may have been configured to \&\f(CW\*(C`cook up\*(C'\fR the \s-1HTTP\s0 headers before they are sent back to the server. This may sometimes lead to issues with the servers. .PP \fIRecommendations\fR .IX Subsection "Recommendations" .PP If you use an \s-1HTTP\s0 proxy, make sure you have configured all of the commands that clive uses (e.g. \f(CWquvi(1)\fR, \f(CWcurl(1)\fR, etc.) to use the same proxy. .SS "Exit status" .IX Subsection "Exit status" If you are planning to use clive for anything more peculiar, consider the following example: .PP .Vb 4 \& * You feed clive two URLs \& * The 1st one fails, quvi exits with a non\-zero value \& * clive proceeds to the 2nd URL, quvi now exits with zero value \& * clive exits with the zero, even if the 1st URL failed .Ve .PP \fIWorkaround\fR .IX Subsection "Workaround" .PP Feed one \s-1URL\s0 at a time. .SH "FILES" .IX Header "FILES" .SS "Local user" .IX Subsection "Local user" .Vb 3 \& * ~/.config/clive/config \& * ~/.clive/config \& * ~/.cliverc .Ve .SS "System wide" .IX Subsection "System wide" .Vb 5 \& * /usr/local/share/clive/config \& * /etc/xdg/clive/clive.conf \& * /usr/share/clive/config \& * /etc/xdg/clive.conf \& * /etc/clive/config .Ve .SS "\s-1CLIVE_CONFIG\s0" .IX Subsection "CLIVE_CONFIG" You can also set \s-1CLIVE_CONFIG\s0, e.g.: .PP .Vb 1 \& env CLIVE_CONFIG=/path/to/config/file clive .Ve .SS "\-\-config\-file" .IX Subsection "--config-file" Or use \f(CW\*(C`\-\-config\-file\*(C'\fR, e.g.: .PP .Vb 1 \& clive \-\-config\-file /path/to/config/file .Ve .SS "Example config" .IX Subsection "Example config" A typical configuration file could look like: .PP .Vb 4 \& \-\-get\-with "/usr/bin/curl \-L \-C \- \-o %f %u \-\-user\-agent Mozilla/5.0" \& \-\-quvi "/usr/bin/quvi \-\-category\-http %u" \& \-\-filename\-format "%t_%i.%s" \& \-\-exec "/usr/bin/vlc %f" .Ve .SH "EXAMPLES" .IX Header "EXAMPLES" .SS "Note" .IX Subsection "Note" Put the URLs inside quotes when they are specified as the command line arguments to the program. This is the recommended practice. .ie n .SS "clive ""\s-1URL\s0""" .el .SS "clive ``\s-1URL\s0''" .IX Subsection "clive URL" Typical use. .ie n .SS "clive \-f best ""\s-1URL\s0""" .el .SS "clive \-f best ``\s-1URL\s0''" .IX Subsection "clive -f best URL" Download the best available format of the media. .ie n .SS "clive \-F ""\s-1URL\s0""" .el .SS "clive \-F ``\s-1URL\s0''" .IX Subsection "clive -F URL" Query available formats to the \s-1URL\s0. Use one of the returned format strings from this list with \f(CW\*(C`\-\-format\*(C'\fR. .ie n .SS "clive \-n ""\s-1URL\s0""" .el .SS "clive \-n ``\s-1URL\s0''" .IX Subsection "clive -n URL" Do not download the media, print the details only. .SH "EXIT STATUS" .IX Header "EXIT STATUS" clive exits with 0 on success, otherwise the code is >0. For example, if command line parsing fails, the exit status is 1. .PP When an error occurs in another command invoked by clive, e.g. \f(CWquvi(1)\fR, clive then exits with the exit status returned by that command. .PP See also \*(L"\s-1KNOWN\s0 \s-1ISSUES\s0\*(R" for \*(L"Exit status\*(R". .SH "SEE ALSO" .IX Header "SEE ALSO" \&\f(CWquvi(1)\fR \f(CWcurl(1)\fR .SH "WWW" .IX Header "WWW" .Vb 2 \& Home : http://clive.sourceforge.net/ \& gitweb: http://repo.or.cz/w/clive.git .Ve .SH "LICENSE" .IX Header "LICENSE" clive is free software, licensed under the GPLv3+. .SH "AUTHOR" .IX Header "AUTHOR" Toni Gundogdu .PP Thanks to all those who have contributed to the project by sending patches, reporting bugs and writing feedback. You know who you are.