5 quvi - query media tool
9 quvi [options] [url...]
13 quvi is a command line tool for parsing Adobe Flash media stream URLs. It
14 supports many websites including YouTube and Dailymotion.
16 The parsed details are printed to standard output (in JSON), everything else
17 is printed to standard error.
21 quvi parses Adobe Flash media stream URLs for third party applications. It
22 originates from the idea of allowing users to view the videos without having
23 to install or use Adobe Flash Player. quvi is not an "alternative" but rather
24 a "workaround" to Adobe Flash Player.
27 * <http://en.wikipedia.org/wiki/Adobe_Flash#Performance>
28 * <http://en.wikipedia.org/wiki/Adobe_Flash#Flash_client_security>
29 * <http://en.wikipedia.org/wiki/Adobe_Flash#Alternatives_to_Flash>
41 Print program version and exit.
45 Print license and exit.
49 Print supported hosts and exit. To check if an URL is supported, specify
50 an URL as an argument to the program. See L</EXAMPLES>.
54 Print the details in XML (instead of JSON). URLs are escaped (URL encoded,
55 unlike in JSON). Encoding is always UTF-8 (like in JSON).
59 Print the details in the previously used default output format
64 Turn off output to stderr (excl. errors, libcurl). Video details will
65 be printed to stdout as they would be normally.
67 =item B<--verbose-libcurl>
69 Turn on libcurl verbose mode.
71 =item B<--exec> I<arg>
73 Invoke I<arg> for each (successfully) parsed media. You can use the following
78 Note that I<all> occurences of the specifier will be replaced,
79 and each new value will be quoted ("").
81 =item B<-s, --no-shortened>
83 Do not "decompress" shortened URLs before using them.
85 =item B<-n, --no-verify>
87 Do not verify media URL after parsing it. Normally this serves two
90 * Check that the URL works
91 * Get content-length and content-type
93 If this switch used, the program will report invalid values for those
94 details (e.g. 0 content length, empty string for content-type, etc.) but
95 may save some bandwidth if those details are not needed.
97 Note that the URL is verified for HTTP only.
99 =item B<--category-http>
101 Enable category HTTP website scripts. This is the default category.
103 =item B<--category-mms>
105 Enable category MMS website scripts.
107 =item B<--category-rtsp>
109 Enable category RTSP website scripts.
111 =item B<--category-rtmp>
113 Enable category RTMP website scripts.
115 =item B<--category-all>
117 Enable all categories of website scripts.
119 =item B<--page-title> I<arg>
121 Check that the parsed page title matches the I<arg>.
122 The libquvi tests typically make use of this option.
124 =item B<--media-id> I<arg>
126 Check that the parsed media ID matches the I<arg>.
127 The libquvi tests typically make use of this option.
129 =item B<--file-length> I<length>
131 Check that the parsed media content length matches the I<arg>.
132 The libquvi tests typically make use of this option.
134 =item B<--file-suffix> I<arg>
136 Check that the parsed media file suffix matches the I<arg>.
137 The libquvi tests typically make use of this option.
141 Test all of the built-in (category QUVIPROTO_HTTP) URLs.
145 Dump media details with C<--test-all>.
147 =item B<-t, --test> I<arg>
149 Match I<arg> to built-in (category QUVIPROTO_HTTP) test URLs, e.g.:
156 % quvi -t collegehumor
158 =item B<-f, --format> I<arg>
160 Query for I<arg> format. I<arg> can also be C<help>.
162 =item B<--agent> I<arg>
164 Identify quvi as I<arg> to servers. Default is "Mozilla/5.0".
166 =item B<--proxy> I<arg>
168 Use proxy for HTTP connections, e.g. "http://foo:1234".
169 You can also define http_proxy environment setting to
174 Disable use of HTTP proxy completely. Proxy will not
175 be used even if defined in http_proxy.
177 =item B<--connect-timeout> I<seconds>
179 Maximum seconds allowed connection to server take.
194 Dump all supported websites.
196 =item quvi --support URL
198 Check if URL is supported. Note that some of the shortened URLs will
199 fail with this. quvi exit status will be the last exit status of the
200 last checked URL. See also L</EXIT STATUS>.
204 Run all built-in host tests.
206 =item quvi -aqd --xml
208 Same but run in quiet mode. Print details in XML (to stdout).
210 =item quvi -t youtube
212 Match pattern "youtube" to a built-in media URL and test it.
214 =item quvi YOUTUBE_URL -f best
216 Query YOUTUBE_URL for "best" format.
218 Run quvi with C<--support> to get a list of the websites
219 and which formats they support.
221 =item quvi -f list dailym
223 Print available formats for dailym(otion).
233 You can define most of the command line options in the
234 config file. For example:
236 agent = some_agent/1.0 # --agent
237 proxy = http://foo:1234 # --proxy
238 no-verify # --no-verify
239 verbose-libcurl # --verbose-libcurl
241 Note that you can also define $QUVI_HOME and use it instead of $HOME (~).
251 Path to the directory containing the configuration file (.quvirc).
252 Mimics $HOME found on Unix-like systems. Note that using this
253 overrides the use of $HOME.
255 =item B<QUVI_BASEDIR>
257 Exclusive path to the directory holding the essential libquvi files,
260 Exlusivity here means that by setting this variable, the user
261 can override all other built-in and default search paths.
263 Not to be confused with B<QUVI_HOME> which is strictly for
264 C<quvi(1)>, whereas B<QUVI_BASEDIR> is for libquvi.
266 =item B<QUVI_SHOW_SCANDIR>
268 Set this variable if you need libquvi to report the scanned
269 directory paths. Each scanned path is printed to stderr.
275 quvi exits with 0 on success and E<gt>0 if an error occurred.
278 QUVI_MEM = 0x01, Memory allocation failed
279 QUVI_BADHANDLE = 0x02, Bad session handle
280 QUVI_INVARG = 0x03, Invalid function argument
281 QUVI_CURLINIT = 0x04, libcurl initialization failed
282 QUVI_LAST = 0x05, Indicates end of list iteration
283 QUVI_ABORTEDBYCALLBACK= 0x06, Aborted by callback function
284 QUVI_LUAINIT = 0x07, Lua initialization failure
285 QUVI_NOLUAWEBSITE = 0x08, Failed to find lua website scripts
287 QUVI_PCRE = 0x40, libpcre error occurred, deprecated 0.2.9+
288 QUVI_NOSUPPORT = 0x41, libquvi does not support the host
289 QUVI_CURL = 0x42, libcurl error occurred
290 QUVI_ICONV = 0x43, libiconv error occurred
291 QUVI_LUA = 0x44, lua error occurred
293 =head1 DEBUGGING TIPS
297 =item B<--verbose-libcurl>
299 You can use this switch to amp up libcurl verbosity.
301 =item B<Debug symbols>
303 Compile quvi with C<-g>, refer to C<gcc(1)> documentation for the
308 Make use of such tools as C<strace(1)>, C<gdb(1)> and C<valgrind(1)>.
309 They may prove invaluable.
315 E<lt>http://quvi.sourceforge.net/E<gt>
317 E<lt>http://repo.or.cz/w/quvi.gitE<gt>
321 E<lt>http://repo.or.cz/w/quvi.git/tree/HEAD:/docE<gt>
325 quvi or "(qu)ery (vi)deo" for historical reasons. As of 0.2.15
326 a more suitable name would be qume or "(qu)ery (me)dia".
328 quvi was inspired by cclive. Embeddable LUA scripting was introduced
333 quvi and libquvi are free software, licensed under the LGPLv2.1+.
334 The LUA scripts that quvi uses are considered as programs and using
335 the LUA scripts is B<linking>.
339 Toni Gundogdu E<lt>legatvs at sign gmail comE<gt>
341 Thanks to all those who have contributed to the project by sending patches,
342 reporting bugs and writing feedback. You know who you are.