Home / Community / Blog

To enable acoustic fingerprinting in beets You have to install python acoustid library. My NAS uses Debian, so:

apt-get install python-acoustid

Now You can enable Chromaprint plugin (using beet config -e or directly editing ~/.config/beets/config.yaml file):

plugins: duplicates chroma

as you can see I have also enabled duplicate plugin.

Now if You run

beet fingerprint

You will get a lot of:

fingerprinting
fingerprint generation failed: audio could not be decoded

so I also installed:

apt-get install python-gi
apt-get install gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
apt-get install ffmpeg libchromaprint-tools \
python-chromaprint libchromaprint0 gstreamer0.10-chromaprint \
libchromaprint-dev

but it doesn't work.

On the other hand fpcalc works.

I've installed the newest version:

wget "https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-fpcalc-1.4.1-linux-x86_64.tar.gz"
tar -xzf chromaprint-fpcalc-1.4.1-linux-x86_64.tar.gz
mv chromaprint-fpcalc-1.4.1-linux-x86_64 /usr/local/bin/
cd /usr/local/bin/
ln -s chromaprint-fpcalc-1.4.1-linux-x86_64/fpcalc

but still I've got the same error:

root@MyNAS:/tmp# beet import -W piosenka.mp3
fingerprinting of '/tmp/piosenka.mp3' failed: audio could not be decoded

/tmp/piosenka.mp3 (1 items)
No matching release found for 1 tracks.
For help, see: http://beets.readthedocs.org/en/latest/faq.html#nomatch
[U]se as-is, as Tracks, Group albums, Skip, Enter search, enter Id, aBort?

Nowadays if you want to clean up your MP3 collection instead of writing your own scripts You should better read about MusicBrainz/Picard, beets (witch Duplicates plugin) - they both (and VLC too!) use AcoustID.

You can also try, quite old, Echoprint/Server for the Echoprint.

When You use MS Windows, the best way to convert audio CD to MP3 (such program is also called grabber or ripper) is to use CDex - Open Source Digital Audio CD Extractor.

It's simple, uses GPL license and automatically fills MP3 Tags using CDDB (freedb.org) and/or local database. It also have portable edition (today only 1.77).

In some cases you would like to have one IP for computer no matter how it's connected - using Ethernet or WiFi.

My reason was BackupPC - it uses names to distinguish hosts. Unfortunately Web interface in my router only allows 1-to-1 association between MAC, IP and host name (using /etc/ethers and /etc/hosts files), so I have two positions:

Hostname MAC IP
mylaptop 00:00:00:23:B2:25 192.168.1.10
mylaptop-lan 00:00:00:80:B2:0A 192.168.1.11

To bypass this restriction I have to do it manually.

First of all I had to remove both MAC form web interface so they don't disturb my own configuration (You can check if the IP is gone in /etc/ethers or /etc/hosts file).

I've decided to create separate file for my changes so I've created empty /etc/dnsmasq-jaqb.conf and added at the end of /etc/dnsmasq.conf:

conf-file=/etc/dnsmasq-jaqb.conf

(to be honest I've this file for my previous changes ;-)

Then I've added name-to-ip association to /etc/dnsmasq-jaqb.conf

dhcp-host=mylaptop,192.168.1.10,24h
cname=mylaptop-lan,mylaptop

Now, after restart dnsmasq of course, my computer always get the same IP.

The last line is not necessary - it is to help some of my scripts to work because they assume there is host named mylaptop-lan.

If you have to rename host in BackupPC you have to:

  1. Stop BackupPC service:
    systemctl stop backuppc
    
  2. Change the host name in host file (/etc/backuppc/hosts) to new name
  3. Rename the pl file in pc folder (/etc/backuppc/pc), ie:
    cd /etc/backuppc/pc
    mv oldname.pl newname.pl
    
  4. Rename directory in the backup location (I my case backup is storing in the location /data/BackupPC)
    cd /data/BackupPC/pc/
    mv oldname newname
    
  5. Start BackupPC service
    systemctl start backuppc
    
  6. Pray
  7. Check if it works

Sometimes you have to run command as user who cannot login (shell set to /bin/false, /usr/sbin/nologin or something like this) in example for testing BackupPC where backuppc user usually cannot login but you have to run ssh command manually for the first time to add host to known_hosts.

Instead of ugly copping known_host file you can run:

sudo -u backuppc /usr/bin/ssh -l username remotehost

I think it's nicer way.

After installation (as you can see it is based on Debian)

apt-get install backuppc

I have to modify attributes:

chmod u+s /usr/share/backuppc/cgi-bin/index.cgi

Because of error:

File::RsyncP module doesn't exist

I had to install manually missing Perl module:

apt-get install libfile-rsyncp-perl

To login without password I've generated keys (as root):

ssh-keygen

and copy id_rsa.pub to .ssh/authorized_keys on host I would like to backup.

Now I can ssh to that host without password (on Windows machine You have to allow Public Key exchange).

It's time to do the same for backuppc user. By default it has bash set to /bin/false so I done it manually:

mkdir -p /home/backuppc/.ssh
cp id_rsa known_hosts /home/backuppc/.ssh
chown -r backuppc /home/backuppc/.ssh

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31