1quvi(1)                           quvi manual                          quvi(1)
2
3
4

NAME

6       quvi - query media tool
7

SYNOPSIS

9       quvi [options] [url|file ...]
10

DESCRIPTION

12       quvi is a command line tool for parsing Adobe Flash media stream URLs.
13       It supports many websites including YouTube and Dailymotion.
14
15       The parsed details are printed to standard output (in JSON), everything
16       else is printed to standard error.
17

MOTIVATION

19       quvi parses Adobe Flash media stream URLs for third party applications.
20       It originates from the idea of allowing users to view the videos
21       without having to install or use Adobe Flash Player. quvi is not an
22       "alternative" but rather a "workaround" to Adobe Flash Player.
23
24       Read also:
25
26         * <http://en.wikipedia.org/wiki/Adobe_Flash#Performance>
27         * <http://en.wikipedia.org/wiki/Adobe_Flash#Flash_client_security>
28         * <http://en.wikipedia.org/wiki/Adobe_Flash#Alternatives_to_Flash>
29

NOTES - PROTOCOL CATEGORIES

31       As of 0.2.12, quvi supports different "protocol categories". For
32       historical reasons, it defaults to the HTTP category. This means that
33       any website scripts that parse and return RTMP/MMS/RTSP media URLs are
34       not considered unless an appropriate category switch is used.  For
35       example:
36
37         % quvi --support                 # HTTP websites only (default)
38         % quvi --support --category-rtmp # RTMP websites only
39         % quvi --support -a              # Websites of all categories
40
41       With this in mind:
42
43         % quvi RTMP_URL
44         error: no support: RTMP_URL
45         % quvi -a RTMP_URL # OK
46
47       The default behaviour is planned to change to "all" in 0.2.20.
48

OPTIONS

50       Unless an URL is specified in the command line, quvi reads from the
51       stdin and expects each URL to be separated by a newline. The command
52       line args may be either URLs or files to be read. As with reading from
53       the stdin, each URL in the file is expected to be separated by a
54       newline.
55
56       -h, --help
57           Print help and exit.
58
59       --version
60           Print program version and exit.
61
62       --license
63           Print license and exit.
64
65       --support
66           Print supported hosts and exit. To check if an URL is supported,
67           specify an URL as an argument to the program. See "EXAMPLES".
68
69       --xml
70           Print the details in XML (instead of JSON). URLs are escaped (URL
71           encoded, unlike in JSON). Encoding is always UTF-8 (like in JSON).
72
73       --old
74           Print the details in the previously used default output format
75           (0.2.3 and earlier).
76
77       -q, --quiet
78           Turn off all output printed to stderr (excl. any errors). libcurl
79           will continue to generate messages to stderr if the
80           "--verbose-libcurl" switch is used.
81
82           This switch has no no effect on the the media details which are
83           printed to stdout.
84
85       --verbose-libcurl
86           Turn on libcurl verbose mode.
87
88       --exec arg
89           Invoke arg for each (successfully) parsed media. You can use the
90           following specifiers in arg:
91
92             %u  Media URL
93
94           Note that all occurences of the specifier will be replaced, and
95           each new value will be quoted ("").
96
97       -r, --no-resolve
98           Do not attempt to resolve URL redirections. If used, most of the
99           shortened URLs will stop working with quvi. Note that this switch
100           has no effect on website scripts that use the quvi.resolve
101           function.
102
103       -n, --no-verify
104           Do not verify media stream URL after parsing it. Normally this
105           serves two purposes:
106
107             * Check that the URL works
108             * Get content-length and content-type
109
110           If this switch used, the program will report invalid values for
111           those details (e.g. 0 content length, empty string for content-
112           type, etc.) but may save some bandwidth if those details are not
113           needed.
114
115           Note that the URL is verified for HTTP only.
116
117       --category-http
118           Enable category HTTP website scripts. This is the default category.
119
120       --category-mms
121           Enable category MMS website scripts.
122
123       --category-rtsp
124           Enable category RTSP website scripts.
125
126       --category-rtmp
127           Enable category RTMP website scripts.
128
129       --category-all
130           Enable all categories of website scripts.
131
132       -F, --query-formats
133           Query available formats to an URL.
134
135       -f, --format arg
136           Query for arg format. arg can also be "help". The resulting format
137           may be different from the requested one if the LUA script was
138           unable to parse an URL to the requested format. The scripts are
139           expected to fallback to the 'default' format if the requested
140           format could not be parsed and raise an error if that failed as
141           well.
142
143       --agent arg
144           Identify quvi as arg to servers. Default is "Mozilla/5.0".
145
146       --proxy arg
147           Use proxy for HTTP connections, e.g. "http://foo:1234".  You can
148           also define http_proxy environment setting to achieve the same.
149
150       --no-proxy
151           Disable use of HTTP proxy completely. Proxy will not be used even
152           if defined in http_proxy.
153
154       --connect-timeout seconds
155           Maximum seconds allowed connection to server take.  Default is 30.
156

