git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats

MOC (music-on-console) easy startup on Fedora

It's simple!

Since at least the Fedora build is broken (if not MOC as such), here's the steps you manually need to do to run MOC:

  1. Installation:
    sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm &&\
    sudo dnf install moc timidity++

  2. manpage says ~/.moc/config is a default directory and config. It is not being auto-created on first run (boo! why not???), so here we go:
    mkdir ~/.moc&&cp /usr/share/doc/moc/config.example ~/.moc/config

  3. Since MOC per default cries about timidity stuff, let's give it a timidity default temp even though most of you never will use the MID output:
    echo 'default /tmp/timidity.tmp' > ~/.moc/timidity.cfg
    Not my idea, this comes from a 2016(!) thread on the openSUSE forums

  4. manpage says ~/.moc/config is a default directory and config. I'm repeating myself, but you will notice that if you just type mocp now it still won't start. You have to go to ~/.mocp and then it works.
    cd ~/.moc ; mocp
    Remember, kids, to cd into default directories! :-)

Installation of abcde on Fedora

First of all: a plain installation of abcde will deliver a working abcde, simple as that. In detail this means the following paradigms:

  1. abcde will support free and modern audio coding in the shape of OGG/Vorbis. Many inferior audio software like car radios (the most bitter form of software development) still rely on MP3 (at least they support that). Means:
    To be able to encode as MP3, you have to do additional steps.
    The sample config will encode to MP3, so continue reading.

  2. Musicbrainz is the goto-solution if you want amazing QoS and a huge database. However, the default dependencies of the Fedora package will not be able to support musicbrainz, yu need to manually install additional libraries.

Package installation

If you only want to use abcde for OGG/Vorbis with CDDB's inferior database, proceed with step 1 and quit reading :-)

I tested this with a Czech Medieval Folk CD, Stultus Lupus by Bohemian Bards. CDDB contained a typo - not in the Czech titles, but with the first Latin one. Musicbrainz has no errors. However, the audio footprints had not been published yet (I will do this now), in that case you may want to run picard on the finished encoded files: QoS is something you only find on musicbrainz and Discogs, CDDB hasn't been satisfying for over a decade. If you get you data from CDDB, be very careful.

  1. Install the software core:
    sudo dnf install abcde

  2. Install MP3 support:
    **sudo dnf install lame python3-eyed3 mp3gain

  3. Install support for retrieval of lyrics, covers, etc.:
    sudo dnf install glyr

  4. Install support for musicbrainz:
    libdiscid already exists if you have picard installed, an amazing tool to tag already existing audio files.
    sudo dnf install perl-WebService-MusicBrainz perl-MusicBrainz-DiscID libdiscid

  5. Make abcde-musicbrainz-tool available:
    Sounds funny, is funny. Do a test run of abcde, if it complains about lack of that command, continue.
    It's already available as non-executable script at /usr/share/doc/abcde/abcde-musicbrainz-tool, but ofc abcde will fail not having in in any PATH. (I will probably file a bug report for that.)
    For now, we do this manually:
    sudo cp /usr/share/doc/abcde/abcde-musicbrainz-tool /usr/local/bin &&\
    sudo chmod a+x /usr/local/bin/abcde-musicbrainz-tool &&\
    restorecon -Fv /usr/local/bin/abcde-musicbrainz-tool
    (With a symlink, we would not get the right SELinux context automatically, hence the file copy. If it ever stops working after updates, repeat this. If it never does, somebody will have fixed that already :-) )

  6. Sample musicbrainz config (i.e. take mine as an example):
    abcde is not a moron, it takes default configs from the system and then your directory. So you will want to create ~/.abcde.conf with just your personal setting, leaving any default as described in /etc/abcde.conf. In this repository, navigate to the tree and look at .abcde.conf.
    Done.

Example HTTP-to-HTTPS redir for Apache

<VirtualHost *:80>
    Servername oaschlurch.example.com
    ServerAlias gschistigschasti.vonderleyenmussw.eg
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
<VirtualHost *:443>
    # caveat emptor, leno
</VirtualHost>