convert: Multiple allowed output formats
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
# Usecase
I have a single "master" library, which is a bit heterogeneous: most of media is lossless, but a substantial part of it is in _different_ lossy formats. Next, I have two mobile devices with different sets of supported media codecs and different available space.
# Current workflow
The music upload workflow is hence following:
- determine what needs to be uploaded
- determine the source file format(s)
- check if each of these is supported
- issue multiple convert commands for the same source and destination with different source type filters and different output formats
# Wanted workflow
I would like to be able to specify a set of conversion rules in some way and let `beets` apply them in order over the same source and destination in one run. For example, here's how the rules would look for an iPhone:
1. lossless ⇒ aac_256
2. lossy(mp3, aac) ⇒ copy
3. lossy(bitrate > 128kbps) ⇒ aac_128 _(this is unfortunate, but well, having poor-quality music is still better than not having it)_
4. others ⇒ fail _(or aac_he_64)_
Another way around, one could specify the supported file format list (e. g. aac, mp3) and a behavior mode ("prefer lossless" / "prefer lossy") and have `beets convert` figure out the codec and the bitrate for each file.
# Multiple profiles
On top of this, it would be very nice to have a notion of a "conversion profile" (== rule set) to be able to say `beets convert --profile iphone` or `beets convert --profile laptop` or so on.
Contributor guide
Research direction
Start at the `beets convert` command entry point and review how conversion inputs, source type filters, and output formats are currently specified. Done would require an agreed design and implementation for ordered conversion rules, including reusable profiles such as `iphone` and `laptop`, with behavior for unsupported files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100