1CLIVE.1(1) User Contributed Perl Documentation CLIVE.1(1)
2
3
4
6 clive - (c)ommand (li)ne (v)ideo (e)xtration tool
7
9 clive [<options>] [<url> | <file> ...]
10
12 clive is a command line video extraction tool for Youtube and other
13 similar video websites that require Adobe Flash for viewing the videos.
14
16 In 2006 clive was a little more than a simple shell script that could
17 be used to extract flash videos from Youtube for viewing them with an
18 external player software. The primary motivation for writing clive was
19 to work around the flash player plugin which, at the time, was less
20 than a pleasant experience on Linux.
21
22 clive was rewritten in Python and released to the public in the early
23 2007. It was rewritten again in the late 2008, this time in Perl.
24
25 The development work of 2.3 started in the late 2010 as "gws" or
26 "glorified wrapper script". The 2.3 was an attempt to make better use
27 of the already existing tools, such as quvi(1).
28
30 See "FILES" for an example configuration file. You should set at very
31 least "--quvi" and "--get-with" in your configuration file for seamless
32 use.
33
34 The sections "TROUBLESHOOTING" and "EXAMPLES" contain invaluable
35 information about using clive.
36
38 --help
39 Print help and exit.
40
41 --version
42 Print version and exit.
43
44 --license
45 Print license and exit.
46
47 --quiet
48 Turn off all clive output excluding errors. Note that this switch
49 has no effect on any of the third party commands that clive
50 invokes.
51
52 -f, --format arg
53 Download arg format of the video. arg can also be "help".
54
55 -O, --output-file arg
56 Write video to arg.
57
58 -n, --no-download
59 Do not download the video, display video details only.
60
61 --config-file arg
62 Path to a file to read clive arguments from. See also "FILES".
63
65 In addition to the command line, the options may also be read from the
66 configuration file. See "FILES".
67
68 --quvi arg
69 arg to be invoked to start the quvi(1) command which clive uses to
70 parse the video details. This is typically a full path to quvi(1)
71 with any additional options.
72
73 The following specifiers can be used in the arg:
74
75 %u .. Video URL
76
77 All occurences of the specifier will be replaced. clive will
78 automatically append "--quiet" to arg.
79
80 NOTE: If you use an HTTP proxy with quvi(1), you should do the same
81 with "--get-with" -- especially if the proxy masks your (real) IP.
82 Some websites may refuse connections originating from different IPs
83 to (unique, generated) video download URLs.
84
85 --get-with arg
86 Path to a download command (e.g. wget(1) or curl(1)) with any
87 additional arguments. clive invokes this command to download the
88 video. The following specifiers are supported:
89
90 %u Video download URL
91 %f Full path to video file
92 %n Video file name
93
94 Note that all occurences of the specifier will be replaced. See
95 also the note above about using an HTTP proxy with "--quvi".
96
97 --filename-format arg
98 Use arg to specify the video output filename format. The default is
99 "%t.%s". The following specifiers are supported:
100
101 %t Video title (after applying --regexp)
102 %i Video ID
103 %h Video host ID (req. quvi 0.2.8+)
104 %s Video file suffix (parsed from server returned content-type)
105
106 Note that all occurences of the specifier will be replaced.
107
108 --regexp arg
109 Use regular expression arg to clean up the video title before it is
110 used in the output filename. The default is "/(\w|\s)/g".
111
112 Note that the syntax supports both "i" (case-insensitive) and "g"
113 (global or find all).
114
115 --exec arg
116 Invoke arg after video download finishes. The following specifiers
117 are supported:
118
119 %f Full path to the downloaded video file
120
121 Note that all occurences of the specifier will be replaced.
122
124 error: specify path to quvi(1) command with --quvi
125 clive uses quvi(1) to parse the video details. Use the "--quvi" to
126 specify the path. See also "FILES".
127
128 error: specify path to a download command with --get-with
129 clive uses a 3rd party command to download the videos. Use the
130 "--get-with" to specify the path to such command. See also "FILES".
131
133 ~/.cliverc
134 Additional search paths:
135
136 ~/.clive/config
137 ~/.config/clive/config
138
139 For a system-wide configuration:
140
141 /usr/local/share/clive/config
142 /usr/share/clive/config
143 /etc/clive/config
144 /etc/xdg/clive/clive.conf
145 /etc/xdg/clive.conf
146
147 You can also set CLIVE_CONFIG, e.g.:
148
149 env CLIVE_CONFIG=/path/to/config/file clive
150
151 Or use "--config-file", e.g.:
152
153 clive --config-file /path/to/config/file
154
155 A typical configuration file could look like:
156
157 --quvi "/usr/bin/quvi %u"
158 # Recommended value to be used with quvi 0.2.12+
159 # --quvi "/usr/bin/quvi --category-http %u"
160 --get-with "/usr/bin/curl -L -C - -o %f %u"
161 --filename-format "%t_%i.%s"
162 --exec "/usr/bin/vlc %f"
163
164 You should set at very least "--quvi" and "--get-with" in your
165 configuration file for seamless use.
166
168 These examples assume you have set "--quvi" and "--get-with" in the
169 config file. See "FILES" for an example config file.
170
171 clive "URL"
172 Typical use.
173
174 clive -f mp4_360 "YOUTUBE_URL"
175 Similar but get the mp4_360p format (specific to YouTube) of the
176 video.
177
178 clive -f help
179 Help on how you can use the "--format" option.
180
181 clive -f list
182 Lists all quvi(1) supported websites with formats.
183
184 clive -f list dailymotion
185 Lists dailymotion formats. The pattern is matched to quvi(1)
186 returned website domain strings. For example:
187
188 clive -f list dailym
189 Yields the same results.
190
191 clive "URL" -n
192 Do not download the video. Print the video details only.
193
194 echo "URL" | clive
195 Read from stdin. Same but read multiple URLs (in this case from a
196 file):
197
198 % cat >> URLs
199 URL1
200 URL2
201 (^D)
202 % clive < URLs
203 Or:
204 % clive URLs
205
206 Please note that each URL must be separated with a newline
207 character.
208
210 clive exits with 0 on success, otherwise the code is >0. Strictly clive
211 exit statuses are 0 or 1. For example, if command line parsing fails,
212 the exit status is 1.
213
214 When an error occurs in another command invoked by clive, e.g. quvi(1),
215 clive exits with the exit status returned by the command.
216
217 If you are planning to use clive for anything more peculiar, you should
218 feed it only one URL at a time. For example:
219
220 * You feed clive two URLs
221 * The 1st one fails, quvi exits with a non-zero value
222 * clive proceeds to the 2nd URL, quvi now exits with zero value
223 * clive exits with the zero, even if the 1st URL failed
224
226 quvi(1) wget(1) curl(1)
227
229 <http://clive.sourceforge.net/>
230
231 <http://quvi.sourceforge.net/>
232
234 Toni Gundogdu <legatvs at sign gmail com>
235
236 Thanks to all those who have contributed to the project by sending
237 patches, reporting bugs and writing feedback. You know who you are.
238
239
240
241perl v5.12.3 2011-05-02 CLIVE.1(1)