1CLIVE.1(1)            User Contributed Perl Documentation           CLIVE.1(1)
2
3
4

NAME

6       clive - (c)ommand (li)ne (v)ideo (e)xtraction tool
7

SYNOPSIS

9       clive [<options>] [<url> | <file> ...]
10

DESCRIPTION

12       clive is a command line media extraction tool for YouTube and similar
13       websites that require flash.
14
15   Background
16       clive originates from a simple shell script that was cooked up to work
17       around the YouTube's flash requirement back in 2006.
18
19   Getting started
20       Configuring
21
22       Autodetection
23
24       clive will attempt to autodetect the required commands from the $PATH,
25       when they have not been defined in either config file or the command
26       line.
27
28       Configuration file
29
30       See "FILES" for an example configuration file. You may want to consider
31       adding at least the "--quvi" and "--get-with" there.
32
33       See also
34
35       "TROUBLESHOOTING", "KNOWN ISSUES" and "EXAMPLES".
36

OPTIONS

38       clive expects the URLs to be separated by a newline character when the
39       they are read from either stdin or files.
40
41   --help
42       Print help and exit.
43
44   --version
45       Print version and exit.
46
47   --license
48       Print license and exit.
49
50   -q, --quiet
51       Turn off all clive output excluding errors. Note that this switch has
52       no effect on any of the third party commands that clive invokes.
53
54   -F, --query-formats
55       Query available formats to an URL. The returned string will contain an
56       array of format strings, each separated by the '|' character.  The
57       array is created, by libquvi, from the data returned by the server.
58       You can use these format strings with "--format".
59
60       See also "EXAMPLES" and "--format".
61
62   -f, --format arg (=default)
63       Download format arg of the media. The arg can also be "default",
64       "best", "help" or "list". Note, however, that of these, the "list" and
65       the "help" are deprecated and will be removed in the later versions of
66       clive.
67
68       The arg value is used with all of the URLs fed to clive at runtime. If
69       the arg is "best", libquvi will determine the "best" format available
70       to an URL.
71
72       If the arg is "default" libquvi attempts to return an URL to whatever
73       was deemed to be the "default" format to the URL. libquvi will switch
74       to "default" format if the arg was unregognized or the requested arg
75       format was unavailable.
76
77       For the above reasons, the downloaded format may be different from the
78       requested arg format.
79
80       For details about the YouTube's "fmt" IDs, refer to:
81        http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
82
83       See also "EXAMPLES", "--query-formats".
84
85   -O, --output-file arg
86       Write media to arg. Overrides "--filename-format".
87
88   -n, --no-download
89       Do not download the media, print details only.
90
91   --config-file arg
92       Path to a file to read clive arguments from. See also "FILES".
93

OPTIONS - CONFIGURATION

95       The "configuration" options may be read from the config file.  See
96       "FILES".
97
98   --quvi arg
99       arg to be invoked to start the quvi(1) command which clive uses to
100       parse the media details. This is typically a full path to quvi(1) with
101       any additional options. Overrides any value set by autodetection.
102
103       The following specifiers can be used in the arg:
104
105         %u .. Media stream URL
106
107       All occurences of the specifier will be replaced. clive will
108       automatically append "--quiet" to arg.
109
110   --get-with arg
111       Path to a download command (e.g. wget(1) or curl(1)) with any
112       additional arguments. clive invokes this command to download the media.
113       Overrides any value set by autodetection.
114
115       The following specifiers are supported:
116
117         %n  Media filename (after applying --regexp and --filename-format)
118         %f  Path to downloaded media file (output path and %n)
119         %u  Media stream URL
120
121       All occurences of the specifier will be replaced.
122
123   --filename-format arg (="%t.%s")
124       Use arg to specify the media output filename format.  The following
125       specifiers are supported:
126
127         %t  Media title (after applying --regexp)
128         %h  Media host ID
129         %s  File suffix
130         %i  Media ID
131
132       All occurences of the specifier will be replaced.
133
134   --regexp arg (="/(\w|\s)/g")
135       Use regular expression arg to clean up the media title before it is
136       used in the filename. The syntax supports both "i" (case-insensitive)
137       and "g" (global or "find all").
138
139   --exec arg
140       Invoke arg after media download finishes. The following specifiers are
141       supported:
142
143         %f  Path to the downloaded media file
144
145       All occurences of the specifier will be replaced.
146

