Bump version to 2.3.0_4
[clive.git] / man1 / clive.1.pod
blobc4071b28b3c0dedb2a400f0d83592148c0bb019d
1 =head1 NAME
3 clive - command line video extraction tool
5 =head1 DESCRIPTION
7 clive is a command line video extraction tool for Youtube and other similar
8 video websites that require Adobe Flash for viewing the content.
10 =head1 OPTIONS
12 =over 4
14 =item B<--help>
16 Print help and exit.
18 =item B<--version>
20 Print version and exit.
22 =item B<--license>
24 Print license and exit.
26 =item B<--quiet>
28 Turn off all I<clive> output excluding errors. Note that this switch has no
29 effect on any of the third party commands that clive invokes.
31 =item B<-f, --format> I<arg>
33 Download I<arg> format of the video. I<arg> can also be C<help>.
35 =item B<-O, --output-file> I<arg>
37 Write video to I<arg>.
39 =item B<-n, --no-download>
41 Do not download the video, display video details only.
43 =item B<--config-file> I<arg>
45 Path to a file to read clive arguments from. See also L</FILES>.
47 =back
49 =head1 OPTIONS - CONFIGURATION
51 You can specify I<any> of the the command line options in the configuration
52 file. These options are under C<Configuration> for superficial reasons
53 (C<--help> output) only.
55 =over 4
57 =item B<--quvi> I<arg>
59 Path to C<quvi(1)> command with any additional arguments. clive invokes this
60 command to parse the video details (e.g. download URL). The following
61 specifiers are supported:
63     %u  Video URL
65 Note that I<all> occurences of the specifier will be replaced. clive also
66 appends C<--quiet> to I<arg> if it's not found.
68 If you use an HTTP proxy with C<quvi(1)>, you should do the same with
69 C<--get-with>, especially the proxy masks your IP. Some websites refuse
70 to work with requests for unique URLs coming from different IPs.
72 =item B<--get-with> I<arg>
74 Path to a download command (e.g. C<wget(1)> or C<curl(1)>) with any additional
75 arguments. clive invokes this command to download the video. The following
76 specifiers are supported:
78     %u  Video download URL
79     %f  Full path to video file
80     %n  Video file name
82 Note that I<all> occurences of the specifier will be replaced. See also the
83 note above about using an HTTP proxy with C<--quvi>.
85 =item B<--filename-format> I<arg>
87 Use I<arg> to specify the video output filename format. The default is "%t.%s".
88 The following specifiers are supported:
90     %t  Video title (after applying --regexp)
91     %i  Video ID
92     %h  Video host ID (req. quvi 0.2.8+)
93     %s  Video file suffix (parsed from server returned content-type)
95 Note that I<all> occurences of the specifier will be replaced.
97 =item B<--regexp> I<arg>
99 Use regular expression I<arg> to clean up the video title before
100 it is used in the output filename. The default is "/(\w|\s)/g".
102 Note that the syntax supports both "i" (case-insensitive) and "g"
103 (global or find all).
105 =item B<--exec> I<arg>
107 Invoke I<arg> after video download finishes. The following specifiers
108 are supported:
110     %f  Full path to the downloaded video file
112 Note that I<all> occurences of the specifier will be replaced.
114 =back
116 =head1 EXAMPLES
118 These examples assume you have set C<--quvi> and C<--get-with> in the config
119 file. See L</FILES> for an example config file.
121 =over 4
123 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc">
125 Typical use.
127 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc" -f webm_480p>
129 Same but get the webm_480p format of the video.
131 =item B<clive -f help>
133 Help on how you can use the C<--format> option.
135 =item B<clive -f list>
137 Lists all C<quvi(1)> supported websites with formats.
139 =item B<clive -f list dailymotion>
141 Lists dailymotion formats. The pattern is matched to C<quvi(1)>
142 returned website domain strings. For example:
144 =item B<clive -f list dailym>
146 Would yield the same results.
148 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc" -n>
150 Do not download the video. Print the video details only.
152 =item B<echo "http://www.youtube.com/watch?v=DUM1284TqFc" | clive>
154 Yet another way to feed clive with an URL. Or feed several on one go:
156   % cat >> urls.lst
157   http://www.youtube.com/watch?v=DUM1284TqFc
158   http://www.youtube.com/watch?v=TqgTz8ymZl8
159   (ctrl+d)
160   % clive < urls.lst
162 =back
164 =head1 FILES
166 =over 4
168 =item B<~/.cliverc>
170 Additional search paths:
172     ~/.clive/config
173     ~/.config/clive/config
175 For a system-wide configuration:
177     /usr/local/share/clive/config
178     /usr/share/clive/config
179     /etc/clive/config
180     /etc/xdg/clive/clive.conf
181     /etc/xdg/clive.conf
183 You can also set CLIVE_CONFIG, e.g.:
185     env CLIVE_CONFIG=/path/to/config/file clive
187 Or use C<--config-file>, e.g.:
189     clive --config-file /path/to/config/file
191 A typical configuration file could look like:
193     --quvi "/usr/bin/quvi %u"
194     --get-with "/usr/bin/curl -L -C - -o %f %u"
195     --filename-format "%t_%i.%s"
196     --exec "/usr/bin/vlc %f"
198 You should consider setting at least the C<--quvi> and C<--get-with>.
200 =back
202 =head1 EXIT STATUS
204 clive exits with 0 on success, otherwise the code is E<gt>0. Strictly clive
205 exit statuses are 0 or 1. For example, if command line parsing fails, the exit
206 status is 1.
208 When an error occurs in another command invoked by clive, e.g. C<quvi(1)>,
209 clive exits with the exit status returned by the command.
211 If you are planning to use clive for anything more peculiar, you should feed
212 it only one URL at a time. For example:
214     * You feed clive two URLs
215     * The 1st one fails, quvi exits with a non-zero value
216     * clive proceeds to the 2nd URL, quvi now exits with zero value
217     * clive exits with the zero, even if the 1st URL failed
219 =head1 MANGLED CHARACTERS
221 Check your terminal settings for an invalid locale setting. You can get a list
222 of the available locale names by running C<locale -a>. Also, make sure your
223 terminal supports unicode. e.g.:
225     % LANG=en_US.UTF8 urxvt&
226     % clive ... # in the new opened terminal
228 quvi (or libquvi) converts the characters to unicode if the parsed data
229 contains the charset meta tag. Otherwise the characters are copied from
230 the original content as they are without conversion.
232 =head1 WEBSITE SUPPORT
234 See L</--format> and L</EXAMPLES>. You could also run C<quvi(1)> with C<--support>
235 to get a list of the websites and formats that they support.
237 =head1 UPGRADING TO 2.3
239 =over 4
241 =item B<error: specify path to quvi(1) command with --quvi>
243 clive uses C<quvi(1)> to parse the video details. Use the C<--quvi> to specify
244 the path. See also L</FILES>.
246 =item B<error: specify path to a download command with --get-with>
248 clive uses a 3rd party command to download the videos. Use the C<--get-with> to
249 specify the path. See also L</FILES>.
251 =back
253 =head1 CONTRIBUTING
255 =over 4
257 =item B<Add support for a website>
259 This is quvi(1) territory, please visit L<http://quvi.googlecode.com/>.
261 You can also find the the READMEs and HOWTOs (on most systems) from
262 $prefix/share/quvi and $prefix/share/doc/quvi directories. Or visit:
264     <http://repo.or.cz/w/quvi.git/tree/HEAD:/doc>
265     <http://repo.or.cz/w/quvi.git/tree/HEAD:/share/lua>
267 =item B<Submitting patches>
269 If you have cooked up a patch, please submit it to the tracker see L</OTHER>.
270 Pull requests from git repos are also welcome.
272 =back
274 =head1 OTHER
276 <http://clive.googlecode.com/>
278 <http://sourceforge.net/projects/clive/support>
280 <git://repo.or.cz/clive.git>
282 =head1 SEE ALSO
284 C<quvi(1)>  C<wget(1)>  C<curl(1)>
286 =head1 AUTHOR
288 Toni Gundogdu <legatvs at sign gmail com>.