Importing Audio Tracks
From giantdisc
#Getting_Audio_Tracks_into_the_GiantDisc_System
Contents |
Getting Audio Tracks into the GiantDisc System
Basically, there are 4 different ways to get audio tracks along with their associated title, artist, genres, language etc. into the system:
Recording an Audio CD
- Insert a CD into the GiantDisc server. Go to the recording dialog on the Palm and select the menu item Read from CD.... Enter detailed informations about the album and the tracks. Start grabbing and compressing tracks from the CD by selecting the menu item Start recording....
This is the preferred way to make recordings of a new CD.
Reading from the "Inbox"
- Copy mp3 tracks to the directory ~music/inbox. Go to the recording dialog on the Palm and select the menu item Read inbox tracks.... The recording dialog lists all mp3 tracks in the inbox. The list's fields are initialized with id3 tag informations, if available. Check and correct the track informations. Finish the checking-in of mp3 tracks by selecting the menu item Start recording....
This method is useful to import existing mp3 tracks.
The system interprets directories below ~music/inbox/albums as albums. The according menu item is Read inbox albums...
Batch Import from the Command Line
- Start the command ~music/bin/gdimport.pl audiofiles... from the command line. Make sure that all specified audio tracks do have valid metadata tags (id3, vorbiscomment etc.), because they are the only information source for the database records (filenames are not evaluated). We do not really recommend this procedure to import music tracks because
- metadata tags do not always contain proper data and
- the GiantDisc database provides a much more detailed data model than common metadata tags. This is important to efficiently query and retrieve music tracks in the database.
Use this method for a quick import of a large number of tracks including album information.
usage: gdimport.pl [options] audiofiles...
imports the specified audio files into the GiantDisc system.
It reads the associated metadata (id3/vorbis tags) of each file and
creates a track record for each of it. It then copies the audio
file to the systems audio file area (files are renamed).
Currently supported file formats: mp3, ogg vorbis, flac, m4a
(m4a support needs mp4info from the mpeg4ip package)
Instead of a set of audio files a directory can be specified. In
this case, all audio tracks in the directory are imported. This is
particularly useful to import a bunch of albums with the following
command typed in the shell:
find . -type d -print -exec gdimport.pl -a {} \;
Options:
-t Test. Just display what would be done, whithout changing
the database or copying/moving/linking files
It is recommended to test an import session before really doing it
-a Interpret the audio files as tracks of an album. An album record
is created and the tracks are imported as usual.
Note: - The first audio file must have a valid album metadata tag
(i.e. id3 tag) to get the album title.
- only one album can be imported at a time
- default values: rating=-, type=1, source=CD.
-c Same as -a, but interpret the album as a compilation album,
and hence set the album artist to "Various Artists".
(this automatically implies option -a)
-vc For an album or compilation album, set the album composer to
"Various Composers". The default is to collect all composers
and to combine them.
-fc For an album or compilation album, set the album composer to
the composer found in the first track.
-l link to mp3files instead of copying them
-m Move mp3files instead of copying them
-j Interactive mode: ask user for missing meta data.
-i cddbid importdir
Import all jpg images of the directory 'importdir' and associate
them to the album specified by 'cddbid' (include prefix '0x', 'xx'!).
-im importdir
Import all jpg images of the directory 'importdir' and associate
them to albums according to their names (e.g. 0x12345678.jpg) -
note that only one image is expected per album.
Example: supposed you have stored your albums in a directory structure like <artist>/<album-title>/audio-files. If you have clean metadata tags including album information, then all the albums can be imported at once with this command in a shell:
find . -type d -print -exec gdimport.pl -a {} \;
Batch Import from the Command Line (external data)
- If you do have detailed informations about existing mp3 tracks/albums in textfiles or in a database, they can be imported with the command ~music/bin/gdimporttri.pl trifiles... (track info files) and ~music/bin/gdimportcdi.pl cdifiles... (album/CD info files). You should supply a .tri file for every music track and a .cdi file for every album. Their format is specified in the technical documentation section.
The routines gdimport... only update the database. The mp3 files have to be manually renamed and copied to one of the directories ~music/00, ~music/01, .... Follow the mp3 file naming scheme to consistently rename the imported mp3 files.
Use this method if detailed track/album information is available in any digital format.
#Getting_Album_Information_into_the_GiantDisc_System
Getting Album-Information into the GiantDisc System
There are currently three methods to obtain album information:
- when recording CDs using the recording dialog of the palm, the album information is automatically generated and the tracks are associated to it.
- directories in ~music/inbox/albums that contain mp3, flac or ogg files are interpreted as albums. They can be interactively imported using the menu item Record ->Read inbox album... (see Reading from the "Inbox" above)
- when existing mp3 files are imported, the album information from the id3-tags is imported by using the script gdimport.pl with the option -a on the command line.
