SYNOPSIS

quvi [options] [url ...] [file ...]

DESCRIPTION

quvi is a command line tool for parsing flash media stream URLs. It supports many websites including YouTube and Dailymotion.

COMMAND LINE PARSER

\s-1GNU\s0 gengetopt is very flexible.

Example

  quvi --category http --category rtmp --verbosity debug \
       --export-level +errors --feature -verify --feature -resolve

Same as above but with short options

quvi -c http -c rtmp -v debug -l +errors -e -verify -e -resolve

Or even simply

quvi -ch -cr -vd -l+ -e-v -e-r

OPTIONS

quvi reads standard input by default. It can also read the URLs from files but expects each \s-1URL\s0 to be separated by a newline character.

-h, --help

Print help and exit.

--version

Print program version and exit.

--license

Print license and exit.

--support [\fIarg\fP]

Print supported hosts and exit. If arg is present, the program checks whether the arg is supported.

The default behaviour, without an arg, causes quvi to print the supported websites. The first string is the domain string which is, in fact, a (Lua) pattern used to match the \s-1URL\s0 to a libquvi script. The second string is, now obsolete (see below), an array containing the supported formats specific to the host.

Use \*(C`--query-formats\*(C' if you need to check an \s-1URL\s0 for the available formats.

See also \*(L"\s-1EXAMPLES\s0\*(R".

-e, --feature \fIarg\fP

Enable or disable a feature. See also \*(L"\s-1EXAMPLES\s0\*(R". Possible values:

resolve (default)

Resolve \s-1HTTP\s0 directions, e.g. shortened URLs. See below.

-resolve

Do not resolve \s-1HTTP\s0 redirections. When used, quvi will not be able to resolve most of the \*(L"shortened URLs\*(R" produced by different \s-1URL\s0 shortening services.

Note that libquvi scripts that explicitly (need to) resolve redirections will continue to do so even if this switch is used.

verify (default)

Verify media stream \s-1URL\s0 after parsing. See below.

-verify

Do not verify media stream \s-1URL\s0 after parsing. When used, some media details, e.g. content length, will not become available.

Note that libquvi skips the verification automatically with all non-HTTP media stream URLs.

proxy (default)

Use a \s-1HTTP\s0 proxy with connections if it is defined using either the \*(C`--proxy\*(C' or the http_proxy value. See below.

-proxy

Disable use of a \s-1HTTP\s0 proxy completely. Proxy will not be used even if it is defined in http_proxy.

-d, --export-format \fIarg\fP (=json)

Set the interchange format in which the data is to be printed. Possible values:

json .. Print in JSON (default) xml .. Print in XML

-l, --export-level \fIarg\fP (=media)

Set level of the exported interchange data. Possible values:

media .. Media only (default) +errors .. Media and error messages

See also \*(C`--export-format\*(C'.

-v, --verbosity \fIarg\fP (=verbose)

Set the verbosity level of the printed messages. Possible values:

debug .. Everything, including libcurl generated messages verbose .. Most messages (default) quiet .. Errors and warnings only mute .. Nothing at all

--exec \fIarg\fP

Invoke arg after each successfully parsed \s-1URL\s0. The following specifiers are supported:

%u .. Media stream URL %t .. Media title %e .. Media file suffix (extension) %h .. Media thumbnail URL

Note that each occurence of the specifier will be replaced within the arg. quvi accepts multiple occurrences of \*(C`--exec\*(C'. See also \*(L"\s-1EXAMPLES\s0\*(R".

-c, --category \fIarg\fP (=all)

Enable the level of the libquvi script categories. By default, all of the categories levels are enabled. Possible values:

http .. HTTP category scripts only rtmp .. RTMP ... rtsp .. RTSP ... mms .. MMS ... all .. All of the above

quvi accepts multiple occurrences of \*(C`--category\*(C'. See also \*(L"\s-1EXAMPLES\s0\*(R".

-F, --query-formats

Query available formats to the \s-1URL\s0. The returned array is created from the data returned by the server. You can use the format strings in this array with \*(C`--format\*(C'.

The available formats are determined by the libquvi script responsible for parsing the media details.

See also \*(C`--format\*(C'.

-f, --format \fIarg\fP (=default)

Query media details for the format arg. The arg may also be \*(C`default\*(C' or \*(C`best\*(C'. The arg value is used with all of the URLs fed to quvi.

If the arg is \*(C`best\*(C', the libquvi script responsible for parsing the media details will determine the \*(C`best\*(C' format available to an \s-1URL\s0.

If the arg is \*(C`default\*(C' the libquvi script attempts to return an \s-1URL\s0 to whatever it deemed to be the \*(C`default\*(C' format for the \s-1URL\s0.

The libquvi script will return the \*(C`default\*(C' format if the arg was unrecognized or the requested format was not available.

You can find more information about the YouTube specific \*(L"fmt\*(R" IDs at: <http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs>

See also \*(C`--query-formats\*(C'.

--agent \fIarg\fP (=Mozilla/5.0)

Identify quvi as arg to the \s-1HTTP\s0 servers. Default is \*(L"Mozilla/5.0\*(R".

--proxy \fIarg\fP

Use proxy for \s-1HTTP\s0 connections, e.g. \*(L"http://foo:1234\*(R". You can also define http_proxy environment setting to for the same effect.

--connect-timeout \fIseconds\fP

Maximum seconds allowed connection to server take. Default is 30.

DEPRECATED

The following options have been marked as \*(L"deprecated\*(R" and will be removed in the later versions of quvi.

--no-proxy

Disable use of \s-1HTTP\s0 proxy completely. Proxy will not be used even if it is defined in http_proxy. Use \*(C`--feature\*(C' instead.

-r, --no-resolve

Do not resolve \s-1HTTP\s0 redirections. When used, quvi will not be able to resolve most of the \*(L"shortened URLs\*(R" produced by different \s-1URL\s0 shortening services.

Note that libquvi scripts that explicitly (need to) resolve redirections will continue to do so even if this switch is used. Use \*(C`--feature\*(C' instead.

-n, --no-verify

Do not verify media stream \s-1URL\s0 after parsing. When used, some media details, e.g. content length, will not become available.

Note that libquvi skips the verification automatically with all non-HTTP media stream URLs. Use \*(C`--feature\*(C' instead.

-q, --quiet

Turn off all output printed to stderr (excl. any errors). If \*(C`--verbose-libcurl\*(C' is specified, libcurl will continue to print messages to stderr. The media details will still be printed to stdout. Use \*(C`--verbosity\*(C' instead.

--verbose-libcurl

Turn on libcurl verbose mode. Use \*(C`--verbosity\*(C' instead.

--xml

Print the media details (and errors, if \*(C`--export-level=+errors\*(C' is specified) in \s-1XML\s0. Use \*(C`--export-format\*(C' instead.

--category-http

Enable category \s-1HTTP\s0 webscripts. This is the default category. Use \*(C`--category\*(C' instead.

--category-mms

Enable category \s-1MMS\s0 webscripts. Use \*(C`--category\*(C' instead.

--category-rtsp

Enable category \s-1RTSP\s0 webscripts. Use \*(C`--category\*(C' instead.

--category-rtmp

Enable category \s-1RTMP\s0 webscripts. Use \*(C`--category\*(C' instead.

--category-all

Enable all categories of webscripts. Use \*(C`--category\*(C' instead.

EXAMPLES

Always quote the URLs in the command line as seen below. Many URLs contain parameters that may otherwise cause the shell to behave with unexpected results. Typical use. Same but print the results in \s-1XML\s0. Get for the best available format of the media. This assumes >1 formats are supported, otherwise will fallback to default format. Query available formats to the \s-1URL\s0. Use one of the returned format strings from this list with \*(C`--format\*(C'.

quvi --support

Print the supported websites. The domain strings are patterns.

quvi --support -c rtmp -c mms

Same but print only those from the \s-1RTMP\s0 and the \s-1MMS\s0 categories. Check whether the \s-1URL\s0 is supported. This does not require an Internet connection but will fail with most \*(L"shortened\*(R" URLs. Mute message output (-vm), do not resolve \s-1HTTP\s0 redirections (-e-r) and skip media stream \s-1URL\s0 verification (-e-v). Print media title using echo\|(1), open media stream \s-1URL\s0 in vlc\|(1).

FILES

Most of the command line options can also be defined in the configuration file. For example:

agent = foo/1.0 # --agent proxy = http://foo:1234 # --proxy

You can also use $QUVI_HOME instead of $HOME.

ENVIRONMENT

quvi

\s-1QUVI_HOME\s0

Path to the directory with the configuration file. If set, quvi command uses this instead of $HOME.

libquvi

\s-1LIBQUVI_SCRIPTSDIR\s0

Path to the libquvi-scripts directory. Overrides the libquvi default search paths for the scripts, e.g.:

env LIBQUVI_SCRIPTSDIR=/dir/with/quvi/lua/scripts/ quvi

Make sure it points to a directory containing the lua/ directory with the expected \*(L"util/*.lua\*(R" and \*(L"website/quvi/*.lua\*(R" scripts that are normally installed with libquvi-scripts.

For a totorial that covers these steps, see the libquvi C \s-1API\s0 documentation at:

<http://quvi.sourceforge.net/doc/>

\s-1LIBQUVI_SHOW_SCANDIR\s0

If set, libquvi prints the lua script search paths to the stderr.

\s-1LIBQUVI_SHOW_SCRIPT\s0

If set, the lua scripts found by libquvi are printed to the stderr.

env LIBQUVI_SHOW_SCRIPT=1 quvi

libcurl

http_proxy

http_proxy value is used if defined. Note, however, that \*(C`--proxy\*(C' and \*(C`--feature -proxy\*(C' both override this behaviour.

EXIT STATUS

quvi exits with 0 on success and >0 if an error occurred.

QUVI_OK = 0x00 QUVI_MEM = 0x01, Memory allocation failed (or invalid quvi command line option) QUVI_BADHANDLE = 0x02, Bad session handle QUVI_INVARG = 0x03, Invalid function (or command line) arg QUVI_CURLINIT = 0x04, libcurl initialization failed QUVI_LAST = 0x05, Indicates end of list iteration QUVI_ABORTEDBYCALLBACK= 0x06, Aborted by callback function QUVI_LUAINIT = 0x07, Lua initialization failure QUVI_NOLUAWEBSITE = 0x08, Failed to find lua webscripts QUVI_NOLUAUTIL = 0x09, Failed to find the utility scripts -- QUVI_NOSUPPORT = 0x41, libquvi does not support the host QUVI_CALLBACK = 0x42, network callback error occurred QUVI_ICONV = 0x43, libiconv error occurred QUVI_LUA = 0x44, lua error occurred

WWW

Home : http://quvi.sourceforge.net/ gitweb: http://repo.or.cz/w/quvi-tool.git

LICENSE

quvi is free software, licensed under the LGPLv2.1+.

RELATED TO quvi…

libquvi\|(3), libquvi-scripts\|(7)

AUTHOR

Toni Gundogdu <legatvs at sign gmail com>

Thanks to all those who have contributed to the project by sending patches, reporting bugs and writing feedback. You know who you are.