Upload video quickly to Streamable.
npm install -g to-streamable
Usage: to-streamable [options] [path to video file]
If no video path is passed, then stdin is used.
Options:
--help, -h Prints this help message.
--version, -v Prints current version.
--setup Launches a wizard to save Streamable username and password.
--auth Sets the username and password used for uploading.
Must be in a colon pair. `to-streamable --auth=user:pass`
If passed, this is preferred over any saved authentication.
--no-resize Tells Streamable to not resize final video.
--mute Tells Streamable to mute final video.
Returns a new to-streamable
instance. opts
is an object. Valid parameters:
file
- AReadable
stream of the video. (i.e.fs.createReadStream('/path/to/video')
) This is passed torequest
'sformData
option. Required.auth
- An object containing ausername
andpassword
property of your Streamable credentials. Required.params
- An array of parameters to add to the request. Valid options arenoresize
andmute
. See the Streamable API Docs for more info.
Example:
let opts = {
file: fs.createReadStream('/path/to/file'),
auth: {
username: 'foo',
password: 'bar'
},
params: ['mute']
}
Starts the upload of the video. cb
is an optional callback function. Called with parameters err
, containing an Error
, if any, and res
, with the object response from the Streamable API. See the Streamable API Docs for format.
Retrieves the status of the video upload. vid.upload()
must be called beforehand. cb
is an optional callback function. Called with parameters err
, containing an Error
, if any, and res
, with the object response from the Streamable API. See the Streamable API Docs for format.