やってみる

アウトプットすべく己を導くためのブログ。その試行錯誤すらたれ流す。

RaspbianにてabcdeでCDをリッピングする

 wav形式に。

対象環境

必要なもの

  • CD-ROMドライブ
    • LDR-PUE8U3LBK
  • CD-ROM

所要時間

  • 10分/CD1枚

準備

  1. ラズパイを起動する
  2. ラズパイにCDドライブをUSB接続する
  3. CDドライブにCDをセットする

方法

  1. abcdeをインストールする
  2. インストール確認する
  3. abcdeコマンドを打つ
sudo apt install abcde -y
cd 保存したいパス
abcde -o wav

手順

1. abcdeをインストールする

$ sudo apt install abcde
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています                
状態情報を読み取っています... 完了
以下の追加パッケージがインストールされます:
  bsd-mailx cd-discid cdparanoia exim4-base exim4-config exim4-daemon-light ghostscript glyrc gsfonts imagemagick imagemagick-6-common imagemagick-6.q16 libao-common libao4 libauthen-sasl-perl libclass-accessor-perl libdiscid0
  libencode-locale-perl libfile-listing-perl libfont-afm-perl libglyr1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libjxr-tools libjxr0 liblockfile-bin liblockfile1 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmagickcore-6.q16-3
  libmagickcore-6.q16-3-extra libmagickwand-6.q16-3 libmailtools-perl libmusicbrainz-discid-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetpbm10 libsub-name-perl libtimedate-perl liburi-perl
  libwebservice-musicbrainz-perl libwmf0.2-7 libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl netpbm perl-openssl-defaults
  vorbis-tools
提案パッケージ:
  eject distmp3 id3 id3v2 eyed3 normalize-audio vorbisgain mkcue mp3gain atomicparsley eximon4 exim4-doc-html | exim4-doc-info spf-tools-perl swaks ghostscript-x imagemagick-doc autotrace cups-bsd | lpr | lprng enscript ffmpeg gimp
  gnuplot grads graphviz hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin transfig ufraw-batch libdigest-hmac-perl libgssapi-perl libdata-dump-perl libcrypt-ssleay-perl inkscape libauthen-ntlm-perl
以下のパッケージが新たにインストールされます:
  abcde bsd-mailx cd-discid cdparanoia exim4-base exim4-config exim4-daemon-light ghostscript glyrc gsfonts imagemagick imagemagick-6-common imagemagick-6.q16 libao-common libao4 libauthen-sasl-perl libclass-accessor-perl libdiscid0
  libencode-locale-perl libfile-listing-perl libfont-afm-perl libglyr1 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libjxr-tools libjxr0 liblockfile-bin liblockfile1 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmagickcore-6.q16-3
  libmagickcore-6.q16-3-extra libmagickwand-6.q16-3 libmailtools-perl libmusicbrainz-discid-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetpbm10 libsub-name-perl libtimedate-perl liburi-perl
  libwebservice-musicbrainz-perl libwmf0.2-7 libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl netpbm perl-openssl-defaults
  vorbis-tools
アップグレード: 0 個、新規インストール: 66 個、削除: 0 個、保留: 0 個。
12.5 MB のアーカイブを取得する必要があります。
この操作後に追加で 31.3 MB のディスク容量が消費されます。
続行しますか? [Y/n] 

 yを入力しEnterキー押下すると進む。

2. インストール確認する

バージョン

$ abcde -v
This is abcde v2.8.1.
Usage: abcde [options] [tracks]
abcde -h for extra help

ヘルプ

$ abcde -h
This is abcde v2.8.1.
Usage: abcde [options] [tracks]
Options:
-1     Encode the whole CD in a single file
-a <action1[,action2]...>
       Actions to perform:
       cddb,read,getalbumart,normalize,encode,tag,move,replaygain,playlist,clean
-b     Enable batch normalization
-c <file>
       Specify a configuration file (overrides system and user config files)
-C <discid#>
       Specify discid to resume from (only needed if you no longer have the cd)
-d <device>
       Specify CDROM device to grab (flac uses a single-track flac file)
-D     Debugging mode (equivalent to sh -x abcde)
-e     Erase encoded track information from status file
-f     Force operations that otherwise are considered harmful. Read "man abcde"
-g     Use "lame --nogap" for MP3 encoding. Disables low disk and pipes flags
-G     Get album art by using the 'getalbumart' action
-h     This help information
-j <#> Number of encoder processes to run at once (localhost)
-k     Keep the wav tracks for later use
-l     Use low disk space algorithm
-L     Use local CDDB storage directory
-m     Modify playlist to include CRLF endings, to comply with some players
-n     No lookup. Don't query CDDB, just create and use template
-N     Noninteractive. Never prompt for anything
-o <type1[,type2]...>
       Output file type(s) (vorbis,mp3,flac,spx,mpc,wav,m4a,opus,mka,wv,ape,mp2,tta). Defaults to vorbis
-p     Pad track numbers with 0's (if less than 10 tracks)
-P     Use UNIX pipes to read+encode without wav files
-r <host1[,host2]...>
       Also encode on these remote hosts
-s <field>
       Show fields from the CDDB info (year,genre)
-S <#> Set the CD speed
-t <#> Start the track numbering at a given number
-T <#> Same as -t but modifies tag numbering
-U     Do NOT use UNICODE (UTF8) tags and comments
-v     Show version number and exit
-V     Be a bit more verbose about what is happening behind the scenes
-x     Eject CD after all tracks are read
-w <comment>
       Add a comment to the CD tracks
-W <#> Concatenate CDs: -T #01 -w "CD #"
-z     Use debug CDROMREADERSYNTAX option (needs cdparanoia)

Tracks is a space-delimited list of tracks to grab.
Ranges specified with hyphens are allowed (i.e., 1-5).

設定ファイル

  • /etc/abcde.conf

 任意で好きにいじる。今回はデフォルトのまま。

3. abcdeコマンドを打つ

 wav形式で保存する。

$ cd 保存したいパス
$ abcde -o wav

https://unix.stackexchange.com/questions/230913/abcde-ripping-to-wav

 曲名の一覧が出る。そして以下のように2つ質問されるのでどちらもnを入力してENTERキー押下する。

$ abcde -o wav
...
Edit selected CDDB data [y/N]? n
Is the CD multi-artist [y/N]? n

 CD1枚23曲で10分ほどかかった。

結果

  • ファイル名に01_のような順序がつけられた
  • ファイル名に曲名がついた
  • それ以外の情報が一切ない(アーティスト名、ジャケット画像など)

 後述するが一緒にeyeD3もインストールしないとタグ情報が曲名くらいしかつかない。以下のようにeyeD3も含めてやるのがオススメ。(私は最後に気づいて残念なことになった)