GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CLIVE.1(1) User Contributed Perl Documentation CLIVE.1(1)

clive - (c)ommand (li)ne (v)ideo (e)xtraction tool

clive [<options>] [<url> | <file> ...]

clive is a command line media extraction tool for YouTube and similar websites that require flash.

clive originates from a simple shell script that was cooked up to work around the YouTube's flash requirement back in 2006.

Configuring

Autodetection

clive will attempt to autodetect the required commands from the $PATH, when they have not been defined in either config file or the command line.

Configuration file

See "FILES" for an example configuration file. You may want to consider adding at least the "--quvi" and "--get-with" there.

See also

"TROUBLESHOOTING", "KNOWN ISSUES" and "EXAMPLES".

clive expects the URLs to be separated by a newline character when the they are read from either stdin or files.

Print help and exit.

Print version and exit.

Print license and exit.

Turn off all clive output excluding errors. Note that this switch has no effect on any of the third party commands that clive invokes.

Query available formats to an URL. The returned string will contain an array of format strings, each separated by the '|' character. The array is created, by libquvi, from the data returned by the server. You can use these format strings with "--format".

See also "EXAMPLES" and "--format".

Download format arg of the media. The arg can also be "default", "best", "help" or "list". Note, however, that of these, the "list" and the "help" are deprecated and will be removed in the later versions of clive.

The arg value is used with all of the URLs fed to clive at runtime. If the arg is "best", libquvi will determine the "best" format available to an URL.

If the arg is "default" libquvi attempts to return an URL to whatever was deemed to be the "default" format to the URL. libquvi will switch to "default" format if the arg was unregognized or the requested arg format was unavailable.

For the above reasons, the downloaded format may be different from the requested arg format.

For details about the YouTube's "fmt" IDs, refer to: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs

See also "EXAMPLES", "--query-formats".

Write media to arg. Overrides "--filename-format".

Do not download the media, print details only.

Path to a file to read clive arguments from. See also "FILES".

The "configuration" options may be read from the config file. See "FILES".

arg to be invoked to start the quvi(1) command which clive uses to parse the media details. This is typically a full path to quvi(1) with any additional options. Overrides any value set by autodetection.

The following specifiers can be used in the arg:

  %u .. Media stream URL

All occurences of the specifier will be replaced. clive will automatically append "--quiet" to arg.

Path to a download command (e.g. wget(1) or curl(1)) with any additional arguments. clive invokes this command to download the media. Overrides any value set by autodetection.

The following specifiers are supported:

  %n  Media filename (after applying --regexp and --filename-format)
  %f  Path to downloaded media file (output path and %n)
  %u  Media stream URL

All occurences of the specifier will be replaced.

Use arg to specify the media output filename format. The following specifiers are supported:

  %t  Media title (after applying --regexp)
  %h  Media host ID
  %s  File suffix
  %i  Media ID

All occurences of the specifier will be replaced.

Use regular expression arg to clean up the media title before it is used in the filename. The syntax supports both "i" (case-insensitive) and "g" (global or "find all").

Invoke arg after media download finishes. The following specifiers are supported:

  %f  Path to the downloaded media file

All occurences of the specifier will be replaced.

clive uses quvi(1) to parse the media details. Use the "--quvi" to specify the path. See also "FILES".

clive uses a 3rd party command to download the media. Use the "--get-with" to specify the path to such command. See also "FILES".

Any number of reasons. Some have been tracked back to unacceptable user-agent string value and mangled HTTP headers (e.g. a green-eyed HTTP proxy). See also "KNOWN ISSUES".

Some websites are known to refuse to work with the HTTP requests to resume a file transfer.

Workaround

None known. You will have to remove the existing file before you try again.

Some websites refuse to play nice with renegade user-agent strings.

Recommendations

Make sure both quvi(1) and curl(1) use the same user-agent string. Note that quvi(1) uses "Mozilla/5.0" by default. See also "TROUBLESHOOTING" for "HTTP/500".

Generally OK, although some proxies may have been configured to "cook up" the HTTP headers before they are sent back to the server. This may sometimes lead to issues with the servers.

Recommendations

If you use an HTTP proxy, make sure you have configured all of the commands that clive uses (e.g. quvi(1), curl(1), etc.) to use the same proxy.

If you are planning to use clive for anything more peculiar, consider the following example:

  * You feed clive two URLs
  * The 1st one fails, quvi exits with a non-zero value
  * clive proceeds to the 2nd URL, quvi now exits with zero value
  * clive exits with the zero, even if the 1st URL failed

Workaround

Feed one URL at a time.

  * ~/.config/clive/config
  * ~/.clive/config
  * ~/.cliverc

  * /usr/local/share/clive/config
  * /etc/xdg/clive/clive.conf
  * /usr/share/clive/config
  * /etc/xdg/clive.conf
  * /etc/clive/config

You can also set CLIVE_CONFIG, e.g.:

  env CLIVE_CONFIG=/path/to/config/file clive

Or use "--config-file", e.g.:

  clive --config-file /path/to/config/file

A typical configuration file could look like:

  --get-with "/usr/bin/curl -L -C - -o %f %u --user-agent Mozilla/5.0"
  --quvi "/usr/bin/quvi --category-http %u"
  --filename-format "%t_%i.%s"
  --exec "/usr/bin/vlc %f"

Put the URLs inside quotes when they are specified as the command line arguments to the program. This is the recommended practice.

Typical use.

Download the best available format of the media.

Query available formats to the URL. Use one of the returned format strings from this list with "--format".

Do not download the media, print the details only.

clive exits with 0 on success, otherwise the code is >0. For example, if command line parsing fails, the exit status is 1.

When an error occurs in another command invoked by clive, e.g. quvi(1), clive then exits with the exit status returned by that command.

See also "KNOWN ISSUES" for "Exit status".

quvi(1) curl(1)

 Home  : http://clive.sourceforge.net/
 gitweb: http://repo.or.cz/w/clive.git

clive is free software, licensed under the GPLv3+.

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.

2012-03-16 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.