|
NAMEclive - (c)ommand (li)ne (v)ideo (e)xtraction toolSYNOPSISclive [<options>] [<url> | <file> ...]DESCRIPTIONclive is a command line media extraction tool for YouTube and similar websites that require flash.Backgroundclive originates from a simple shell script that was cooked up to work around the YouTube's flash requirement back in 2006.Getting startedConfiguringAutodetection 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". OPTIONSclive expects the URLs to be separated by a newline character when the they are read from either stdin or files.--helpPrint help and exit.--versionPrint version and exit.--licensePrint license and exit.-q, --quietTurn off all clive output excluding errors. Note that this switch has no effect on any of the third party commands that clive invokes.-F, --query-formatsQuery 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". -f, --format arg (=default)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". -O, --output-file argWrite media to arg. Overrides "--filename-format".-n, --no-downloadDo not download the media, print details only.--config-file argPath to a file to read clive arguments from. See also "FILES".OPTIONS - CONFIGURATIONThe "configuration" options may be read from the config file. See "FILES".--quvi argarg 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. --get-with argPath 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. --filename-format arg (="%t.%s")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. --regexp arg (="/(\w|\s)/g")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").--exec argInvoke 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. TROUBLESHOOTINGerror: specify path to quvi(1) command with --quviclive uses quvi(1) to parse the media details. Use the "--quvi" to specify the path. See also "FILES".error: specify path to a download command with --get-withclive uses a 3rd party command to download the media. Use the "--get-with" to specify the path to such command. See also "FILES".HTTP/1.0 500 Internal Server ErrorAny 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".KNOWN ISSUESResuming partially transferred files may failSome 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. HTTP user-agentSome 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". HTTP proxyGenerally 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. Exit statusIf 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. FILESLocal user* ~/.config/clive/config * ~/.clive/config * ~/.cliverc System wide* /usr/local/share/clive/config * /etc/xdg/clive/clive.conf * /usr/share/clive/config * /etc/xdg/clive.conf * /etc/clive/config CLIVE_CONFIGYou can also set CLIVE_CONFIG, e.g.:env CLIVE_CONFIG=/path/to/config/file clive --config-fileOr use "--config-file", e.g.:clive --config-file /path/to/config/file Example configA 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" EXAMPLESNotePut the URLs inside quotes when they are specified as the command line arguments to the program. This is the recommended practice.clive "URL"Typical use.clive -f best "URL"Download the best available format of the media.clive -F "URL"Query available formats to the URL. Use one of the returned format strings from this list with "--format".clive -n "URL"Do not download the media, print the details only.EXIT STATUSclive 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". SEE ALSOquvi(1) curl(1)WWWHome : http://clive.sourceforge.net/ gitweb: http://repo.or.cz/w/clive.git LICENSEclive is free software, licensed under the GPLv3+.AUTHORToni 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.
Visit the GSP FreeBSD Man Page Interface. |