Skip to content

skerit/cvlc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cvlc

Cvlc can be used to control VLC command-line instances

Install

$ npm install cvlc

Todo

Examples

Playing a file

var Cvlc   = require('cvlc'),
    player = new Cvlc(),
    fs     = require('fs');

player.play('/path/to/file', function startedLocalFile() {
	// The file has started playing
});

Playing a stream

// Create a read stream
var stream = fs.createReadStream('/path/to/file');

player.play(stream, function startedStream() {
	// The stream has started playing
});

Executing VLC commands

player.cmd('rate 2', function gotResponse(err, response) {
	// Sound should be playing at twice the speed
});

See more commands

You can get a list of all the commands by executing this command:

player.cmd('longhelp', function gotCommands(err, response) {
	console.log('Available commands: ' + response);
});

Destroying VLC process

When you no longer need the player, you need to manually destroy it. Otherwise it will stay in memory, and the cvlc process will stay active.

player.destroy();

About

Create and control VLC through node.js

Resources

License

Stars

Watchers

Forks

Packages