.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "quvi 1" .TH quvi 1 "2012-03-01" "v0.4.2" "quvi manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" quvi \- query media tool .SH "SYNOPSIS" .IX Header "SYNOPSIS" quvi [options] [url ...] [file ...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" quvi is a command line tool for parsing flash media stream URLs. It supports many websites including YouTube and Dailymotion. .SH "COMMAND LINE PARSER" .IX Header "COMMAND LINE PARSER" \&\s-1GNU\s0 gengetopt is very flexible. .SS "Example" .IX Subsection "Example" .Vb 2 \& quvi \-\-category http \-\-category rtmp \-\-verbosity debug \e \& \-\-export\-level +errors \-\-feature \-verify \-\-feature \-resolve .Ve .SS "Same as above but with short options" .IX Subsection "Same as above but with short options" .Vb 1 \& quvi \-c http \-c rtmp \-v debug \-l +errors \-e \-verify \-e \-resolve .Ve .SS "Or even simply" .IX Subsection "Or even simply" .Vb 1 \& quvi \-ch \-cr \-vd \-l+ \-e\-v \-e\-r .Ve .SH "OPTIONS" .IX Header "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. .SS "\-h, \-\-help" .IX Subsection "-h, --help" Print help and exit. .SS "\-\-version" .IX Subsection "--version" Print program version and exit. .SS "\-\-license" .IX Subsection "--license" Print license and exit. .SS "\-\-support [\fIarg\fP]" .IX Subsection "--support [arg]" Print supported hosts and exit. If \fIarg\fR is present, the program checks whether the \fIarg\fR is supported. .PP The default behaviour, without an \fIarg\fR, causes quvi to print the supported websites. The \fBfirst\fR string is the domain string which is, in fact, a (Lua) pattern used to match the \s-1URL\s0 to a libquvi script. The \fBsecond\fR string is, \fInow obsolete\fR (see below), an array containing the supported formats specific to the host. .PP Use \f(CW\*(C`\-\-query\-formats\*(C'\fR if you need to check an \s-1URL\s0 for the available formats. .PP See also \*(L"\s-1EXAMPLES\s0\*(R". .SS "\-e, \-\-feature \fIarg\fP" .IX Subsection "-e, --feature arg" Enable or disable a feature. See also \*(L"\s-1EXAMPLES\s0\*(R". Possible values: .PP \fIresolve (default)\fR .IX Subsection "resolve (default)" .PP Resolve \s-1HTTP\s0 directions, e.g. shortened URLs. See below. .PP \fI\-resolve\fR .IX Subsection "-resolve" .PP 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. .PP Note that libquvi scripts that explicitly (need to) resolve redirections will continue to do so even if this switch is used. .PP \fIverify (default)\fR .IX Subsection "verify (default)" .PP Verify media stream \s-1URL\s0 after parsing. See below. .PP \fI\-verify\fR .IX Subsection "-verify" .PP Do not verify media stream \s-1URL\s0 after parsing. When used, some media details, e.g. content length, will not become available. .PP Note that libquvi skips the verification automatically with all non-HTTP media stream URLs. .PP \fIproxy (default)\fR .IX Subsection "proxy (default)" .PP Use a \s-1HTTP\s0 proxy with connections if it is defined using either the \f(CW\*(C`\-\-proxy\*(C'\fR or the \fBhttp_proxy\fR value. See below. .PP \fI\-proxy\fR .IX Subsection "-proxy" .PP Disable use of a \s-1HTTP\s0 proxy completely. Proxy will not be used even if it is defined in \fBhttp_proxy\fR. .SS "\-d, \-\-export\-format \fIarg\fP (=json)" .IX Subsection "-d, --export-format arg (=json)" Set the interchange format in which the data is to be printed. Possible values: .PP .Vb 2 \& json .. Print in JSON (default) \& xml .. Print in XML .Ve .SS "\-l, \-\-export\-level \fIarg\fP (=media)" .IX Subsection "-l, --export-level arg (=media)" Set level of the exported interchange data. Possible values: .PP .Vb 2 \& media .. Media only (default) \& +errors .. Media and error messages .Ve .PP See also \f(CW\*(C`\-\-export\-format\*(C'\fR. .SS "\-v, \-\-verbosity \fIarg\fP (=verbose)" .IX Subsection "-v, --verbosity arg (=verbose)" Set the verbosity level of the printed messages. Possible values: .PP .Vb 4 \& debug .. Everything, including libcurl generated messages \& verbose .. Most messages (default) \& quiet .. Errors and warnings only \& mute .. Nothing at all .Ve .SS "\-\-exec \fIarg\fP" .IX Subsection "--exec arg" Invoke \fIarg\fR after each successfully parsed \s-1URL\s0. The following specifiers are supported: .PP .Vb 4 \& %u .. Media stream URL \& %t .. Media title \& %e .. Media file suffix (extension) \& %h .. Media thumbnail URL .Ve .PP Note that \fIeach\fR occurence of the specifier will be replaced within the \fIarg\fR. quvi accepts multiple occurrences of \f(CW\*(C`\-\-exec\*(C'\fR. See also \&\*(L"\s-1EXAMPLES\s0\*(R". .SS "\-c, \-\-category \fIarg\fP (=all)" .IX Subsection "-c, --category arg (=all)" Enable the level of the libquvi script categories. By default, all of the categories levels are enabled. Possible values: .PP .Vb 5 \& http .. HTTP category scripts only \& rtmp .. RTMP ... \& rtsp .. RTSP ... \& mms .. MMS ... \& all .. All of the above .Ve .PP quvi accepts multiple occurrences of \f(CW\*(C`\-\-category\*(C'\fR. See also \*(L"\s-1EXAMPLES\s0\*(R". .SS "\-F, \-\-query\-formats" .IX Subsection "-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 \&\fIformat strings\fR in this array with \f(CW\*(C`\-\-format\*(C'\fR. .PP The available formats are determined by the \fIlibquvi script\fR responsible for parsing the media details. .PP See also \f(CW\*(C`\-\-format\*(C'\fR. .SS "\-f, \-\-format \fIarg\fP (=default)" .IX Subsection "-f, --format arg (=default)" Query media details for the format \fIarg\fR. The \fIarg\fR may also be \&\f(CW\*(C`default\*(C'\fR or \f(CW\*(C`best\*(C'\fR. The \fIarg\fR value is used with \fBall\fR of the URLs fed to quvi. .PP If the \fIarg\fR is \f(CW\*(C`best\*(C'\fR, the \fIlibquvi script\fR responsible for parsing the media details will determine the \f(CW\*(C`best\*(C'\fR format available to an \s-1URL\s0. .PP If the \fIarg\fR is \f(CW\*(C`default\*(C'\fR the \fIlibquvi script\fR attempts to return an \&\s-1URL\s0 to whatever it deemed to be the \f(CW\*(C`default\*(C'\fR format for the \s-1URL\s0. .PP The \fIlibquvi script\fR will return the \f(CW\*(C`default\*(C'\fR format if the \fIarg\fR was unrecognized or the requested format was not available. .PP You can find more information about the YouTube specific \*(L"fmt\*(R" IDs at: .PP See also \f(CW\*(C`\-\-query\-formats\*(C'\fR. .SS "\-\-agent \fIarg\fP (=Mozilla/5.0)" .IX Subsection "--agent arg (=Mozilla/5.0)" Identify quvi as \fIarg\fR to the \s-1HTTP\s0 servers. Default is \*(L"Mozilla/5.0\*(R". .SS "\-\-proxy \fIarg\fP" .IX Subsection "--proxy arg" Use proxy for \s-1HTTP\s0 connections, e.g. \*(L"http://foo:1234\*(R". You can also define \fBhttp_proxy\fR environment setting to for the same effect. .SS "\-\-connect\-timeout \fIseconds\fP" .IX Subsection "--connect-timeout seconds" Maximum seconds allowed connection to server take. Default is 30. .SH "DEPRECATED" .IX Header "DEPRECATED" The following options have been marked as \*(L"deprecated\*(R" and will be removed in the later versions of quvi. .SS "\-\-no\-proxy" .IX Subsection "--no-proxy" Disable use of \s-1HTTP\s0 proxy completely. Proxy will not be used even if it is defined in \fBhttp_proxy\fR. Use \f(CW\*(C`\-\-feature\*(C'\fR instead. .SS "\-r, \-\-no\-resolve" .IX Subsection "-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. .PP Note that libquvi scripts that explicitly (need to) resolve redirections will continue to do so even if this switch is used. Use \f(CW\*(C`\-\-feature\*(C'\fR instead. .SS "\-n, \-\-no\-verify" .IX Subsection "-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. .PP Note that libquvi skips the verification automatically with all non-HTTP media stream URLs. Use \f(CW\*(C`\-\-feature\*(C'\fR instead. .SS "\-q, \-\-quiet" .IX Subsection "-q, --quiet" Turn off all output printed to stderr (excl. any errors). If \f(CW\*(C`\-\-verbose\-libcurl\*(C'\fR is specified, libcurl will continue to print messages to stderr. The media details will still be printed to stdout. Use \f(CW\*(C`\-\-verbosity\*(C'\fR instead. .SS "\-\-verbose\-libcurl" .IX Subsection "--verbose-libcurl" Turn on libcurl verbose mode. Use \f(CW\*(C`\-\-verbosity\*(C'\fR instead. .SS "\-\-xml" .IX Subsection "--xml" Print the media details (and errors, if \f(CW\*(C`\-\-export\-level=+errors\*(C'\fR is specified) in \s-1XML\s0. Use \f(CW\*(C`\-\-export\-format\*(C'\fR instead. .SS "\-\-category\-http" .IX Subsection "--category-http" Enable category \s-1HTTP\s0 webscripts. This is the default category. Use \f(CW\*(C`\-\-category\*(C'\fR instead. .SS "\-\-category\-mms" .IX Subsection "--category-mms" Enable category \s-1MMS\s0 webscripts. Use \f(CW\*(C`\-\-category\*(C'\fR instead. .SS "\-\-category\-rtsp" .IX Subsection "--category-rtsp" Enable category \s-1RTSP\s0 webscripts. Use \f(CW\*(C`\-\-category\*(C'\fR instead. .SS "\-\-category\-rtmp" .IX Subsection "--category-rtmp" Enable category \s-1RTMP\s0 webscripts. Use \f(CW\*(C`\-\-category\*(C'\fR instead. .SS "\-\-category\-all" .IX Subsection "--category-all" Enable all categories of webscripts. Use \f(CW\*(C`\-\-category\*(C'\fR instead. .SH "EXAMPLES" .IX Header "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. .ie n .SS "quvi ""\s-1URL\s0""" .el .SS "quvi ``\s-1URL\s0''" .IX Subsection "quvi URL" Typical use. .ie n .SS "quvi \-d xml ""\s-1URL\s0""" .el .SS "quvi \-d xml ``\s-1URL\s0''" .IX Subsection "quvi -d xml URL" Same but print the results in \s-1XML\s0. .ie n .SS "quvi \-f best ""\s-1URL\s0""" .el .SS "quvi \-f best ``\s-1URL\s0''" .IX Subsection "quvi -f best URL" Get for the best available format of the media. This assumes >1 formats are supported, otherwise will fallback to default format. .ie n .SS "quvi \-F ""\s-1URL\s0""" .el .SS "quvi \-F ``\s-1URL\s0''" .IX Subsection "quvi -F URL" Query available formats to the \s-1URL\s0. Use one of the returned format strings from this list with \f(CW\*(C`\-\-format\*(C'\fR. .SS "quvi \-\-support" .IX Subsection "quvi --support" Print the supported websites. The domain strings are patterns. .SS "quvi \-\-support \-c rtmp \-c mms" .IX Subsection "quvi --support -c rtmp -c mms" Same but print only those from the \s-1RTMP\s0 and the \s-1MMS\s0 categories. .ie n .SS "quvi \-\-support ""\s-1URL\s0""" .el .SS "quvi \-\-support ``\s-1URL\s0''" .IX Subsection "quvi --support URL" Check whether the \s-1URL\s0 is supported. This does not require an Internet connection but will fail with most \*(L"shortened\*(R" URLs. .ie n .SS "quvi \-vm \-e\-r \-e\-v ""\s-1URL\s0"" \-\-exec ""echo %t"" \-\-exec ""vlc %u""" .el .SS "quvi \-vm \-e\-r \-e\-v ``\s-1URL\s0'' \-\-exec ``echo \f(CW%t\fP'' \-\-exec ``vlc \f(CW%u\fP''" .IX Subsection "quvi -vm -e-r -e-v URL --exec echo %t --exec vlc %u" 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 \&\fIecho\fR\|(1), open media stream \s-1URL\s0 in \fIvlc\fR\|(1). .SH "FILES" .IX Header "FILES" .ie n .SS "$HOME/.quvirc" .el .SS "\f(CW$HOME\fP/.quvirc" .IX Subsection "$HOME/.quvirc" Most of the command line options can also be defined in the configuration file. For example: .PP .Vb 2 \& agent = foo/1.0 # \-\-agent \& proxy = http://foo:1234 # \-\-proxy .Ve .PP You can also use \f(CW$QUVI_HOME\fR instead of \f(CW$HOME\fR. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .SS "quvi" .IX Subsection "quvi" \fI\s-1QUVI_HOME\s0\fR .IX Subsection "QUVI_HOME" .PP Path to the directory with the configuration file. If set, quvi command uses this instead of \f(CW$HOME\fR. .SS "libquvi" .IX Subsection "libquvi" \fI\s-1LIBQUVI_SCRIPTSDIR\s0\fR .IX Subsection "LIBQUVI_SCRIPTSDIR" .PP Path to the libquvi-scripts directory. Overrides the libquvi default search paths for the scripts, e.g.: .PP .Vb 1 \& env LIBQUVI_SCRIPTSDIR=/dir/with/quvi/lua/scripts/ quvi .Ve .PP 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. .PP For a totorial that covers these steps, see the libquvi C \s-1API\s0 documentation at: .PP .Vb 1 \& .Ve .PP \fI\s-1LIBQUVI_SHOW_SCANDIR\s0\fR .IX Subsection "LIBQUVI_SHOW_SCANDIR" .PP If set, libquvi prints the lua script search paths to the stderr. .PP \fI\s-1LIBQUVI_SHOW_SCRIPT\s0\fR .IX Subsection "LIBQUVI_SHOW_SCRIPT" .PP If set, the lua scripts found by libquvi are printed to the stderr. .PP .Vb 1 \& env LIBQUVI_SHOW_SCRIPT=1 quvi .Ve .SS "libcurl" .IX Subsection "libcurl" \fIhttp_proxy\fR .IX Subsection "http_proxy" .PP http_proxy value is used if defined. Note, however, that \f(CW\*(C`\-\-proxy\*(C'\fR and \&\f(CW\*(C`\-\-feature \-proxy\*(C'\fR both override this behaviour. .SH "EXIT STATUS" .IX Header "EXIT STATUS" quvi exits with 0 on success and >0 if an error occurred. .PP .Vb 10 \& 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 .Ve .SH "WWW" .IX Header "WWW" .Vb 2 \& Home : http://quvi.sourceforge.net/ \& gitweb: http://repo.or.cz/w/quvi\-tool.git .Ve .SH "LICENSE" .IX Header "LICENSE" quvi is free software, licensed under the LGPLv2.1+. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIlibquvi\fR\|(3), \fIlibquvi\-scripts\fR\|(7) .SH "AUTHOR" .IX Header "AUTHOR" Toni Gundogdu .PP Thanks to all those who have contributed to the project by sending patches, reporting bugs and writing feedback. You know who you are.