Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
docs: Add undocumented getYtdlBinary & setYtdlBinary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AssetKid committed Aug 28, 2019
1 parent 7a74203 commit 3e91ebf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,25 @@ Found 521 extractors
3sat
```

### Getting the binary path

``` js
var youtubedl = require('youtube-dl');

console.log(youtubedl.getYtdlBinary());
```

### Changing the binary path

```js
var path = require('path');
var ytdl = require('youtube-dl');

var customBinaryPath = path.resolve('custom/path/to-binary');

ytdl.setYtdlBinary(customBinaryPath);
```

### Call the `youtube-dl` binary directly

This module doesn't have `youtube-dl` download the video. Instead, it uses the `url` key from the `--dump-json` CLI option to create a node stream. That way, it can be used like any other node stream.
Expand Down

0 comments on commit 3e91ebf

Please sign in to comment.