jack-cli-cd-ripper / jack Goto Github PK
View Code? Open in Web Editor NEWJack command-line CD ripper
License: GNU General Public License v2.0
Jack command-line CD ripper
License: GNU General Public License v2.0
--add-disambiguation is a boolean option. It currently means to append the disambiguation string from MusicBrainz to the album filename only.
Ideally, we would have four types of disambiguation
@zzarne what would you propose for the option names?
We could change --add-disambiguation to require an option argument with some string that encodes all four possibilities.
We could load the boolean value that is currently saved in jack,musicbrainz, and save that into a string.
MusicBrainz may return a number of releases if there is a fuzzy match with the submitted toc.
Jack will then present the user a choice, but this will not be processed, since other code requires a perfect match.
This is because a release may contain multiple media, and the discid is used to match the current medium.
The MusicBrainz tagging code was designed with the goal to achieve the exact same results as MusicBrainz Picard would do.
Picard appears to create separate performer tags, when a performer is both credited as vocal performer, and an instrumental performer. Jack currently tags differently.
This can be seen in this release.
https://musicbrainz.org/release/94bc2804-ff37-32d0-9d01-6c5f63185d2f
Jack creates these vorbiscomment tags:
PERFORMER=John Acock (harmonium, mellotron and piano)
PERFORMER=Phil Collins (guest, membranophone, percussion, vibraphone and additional)
PERFORMER=John Hackett (bell, flute, guest and synthesizer)
PERFORMER=Steve Hackett (acoustic guitar, autoharp, bell, electric guitar, harmonium, mellotron and vocals)
PERFORMER=Robin Miller (cor anglais and oboe)
PERFORMER=Mike Rutherford (12 string guitar, bass guitar, bass pedals and guest)
PERFORMER=Nigel Warren-Green (cello and solo)
Picard would use these tags:
PERFORMER=John Acock (harmonium, mellotron and piano)
PERFORMER=Phil Collins (guest membranophone, percussion and vibraphone)
PERFORMER=John Hackett (guest bell, flute and synthesizer)
PERFORMER=Steve Hackett (acoustic guitar, autoharp, bell, electric guitar, harmonium and mellotron)
PERFORMER=Robin Miller (cor anglais and oboe)
PERFORMER=Mike Rutherford (guest 12 string guitar, bass guitar and bass pedals)
PERFORMER=Nigel Warren-Green (solo cello)
PERFORMER=Phil Collins (additional vocals)
PERFORMER=Steve Hackett (vocals)
Note the special handling of the word "guest".
I want to discuss two issues here:
I think we are ready, but maybe we want to fix #16 first.
I've never done this, but it should be as simple as
git checkout python3-mb
git checkout -b main
git push --set-upstream origin main
and then change the default branch in github Settings->Branches to main.
We then could rename the master branch to e.g. python2 to avoid confusion.
What do you say? Comments welcome.
FreeDB submission has been discarded, for both http and mail while porting to Python 3.
Now that gnudb is here, it should be restored and made to work in Python 3.
Jack (python3-mb) uses dateparser to parse the Last-Modified date string from album art downloads.
Current dateparser is broken and is taking forever to get fixed, even though a solution has been proposed.
See scrapinghub/dateparser#1052
This mostly affects users that install their python libraries using their Linux distro.
dateparser can be replaced with dateutil which appears to be a more popular library.
I currently can't install any change in my local git repo,
sudo python setup.py install
Traceback (most recent call last):
File "/home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack/setup.py", line 28, in <module>
setup(
File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.10/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 459, in __init__
_Distribution.__init__(
File "/usr/lib64/python3.10/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 837, in finalize_options
ep(self)
File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 858, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
_assign_version(dist, config)
File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
_version_missing(config)
File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/pim/os/linux/sound/jack/jack-cli-cd-ripper/jack.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
If no native libdiscid is not installed, jack throws OSError: libdiscid.so.0: cannot open shared object file: No such file or directory
.
Jack should instruct the user to install it, e.g. apt install libdiscid0.
Some streaming applications, such as play:Sub for iOS, need to download m4a files completely before they start playing.
This happens with m4a tracks encoded by jack, but not with tracks purchased from Apple.
This can be solved by adding the "--moov-before-mdat " option to the fdkaac command line.
This will cause the tags and album art to be placed in front of the encoded music data.
It's likely possible to add this option using a custom jack4rc, but this option should be added to the default command line.
Allow submission of ISRC data to MusicBrainz for ISRC data present in the TOC, but not in MusicBrainz
Jack should be able to embed local and remote album art into audio files.
Reformat some text files to Markdown.
Rewrite the root README file.
Both the internal version string, as well as the setup version string should be calculated using git properties.
Old jack.toc files may list data tracks. Using these toc files in libdiscid to query MusicBrainz will not return valid releases.
It should either get its own configuration, or be documented properly
Jack now is on version 4, but still reads a .jack3rc.
We could start using .jack4rc, and fall back to .jack3rc with a warning.
Some artists have released multiple albums with the same name, like
https://musicbrainz.org/artist/8e66ea2b-b57b-47d9-8df0-df4630aeb8e5
Jack should be able to automatically create unique directory name for these releases, possibly using the disambiguity information in the MusicBrainz data.
The python3-mb branch of Jack depends on a C library called libdiscid (https://musicbrainz.org/doc/libdiscid).
There are two competing Python wrappers for this library:
python-discid, using ctypes (no compilation)
python-libdiscid, using cython (compiled)
@pimzand started coding using python-libdiscid, because that was available as a package in the distro he was using (Fedora).
@zzarne added python-discid, because apparently, python-libdiscid cannot be installed using pip.
As a result, both libraries are now supported using a wrapper.
I propose we remove this wrapper and support python-discid directly, as the only supported wrapper.
Because:
The benefits are:
MusicBrainz provides three names for the album artiist. As credited, as in MusicBrainz, and as a sortable name.
Jack currently uses the album artist as credited for tagging purposes, just like MusicBrainz Picard.
Jack currently also uses the name as credited for constructing the path to store files.
This makes less sense, as it will cause lots of differently spelled names for the same artist.
If the spelling just differs in case, it could cause problems with sharing the data to Windows or storing it on case-insensitive filesystems.
The default should be the artist name as in MusicBrainz. Ideally the choice should be user configurable.
It may have become too complex to add helpers using plugins.
The algorithm that determines the genres from MusicBrainz data does not match that of MusicBrainz Picard
If a jack folder contains multiple encoded files, for instance both flac and mp3, jack will rename and tag all files, regardless of the currently selected encoder. Not everybody may want or expect this.
Downloading album art in the original size can take quite a while, and currently ripping is not started until all downloads finish.
Using the concurrent library, these downloads could be performed in parallel, in the background.
The downloads should be waited for after ripping and encoding, when they can be needed for embedding.
The README.md is copied from my fork and should now reflect its new status
If I do a "jack -Q -g *wav" with the python3 version I get:
error unsupported format SndHeaders(filetype='wav', framerate=44100,
nchannels=2, nframes=14427756, sampwidth=16)....
it worked with the python2 version, is there an easy fix?
Getting the error as above when trying to run, even though eyeD3 is in fact installed and can be run.
eyeD3 installed via 'pip install eyed3' command.
Probably have missed something obvious, any help appreciated.
Thanks
Concept draft:
It should be possible to encode to mp3, m4a and ogg from flac files instead of from wav files only.
This could be a two-step process, ie decode to wav first, or a single command line.
I did not understand the encoder progress code when porting to Python 3, and had to disable it.
It should be restored for lame, oggenc and flac, and implemented for fdk-aac.
libdiscid will never return data tracks
In the .travis.yml file, there are many exclusions of PEP8 conformance points: --ignore=E501,W604,W601,E721,E402,E711,E713,E741
Those exclusions have no reason apart from the lack of time when this repository was setup in GitHub.
Since the pep8 tool is at the moment the only safeguard, it would be better to use it to its full extent.
jack does not quit when typing "q", but starts to misbehave
A minimal Continuous Integration should be set up
The CI build could test the code against pep8 and/or PyFlakes
Before commit 4f709db, jack would use the most recently modified cached metadata (ie, jack.freedb or jack.musicbrainz), regardless of the default metadata provider. This behaviour is now broken when musicbrainz is the default metadata provider, yet jack.freedb is the only available cached metadata. Jack now creates an empty jack.musicbrainz which will then be selected because of its newer modification date, leading to failure.
Setting this option can seriously slow down libdiscid queries on some combinations of CD's and drives
At least, there should be a way to disable it.
Whenever a user queries MusicBrainz, jack first reads the old MusicBrainz data and will remember the choice of release.
If the new query again presents multiple releases, jack will automatically pick the choice the user made previously.
There should be a way to force jack to present the user a new choice, without manually deleting the jack.musicbrainz file.
seen when running jack --no-whatever
Reading the TOC of a disc can be very slow, especially when extracting MCN and ISRC, which is done by default.
There are a number of strategies that could improve the speed, preferably without disabling MCN and ISRC extraction.
unknown option `--whatever'
Traceback (most recent call last):
File "/usr/local/bin/jack", line 80, in
help, argv_cf = jack.argv.parse_argv(cf, sys.argv)
File "/usr/local/lib/python3.8/site-packages/jack/argv.py", line 229, in parse_argv
show_usage(cf)
TypeError: show_usage() missing 1 required positional argument: 'longhelp'
Need to port this commit:
bendodson/itunes-artwork-finder@e3c6da0
The latest version from this repository fails to build on
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
/usr/lib/python3/dist-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
[12/08/23 11:58:48] WARNING toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section' pyproject_reading.py:42
Traceback (most recent call last):
File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/./setup.py", line 28, in <module>
setup(
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 147, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 485, in __init__
_Distribution.__init__(
File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 283, in __init__
self.finalize_options()
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 926, in finalize_options
ep(self)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 946, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_integration/setuptools.py", line 101, in version_keyword
_assign_version(dist, config)
File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_integration/setuptools.py", line 56, in _assign_version
_version_missing(config)
File "/home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb/.eggs/setuptools_scm-8.0.4-py3.11.egg/setuptools_scm/_get_version_impl.py", line 112, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /home/amon/Desktop/TASK-JackPython3/20230919-jack-python3/jack-python3-mb.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
When more than two instruments are listed for a performer, like in
https://musicbrainz.org/release/94bc2804-ff37-32d0-9d01-6c5f63185d2f ,
do not concatenate them with "and" only, but start using comma's, like MusicBrainz Picard would do.
Ripping a CD without metadata available raises an exception
Some artist or track titles are extremely long, like this one:
https://musicbrainz.org/recording/dfff2266-2682-47db-abd9-d633fd9cf5e8
jack will not be able to rename this track. There should be a smart way to shorten the path without affecting the tag data.
There's already a quite arbitrary limit of 40 characters for title names, cutting at the first colon, but artist names need to be limited too.
How hard would it be to port this application to python 3?
I am still using this on Fedora, and Fedora 32, released today has deprecated python 2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.