EXAMPLES

158       Put the URLs inside quotes when they are specified as the command line
159       arguments to the program. This is the recommended practice.
160
161       quvi "URL"
162           Typical use.
163
164       quvi --xml "URL"
165           Same but print the results in XML.
166
167       quvi -f best "URL"
168           Get for the best available format of the media. This assumes >1
169           formats are supported, otherwise will fallback to default format.
170
171       quvi -F "URL"
172           Query available formats to the URL. Use one of the returned format
173           strings from this list with "--format".
174
175       quvi --support
176           Print supported website in the HTTP category and exit.
177
178       quvi --support --category-rtmp
179           Same but print only those from the RTMP category. See also "NOTES -
180           PROTOCOL CATEGORIES".
181
182       quvi --support "URL"
183           Check whether the URL is supported. This does not require an
184           Internet connection but will fail with most "shortened" URLs.
185

FILES

187       $HOME/.quvirc
188           You can define most of the command line options in the config file.
189           For example:
190
191            agent = some_agent/1.0     # --agent
192            proxy = http://foo:1234    # --proxy
193            no-verify                  # --no-verify
194            verbose-libcurl            # --verbose-libcurl
195
196           You can use $QUVI_HOME instead of $HOME.
197

ENVIRONMENT

199       QUVI_HOME
200           Path to the directory with the configuration file. If set, quvi
201           command uses this instead of $HOME.
202
203       QUVI_BASEDIR
204           Path to the "base directory" with the libquvi LUA scripts.
205           Overrides the default search paths. e.g.:
206
207             % ls /usr/share/quvi/lua
208             README util website
209             % env QUVI_BASEDIR=/usr/share/quvi quvi
210
211       QUVI_SHOW_SCANDIR
212           If set, libquvi prints the LUA script search paths to the stderr.
213
214       QUVI_SHOW_SCRIPT
215           If set, the LUA scripts found by libquvi are printed to the stderr.
216
217             % env QUVI_SHOW_SCRIPT=1 quvi
218

EXIT STATUS

220       quvi exits with 0 on success and >0 if an error occurred.
221
222         QUVI_OK               = 0x00
223         QUVI_MEM              = 0x01, Memory allocation failed
224                                   (or invalid quvi command line option)
225         QUVI_BADHANDLE        = 0x02, Bad session handle
226         QUVI_INVARG           = 0x03, Invalid function (or command line) arg
227         QUVI_CURLINIT         = 0x04, libcurl initialization failed
228         QUVI_LAST             = 0x05, Indicates end of list iteration
229         QUVI_ABORTEDBYCALLBACK= 0x06, Aborted by callback function
230         QUVI_LUAINIT          = 0x07, Lua initialization failure
231         QUVI_NOLUAWEBSITE     = 0x08, Failed to find lua website scripts
232         --
233         QUVI_PCRE             = 0x40, libpcre error occurred, deprecated 0.2.9+
234         QUVI_NOSUPPORT        = 0x41, libquvi does not support the host
235         QUVI_CURL             = 0x42, libcurl error occurred
236         QUVI_ICONV            = 0x43, libiconv error occurred
237         QUVI_LUA              = 0x44, lua error occurred
238

DEBUGGING TIPS

240       --verbose-libcurl
241           Make libcurl verbose.
242
243       Debug symbols
244           Compile quvi with "-g", see also gcc(1).
245
246       Other tools
247           See also gdb(1), strace(1) and valgrind(1).
248

WWW

250       <http://quvi.sourceforge.net/>
251
252       <http://repo.or.cz/w/quvi.git>
253

CONTRIBUTE

255       <http://repo.or.cz/w/quvi.git/tree/HEAD:/doc>
256

BACKGROUND

258       quvi or "(qu)ery (vi)deo" for historical reasons. As of 0.2.15 a more
259       suitable name would be qume or "(qu)ery (me)dia".
260
261       quvi was inspired by cclive. Embeddable LUA scripting was introduced in
262       0.2.0.
263

LICENSE

265       quvi and libquvi are free software, licensed under the LGPLv2.1+.  The
266       LUA scripts that quvi uses are considered as programs and using the LUA
267       scripts is linking.
268

AUTHOR

270       Toni Gundogdu <legatvs at sign gmail com>
271
272       Thanks to all those who have contributed to the project by sending
273       patches, reporting bugs and writing feedback. You know who you are.
274
275
276
2770.2.16                            2011-08-17                           quvi(1)
Impressum