QUVI-GET(1) | quvi Manual | QUVI-GET(1) |
quvi-get - The vilified media stream extraction tool
quvi get [OPTIONS] [ARGS]
This command saves the media stream to a file.
The command will attempt to determine if any of the libquvi-scripts(7) accept the input URL before exiting with an error. The script type {playlist,media,...} determines how the command will handle the input URL.
Playlist URLs
Media URLs
The support for the media hosts is determined by the current selection of libquvi-scripts(7).
See quvirc(5) for more information about the groups and the variables that quvi parses.
The command will read stdin by default. The input is expected to contain URLs. The command arguments are expected to be either URLs or file paths. If the input is read from either stdin or a file, the contents are read as RFC2483.
-o, --check-mode-offline
config: core.check-mode-offline=<boolean>
-B, --print-subtitles
-S, --print-streams
-l, --subtitle-language PATTERN[,PATTERN,...]
The value may also contain the reserved keyword croak which will cause libquvi(3) to exit with an error when reached.
The first available subtitle language will be chosen if nothing matched the PATTERN
config: core.subtitle-language=<PATTERN[,PATTERN,...]>
-s, --stream PATTERN[,PATTERN,...]
The value may contain the following reserved keywords:
The best quality is determined by the libquvi-scripts(7) by comparing the media quality properties, e.g. the video height property, although the actual method may vary depending on the data provided by the media hosting service.
The first available stream is selected if nothing matched
config: core.stream=<PATTERN[,PATTERN,...]>
-L, --subtitle-export-format FORMAT (default: srt)
config: core.subtitle-export-format=<FORMAT>
-b, --verbosity LEVEL (default: verbose)
config: core.verbosity=<LEVEL>
-A, --exec-dump-argv
config: exec.dump-argv=<boolean>
-E, --exec-enable-stderr
config: exec.enable-stderr=<boolean>
-O, --exec-enable-stdout
config: exec.enable-stdout=<boolean>
-e, --exec COMMAND
%s Media property: start time (ms) %T Media property: thumbnail URL %d Media property: duration (ms) %u Media stream property: URL %I Media stream property: ID %t Media property: title %i Media property: ID %e File extension[1] %f Path to the saved media file[2]
[1]: The file extension is parsed from the HTTP content-type header.
quvi-get(1) replaces this sequence with HTTP media streams only.
quvi-dump(2) replaces it only when --query-metainfo is used with
HTTP media streams.
[2]: This sequence is unique to quvi-get(1)
This option may be specified multiple times. In the quvirc(5) file, specify the commands in a comma-separated list.
config: exec.external=<COMMAND[,COMMAND,...]>
-w, --overwrite
-g, --output-regex PATTERN (default: multiple)
The PATTERN will be used to match/replace all occurences — this is similar to the g modifier of Perl. The option supports the m// (match, m is optional) operation and the s/// substitution operation.
The syntax is similar to Perl-syntax except that this option expects a leading "property sequence" that specifies the media property to apply the regex PATTERN against. See the section called “Exec” for a complete list of the supported "property sequences".
This option may be specified multiple times. Inside the quvirc(5) file, specify the PATTERNs in a comma-separated list. Double any backslashes inside the quvirc(5) in the PATTERN.
The command applies the following PATTERNs by default:
%t:/\w|\s/ %t:s/\s\s+/ / %t:s/^\s+// %t:s/\s+$//
config: get.output-regex=<PATTERN[,PATTERN,...]>
-f, --output-file FILE
-n, --output-name FORMAT (default: "%t.%e")
config: get.output-name=<FORMAT>
-i, --output-dir DIR (default: cwd)
config: get.output-dir=<DIR>
-r, --resume-from OFFSET (default: 0)
If the value is >=0, the command will send an HEAD request to the HTTP server to query the content-{type,length} values. These are used to build the output filename and to determine whether the transfer should be resumed; the content-length value is compared to the local file length to determine whether transfer should resume.
Use of a negative value (<0) will cause the command to disable resuming completely causing the command to skip the step that sends the HEAD request to the HTTP server, and start the transfer from the 0 offset, and effectively, overwriting the existing file. The content-{type,length} values are parsed from the returned HTTP GET response, instead.
Technical: libcurl requires setting CURLOPT_RESUME_FROM_LARGE before ‘curl_easy_perform’ is called. The the command has no way of knowing whether the transfer should be resumed if ‘content-length’ is not queried by sending a HTTP HEAD request before the transfer begins. A possible workaround is to specify from which offset the transfer should continue, but this requires that the user determines the value by hand.
config: get.resume-from=<OFFSET>
-k, --skip-transfer
config: get.skip-transfer=<boolean>
-t, --throttle RATE (default: 0)
config: get.throttle=<RATE>
-c, --enable-cookies
config: http.enable-cookies=<boolean>
-u, --user-agent USERAGENT (default: Mozilla/5.0)
libquvi-scripts(7) may override this value
config: http.user-agent=<USERAGENT>
$ quvi get MEDIA_URL
$ quvi get -S MEDIA_URL
$ quvi get -s foo MEDIA_URL
$ quvi get -s foo,baz,best MEDIA_URL $ quvi get -s foo,baz,croak MEDIA_URL
The first will grab whatever is the best quality if neither ("foo" or "baz") stream is available. The use of "croak" keyword will cause the command to exit with an error if neither stream is available.
$ quvi get -B MEDIA_URL
$ quvi get -k -l cc_en,croak MEDIA_URL
Use of "croak" keyword will cause the command to exit with an error if "cc_en" subtitle was not available.
$ quvi get -e "mplayer %f" PLAYLIST_URL
See quvi(1)
Either EXIT_SUCCESS or EXIT_FAILURE. The actual value depends on the platform, on POSIX systems they are 0 (success) and 1 (failure).
Home
http://quvi.sourceforge.net/
Development code
git://repo.or.cz/quvi-tool.git
gitweb
http://repo.or.cz/w/quvi-tool.git
Toni Gundogdu <legatvs@gmail.com>
Report bugs to the quvi-devel mailing list <quvi-devel@lists.sourceforge.net> where the development and the maintenance is primarily done. You do not have to be subscribed to the list to send a message there.
quvi is Free Software licensed under the GNU Affero GPLv3+
Part of the quvi(1) suite
10/05/2013 | quvi 0.9.4 |