Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert: In auto mode, option to keep originals instead of converted files #1840

Closed
carpenike opened this issue Jan 28, 2016 · 11 comments · Fixed by #4302
Closed

convert: In auto mode, option to keep originals instead of converted files #1840

carpenike opened this issue Jan 28, 2016 · 11 comments · Fixed by #4302
Labels
feature features we would like to implement

Comments

@carpenike
Copy link

Hey All,

I'm looking to use beets to manage my lossless library, but I have devices in the house that do not support high bit-rate formats (Sonos devices). So I'm looking to use Beets to import music into it's database and at the same time create a copy of the Lossless files, convert them into lossy/.mp3 and store in a different location.

Couple questions:

  1. Can this all be done with one Beets instance / database or should I use one for the lossy and one for the lossless?
  2. How would this be configured? I'm using the below configuration and it only keeps the MP3 version and ignores the FLACs.
plugins: fetchart embedart convert scrub replaygain lastgenre chroma web
directory: /music
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no

convert:
    auto: yes
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    max_bitrate: 320
    threads: 5
    copy_album_art: yes
    dest: /music/lossy

paths:
    default: $albumartist/$album%aunique{}/$track - $title
    singleton: Non-Album/$artist - $title
    comp: Compilations/$album%aunique{}/$track - $title
    albumtype_soundtrack: Soundtracks/$album/$track $title

import:
    write: yes
    copy: yes
    move: no
    resume: ask
    incremental: yes
    quiet_fallback: skip
    timid: no
    log: /config/beet.log

lastgenre:
    auto: yes
    source: album

embedart:
    auto: yes

fetchart:
    auto: yes

replaygain:
    auto: no

scrub:
    auto: yes

replace:
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    '\.$': _
    '\s+$': ''

web:
    host: 0.0.0.0
    port: 8337
@nathdwek
Copy link
Member

With this setup, beets will convert files before adding them to the library, as described in the documentation:

  • auto: Import transcoded versions of your files automatically during imports. With this option enabled, the importer will transcode all (in the default configuration) non-MP3 files over the maximum bitrate before adding them to your library. Default: no.

I don't know of any way to automate the conversion process using the plugins readily available with beets. Maybe in the near future with a combination of convert and hook (see #1603 ).

However, if you're feeling bleeding edge or want to experiment a bit, you can always try the beets-alternatives plugin. Note however that it hasn't been updated since may 2015 and that support might be a bit lacking.

Maybe you could take a look at #1620 #1110 (In #1620 I reference a feature request that was very similar to yours, but I can't find it anymore 😞).

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Jan 28, 2016
@sampsyo
Copy link
Member

sampsyo commented Jan 28, 2016

The usual way, FWIW, is not to have a beets library for your lossy files. Just keep the lossless originals in your beets library, and periodically beet convert to export things for your device.

@nathdwek has a great point, though: maybe the auto function should have a simpler mode where it keeps the old files, not the transcodes, in the library.

@carpenike
Copy link
Author

@sampsyo @nathdwek that'd actually be perfect. Wouldn't mind having the lossy in sort of an 'out of band' mode. Primarily interested in maintaining the higher quality sources. Would need the option to copy without transcoding in the event that the new import was already an MP3 at 320k. Ideally the originals would have their tags adjusted first, then new ones transcoded with the tags copied over.

@sampsyo
Copy link
Member

sampsyo commented Jan 28, 2016

Good call; turning this into a feature request.

Fortunately, the plugin already has bitrate filters, so keeping 320kbps MP3s shouldn't be a problem.

@sampsyo sampsyo added feature features we would like to implement and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels Jan 28, 2016
@sampsyo sampsyo changed the title Convert AND copy Lossless to Lossy convert: In auto mode, option to keep originals instead of converted files Jan 28, 2016
@carpenike
Copy link
Author

Also, if there could be a way to keep tabs on what has been converted in the past within the database, with maybe a reference link to where it was saved to, that could be helpful for libraries with some transcoded / exported and some not.

@nathdwek
Copy link
Member

Yeah that's basically what beets-alternative does. Seems like a few people would have been interested by it lately. However, it would still require some effort to bring it in and resume support.

I don't know however if it would be a good call to try and provide these features from scratch however, given that a working solution is right there.

@sampsyo
Copy link
Member

sampsyo commented Jan 28, 2016

Just as an example, something like a "converted version" flexible attribute wouldn't be hard to add to the convert plugin. I'm not sure about the rest of the alternatives features.

@mannp
Copy link

mannp commented Apr 12, 2017

Just searching for exactly this to export / convert my flac to mp3 for my car mp3 player and wondered how it was going? :)

@sampsyo
Copy link
Member

sampsyo commented Apr 12, 2017

In general, there's never really anything to report except what you see on GitHub. So, in summary, we could use some help with addressing this if you have time!

@mannp
Copy link

mannp commented Apr 12, 2017

Unless you'll take some pascal code I'll not be much help, but its always surprising how sensitive coders are to timescales. I wasn't meaning to hurry anyone along, just thought I may have missed an update or an alternate way of getting an mp3 copy of my source flac files. I'll keep searching for an alternate way. All the best.

@sampsyo
Copy link
Member

sampsyo commented Apr 12, 2017

Sorry; I didn't mean to sound offended! Just trying to give some context: work in this project generally doesn't get done until someone comes up with the extra time to claim a ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants