Split from git://repo.or.cz/quvi.git
[quvi-tool.git] / doc / man1 / quvi.1.pod
blobf8af6afa30a0fb25ef6d307b52eaac55a030d77b
1 =head1 NAME
3 quvi - query media tool
5 =head1 SYNOPSIS
7 quvi [options] E<lt>url | file ...E<gt>
9 =head1 DESCRIPTION
11 quvi is a command line tool for parsing flash media stream URLs.
12 It supports many websites including YouTube and Dailymotion.
14 =head1 OPTIONS
16 =head2 Notes
18 quvi reads standard input by default. It can also read the URLs from
19 files but expects each URL to be separated by a newline character.
21 =head2 Options
23 =over 4
25 =item B<-h, --help>
27 Print help and exit.
29 =item B<--version>
31 Print program version and exit.
33 =item B<--license>
35 Print license and exit.
37 =item B<--support> [I<arg>]
39 Print supported hosts and exit. If an I<arg> is specified, the program
40 checks, instead, whether the I<arg> is supported. For checking which
41 formats are available to an URL, use C<--query-formats> instead.
43 =item B<--xml>
45 Print the media details in XML.
47 =item B<-q, --quiet>
49 Turn off all output printed to stderr (excl. any errors). If
50 C<--verbose-libcurl> is enabled, libcurl will continue to print messages to
51 stderr. The media details will still be printed to stdout.
53 =item B<--verbose-libcurl>
55 Turn on libcurl verbose mode.
57 =item B<--exec> I<arg>
59 Invoke I<arg> after each successfully parsed URL. Each occurence of the
60 following specifiers will be replaced (and quoted with double quatation
61 marks) within the I<arg>:
63  %t  Page title
64  %u  Media URL
66 =item B<-r, --no-resolve>
68 Do not resolve URL redirections. If enabled, breaks the compatibility
69 with most "shortened" URLs. Webscripts that use redirection resolving
70 explicitly, ignore this switch.
72 =item B<-n, --no-verify>
74 Do not verify media stream URL after parsing. The verification is
75 specific to HTTP and ignored with other protocols. If enabled, some
76 of the media details, e.g. content length, will be incomplete.
78 =item B<--category-http>
80 Enable category HTTP webscripts. This is the default category.
82 =item B<--category-mms>
84 Enable category MMS webscripts.
86 =item B<--category-rtsp>
88 Enable category RTSP webscripts.
90 =item B<--category-rtmp>
92 Enable category RTMP webscripts.
94 =item B<--category-all>
96 Enable all categories of webscripts.
98 =item B<-F, --query-formats>
100 Query available formats to an URL.
102 =item B<-f, --format> I<arg> (=default)
104 Get format I<arg> of the media. The resulting format may be different
105 from the I<arg> if the library was unable to get the requested format.
106 See also C<--query-formats>.
108 =item B<--agent> I<arg> (=Mozilla/5.0)
110 Identify quvi as I<arg> to the HTTP servers. Default is "Mozilla/5.0".
112 =item B<--proxy> I<arg>
114 Use proxy for HTTP connections, e.g. "http://foo:1234".
115 You can also define http_proxy environment setting to
116 achieve the same.
118 =item B<--no-proxy>
120 Disable use of HTTP proxy completely. Proxy will not be used even
121 if it is defined in http_proxy.
123 =item B<--connect-timeout> I<seconds>
125 Maximum seconds allowed connection to server take.
126 Default is 30.
128 =back
130 =head1 EXAMPLES
132 Put the URLs inside quotes when they are specified as the command line
133 arguments to the program. This is the recommended practice.
135 =over 4
137 =item quvi "URL"
139 Typical use.
141 =item quvi --xml "URL"
143 Same but print the results in XML.
145 =item quvi -f best "URL"
147 Get for the best available format of the media. This assumes E<gt>1
148 formats are supported, otherwise will fallback to default format.
150 =item quvi -F "URL"
152 Query available formats to the URL. Use one of the returned format
153 strings from this list with C<--format>.
155 =item quvi --support
157 Print supported website in the HTTP category and exit.
159 =item quvi --support --category-rtmp
161 Same but print only those from the RTMP category.
163 =item quvi --support "URL"
165 Check whether the URL is supported. This does not require an Internet
166 connection but will fail with most "shortened" URLs.
168 =back
170 =head1 FILES
172 =over 4
174 =item B<$HOME/.quvirc>
176 Most of the command line options can also be defined in the
177 configuration file. For example:
179  agent = some_agent/1.0     # --agent
180  proxy = http://foo:1234    # --proxy
181  no-verify                  # --no-verify
182  verbose-libcurl            # --verbose-libcurl
184 You can also use $QUVI_HOME instead of $HOME.
186 =back
188 =head1 ENVIRONMENT
190 =head2 quvi
192 =over 4
194 =item B<QUVI_HOME>
196 Path to the directory with the configuration file. If set, quvi
197 command uses this instead of $HOME.
199 =back
201 =head2 libquvi
203 =over 4
205 =item B<LIBQUVI_SCRIPTSDIR>
207 Path to the libquvi-scripts directory. Overrides the libquvi default
208 search paths for the scripts, e.g.:
210  env LIBQUVI_SCRIPTSDIR=/dir/with/quvi/lua/scripts/ quvi
212 Make sure it points to a directory containing the lua/ directory with the
213 expected "util/*.lua" and "website/quvi/*.lua" scripts that are normally
214 installed with libquvi-scripts.
216 Refer to the libquvi API documentation at
218   <http://quvi.sourceforge.net/doc/>
220 for a tutorial that covers these steps.
222 =item B<LIBQUVI_SHOW_SCANDIR>
224 If set, libquvi prints the lua script search paths to the stderr.
226 =item B<LIBQUVI_SHOW_SCRIPT>
228 If set, the lua scripts found by libquvi are printed to the stderr.
230  env LIBQUVI_SHOW_SCRIPT=1 quvi
232 =back
234 =head1 EXIT STATUS
236 quvi exits with 0 on success and E<gt>0 if an error occurred.
238  QUVI_OK               = 0x00
239  QUVI_MEM              = 0x01, Memory allocation failed
240                            (or invalid quvi command line option)
241  QUVI_BADHANDLE        = 0x02, Bad session handle
242  QUVI_INVARG           = 0x03, Invalid function (or command line) arg
243  QUVI_CURLINIT         = 0x04, libcurl initialization failed
244  QUVI_LAST             = 0x05, Indicates end of list iteration
245  QUVI_ABORTEDBYCALLBACK= 0x06, Aborted by callback function
246  QUVI_LUAINIT          = 0x07, Lua initialization failure
247  QUVI_NOLUAWEBSITE     = 0x08, Failed to find lua webscripts
248  QUVI_NOLUAUTIL        = 0x09, Failed to find the utility scripts
249  --
250  QUVI_NOSUPPORT        = 0x41, libquvi does not support the host
251  QUVI_CALLBACK         = 0x42, network callback error occurred
252  QUVI_ICONV            = 0x43, libiconv error occurred
253  QUVI_LUA              = 0x44, lua error occurred
255 =head1 WWW
257  Home  : http://quvi.sourceforge.net/
258  gitweb: http://repo.or.cz/w/quvi-tool.git
260 =head1 LICENSE
262 quvi is free software, licensed under the LGPLv2.1+.
264 =head1 SEE ALSO
266 C<libquvi(3)>, C<libquvi-scripts(7)>
268 =head1 AUTHOR
270 Toni Gundogdu E<lt>legatvs at sign gmail comE<gt>
272 Thanks to all those who have contributed to the project by sending patches,
273 reporting bugs and writing feedback. You know who you are.