TROUBLESHOOTING

148   error: specify path to quvi(1) command with --quvi
149       clive uses quvi(1) to parse the media details. Use the "--quvi" to
150       specify the path. See also "FILES".
151
152   error: specify path to a download command with --get-with
153       clive uses a 3rd party command to download the media. Use the
154       "--get-with" to specify the path to such command. See also "FILES".
155
156   HTTP/1.0 500 Internal Server Error
157       Any number of reasons. Some have been tracked back to unacceptable
158       user-agent string value and mangled HTTP headers (e.g. a green-eyed
159       HTTP proxy). See also "KNOWN ISSUES".
160

KNOWN ISSUES

162   Resuming partially transferred files may fail
163       Some websites are known to refuse to work with the HTTP requests to
164       resume a file transfer.
165
166       Workaround
167
168       None known. You will have to remove the existing file before you try
169       again.
170
171   HTTP user-agent
172       Some websites refuse to play nice with renegade user-agent strings.
173
174       Recommendations
175
176       Make sure both quvi(1) and curl(1) use the same user-agent string.
177       Note that quvi(1) uses "Mozilla/5.0" by default. See also
178       "TROUBLESHOOTING" for "HTTP/500".
179
180   HTTP proxy
181       Generally OK, although some proxies may have been configured to "cook
182       up" the HTTP headers before they are sent back to the server.  This may
183       sometimes lead to issues with the servers.
184
185       Recommendations
186
187       If you use an HTTP proxy, make sure you have configured all of the
188       commands that clive uses (e.g. quvi(1), curl(1), etc.) to use the same
189       proxy.
190
191   Exit status
192       If you are planning to use clive for anything more peculiar, consider
193       the following example:
194
195         * You feed clive two URLs
196         * The 1st one fails, quvi exits with a non-zero value
197         * clive proceeds to the 2nd URL, quvi now exits with zero value
198         * clive exits with the zero, even if the 1st URL failed
199
200       Workaround
201
202       Feed one URL at a time.
203

FILES

205   Local user
206         * ~/.config/clive/config
207         * ~/.clive/config
208         * ~/.cliverc
209
210   System wide
211         * /usr/local/share/clive/config
212         * /etc/xdg/clive/clive.conf
213         * /usr/share/clive/config
214         * /etc/xdg/clive.conf
215         * /etc/clive/config
216
217   CLIVE_CONFIG
218       You can also set CLIVE_CONFIG, e.g.:
219
220         env CLIVE_CONFIG=/path/to/config/file clive
221
222   --config-file
223       Or use "--config-file", e.g.:
224
225         clive --config-file /path/to/config/file
226
227   Example config
228       A typical configuration file could look like:
229
230         --get-with "/usr/bin/curl -L -C - -o %f %u --user-agent Mozilla/5.0"
231         --quvi "/usr/bin/quvi --category-http %u"
232         --filename-format "%t_%i.%s"
233         --exec "/usr/bin/vlc %f"
234

EXAMPLES

236   Note
237       Put the URLs inside quotes when they are specified as the command line
238       arguments to the program. This is the recommended practice.
239
240   clive "URL"
241       Typical use.
242
243   clive -f best "URL"
244       Download the best available format of the media.
245
246   clive -F "URL"
247       Query available formats to the URL. Use one of the returned format
248       strings from this list with "--format".
249
250   clive -n "URL"
251       Do not download the media, print the details only.
252

EXIT STATUS

254       clive exits with 0 on success, otherwise the code is >0. For example,
255       if command line parsing fails, the exit status is 1.
256
257       When an error occurs in another command invoked by clive, e.g. quvi(1),
258       clive then exits with the exit status returned by that command.
259
260       See also "KNOWN ISSUES" for "Exit status".
261

SEE ALSO

263       quvi(1)  curl(1)
264

WWW

266        Home  : http://clive.sourceforge.net/
267        gitweb: http://repo.or.cz/w/clive.git
268

LICENSE

270       clive is free software, licensed under the GPLv3+.
271

AUTHOR

273       Toni Gundogdu <legatvs at sign gmail com>
274
275       Thanks to all those who have contributed to the project by sending
276       patches, reporting bugs and writing feedback. You know who you are.
277
278
279
280perl v5.28.1                      2012-03-16                        CLIVE.1(1)
Impressum