Mediaripper - Automatically Rip Audio CDs to MP3s

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 02:13, 11 December 2006 by Davy gravy (Talk | contribs)

Jump to: navigation, search
Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.

Contents

Credit and Origin of this Idea

Mediaripper is the creation of B. Waite, a member of the Kurobox Forum. [1] [2] It was an entry in a contest at that site. If you ever have a chance, tip your hat to him for his contribution to all LS and Kurobox users. It is an excellent concept and works well.

What does it do?

Mediaripper does several things automatically:

  • insert an Audio CD into an attached USB/IDE CDROM drive/burner and it will rip the individual tracks to MP3 format, storing them where you configure it to, then auto-ejects the CD,
  • insert a USB mass storage device and it will search for image files (jpeg, png, etc.) and it will store those files to your chosen destination, and
  • insert a USB mass storage device and it will search for video files (xdiv, mpg, wmf, etc.) and it will store those files, also.

There is a DVD-ripping option that may be implemented in the future, but it is not yet functional.

Requirements

  • LS1 or HG (not yet tested on the LS2)
  • Debian/FreeLink and a 2.6 Kernel
  • USB/IDE CDROM drive or burner (for MP3 ripping)
  • other USB mass storage devices (for image or video gathering)

Installation

Mediaripper Binaries

From the Kurobox site, download the Mediaripper Package and install it:

wget http://www.kurobox.com/bwaite/mediaripper.tgz
tar xzvf mediaripper.tgz
update-rc.d mediaripper defaults 

This downloads the package, unarchives it, and sets up the symlinks for the startup script. What is included in this tarred package? Here are the contents, with a description of each group:

#  Three executable scripts and a configuration file that form the backbone of the application
usr/local/bin/cdripper.sh
usr/local/bin/ripper.conf
usr/local/bin/ripperd.sh
usr/local/bin/usbripper.sh
#  A Webmin module 
usr/share/webmin/mediaripper/
usr/share/webmin/mediaripper/images/
usr/share/webmin/mediaripper/images/linear.ia.gif
usr/share/webmin/mediaripper/images/4.ia.gif
usr/share/webmin/mediaripper/images/5.ia.gif
usr/share/webmin/mediaripper/images/0.gif
usr/share/webmin/mediaripper/images/1.gif
usr/share/webmin/mediaripper/images/0.ia.gif
usr/share/webmin/mediaripper/images/4.gif
usr/share/webmin/mediaripper/images/5.gif
usr/share/webmin/mediaripper/images/smallicon.gif
usr/share/webmin/mediaripper/images/icon.gif
usr/share/webmin/mediaripper/images/1.ia.gif
usr/share/webmin/mediaripper/images/disk.gif
usr/share/webmin/mediaripper/images/linear.gif
usr/share/webmin/mediaripper/module.info
usr/share/webmin/mediaripper/lang/
usr/share/webmin/mediaripper/lang/en
usr/share/webmin/mediaripper/index.cgi
usr/share/webmin/mediaripper/update_conf.cgi
# A startup script for Mediaripper  
etc/init.d/mediaripper

Debian Packages

Install (from Debian stable):

apt-get install udev usbmount eject cdparanoia cddb libcddb2 cd-discid id3v2 lame toolame 

Many of these packages are automatically installed if you have run the FreeLinkomatix script.

Install (from Debian testing)

apt-get install abcde

This package (abcde - A Better CD Encoder) is responsible for coordinating the access of the audio CDs, queries to the CDDB database, ripping .wav files from the CDs, and encoding those files to .mp3 format. Read the man pages for more information on the abcde package and its back-end requirements.

Add Directories for MP3s, Images and Videos

After you have installed both the Mediaripper binaries and satisfied all dependencies, you now have to set up directories for processing and storage of the MP3s, images and videos. A great place to put these is in your data partition, which is probably in hda3 (instructions below assume this - adjust to your own setup as necessary). It is also good to place these in your Samba share, as it will make it easier to work with them from a Samba, NFS or AppleShare interface (we will assume this is in /mnt/share).

cd /mnt/share
mkdir rippedmp3s
chmod 777 rippedmp3s
mkdir images
chmod 777 images
mkdir videos
chmod 777 videos

The above commands (mkdir) create the directories and (chmod) make sure the will have unfettered access by any Samba user that attaches to your share(s). If privileges or security are a concern for you in this area, then you can adjust this to your situation.

Take note of the location of these directories, as you will have to specify them to the configuration file for Mediaripper.

Configuration

Manually

For Mediaripper to function, it needs to know where to do its processing and store the finished MP3 & M3U playlists, images and videos. This information is specified in

/usr/local/bin/ripper.conf

and peeking at its structure, one can see there are obvious variables that one can supply values to, such as:

INTERVAL=60                                #how often ripper checks for Audio CD (music), USB Mass Storage (images or video)
IMGDIR="/mnt/share/images"                 #set this to the location where you want to store your images
VIDDIR="/mnt/share/videos"                 #same for videos
MUSICDIR="/mnt/share/rippedmp3s"           #same for MP3s
IMGTYPES="jpg bmp gif"                     #extensions for images
VIDTYPES="xvid mpg wmf"                    #extensions for video files
MUSICTYPES="ogg mp3 wav flac"              #extensions for music

Use nano or your favorite editor to make this file reflect where you want each kind of files to be kept. These locations must agree with the three directories that you set in in the installation phase above.

via Webmin

To be done...

Troubleshooting and Behavior

If Mediaripper is working properly, you really should be able to just pop an audio cd in the usb cdburner, close the tray, wait for a few seconds (up to 60 seconds) for ripperd.sh to sense that there is work to be done (tunes to be ripped), and the drive should whir into action. For me, it seems like it is ripping between 1.5x to 3x, roughly. When it is done, it the tray will eject/open automatically.

For me to get it to work, I had to either create symlinks for or copy cdripper.sh, usbripper.sh and ripperd.sh to /usr/bin. Although I tinkered with it for quite a while, I just could not get it to work (automatically) without this step.

Check dmesg and /var/log/ripper for pertinent log or error messages, if you have problems. You can also try running cdripper.sh from the command line to get a feel for what it is doing.

References

  1. B. Waite's original Kurobox contest page
  2. Linkstationwiki Forum Discussion Thread "Mediaripper and Audio CD Stuff"
Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.