Skip to main content

Download audio from youtube-dl soures and import into beets

Project description

![Travis CI](

# beets ydl

Download audio from youtube-dl sources and import into beets

$ beet ydl ""

$ beet ls short music for short people

59 Times the Pain - Short Music for Short People - We Want the Kids
7 Seconds - Short Music for Short People - F.O.F.O.D.
88 Fingers Louie - Short Music for Short People - All My Friends Are in Popular Bands
Adrenalin O.D. - Short Music for Short People - Your Kung Fu Is Old... And Now You Must Die!
Aerobitch - Short Music for Short People - Steamroller Blues

## Installation

pip install beets-ydl

And enable `ydl` plugin on your `config.yaml` file.

## Configuration

Available options on `config.yaml`:

- `download`: will download files from sources after getting information,
defaults to `True`

- `split_files`: will try to split album files into separate tracks, defaults
to `True`

- `import`: will import files on youtube-dl after downloading and splitting,
defaults to `True`

- `urls`: a list of default urls to download when no arguments are provided, you
can provide a playlist to get checked every time

- `youtubedl_options` is a dictionary of
[a lot of youtube-dl options available](


plugins: ydl

split_files: true
- url1
- url2
- url3
key': 'SomeOtherExtractor',
preferredcodec: 'ogg'
## Tips

### Use a `.netrc` file

Security discussions apart, you can create a `~/.netrc` with credentials for
youtube-dl to read.

machine youtube login password somepassword

Check [this entry]( on youtube-dl docs for more

Like this, you can download private playlists or your subscriptions:

beet ydl ""

### Download and import later

To download and split files without importing into beets:

beet ydl "<source>" --keep-files --no-import

And later, to import:

beet ydl "<source>" --no-download --no-split-files

Like this, you can download a big playlist and then run the beets import
routine, which requires manual intervention.

### (possibly) enhance audio quality

beets-ydl uses a proposed [192kbps extractor 'bestaudio'](
format because it is more likely that it will find separate audio files on
sources. Some high quality videos might have better audio quality embedded, so
it can also make sense to set a higher quality extractor:

format: 'best',
key: 'FFmpegExtractAudio'
preferredcodec: 'mp3'
preferredquality: '320'
nopostoverwrites: True

This can, however, end-up with unnecessarily big files that have 320kbps as a
merely nominal quality. See [this discussion](

## Development

Execute the env script to get into a virtualenv.

. ./env.develop

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for beets-ydl, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size beets_ydl-0.0.4-py3-none-any.whl (8.8 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size beets-ydl-0.0.4.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page