Personal tools

Difference between revisions of "Using rdimport to import mp3 files"

From Rivendell Wiki

Jump to: navigation, search
(Created page with "== RDImport is a great tool to import large numbers of mp3s or wav into your music database. == To find out how to use rdimport functions type rdimport --help ---- rdimport...")
 
(No difference)

Latest revision as of 15:58, 12 March 2018

RDImport is a great tool to import large numbers of mp3s or wav into your music database.

To find out how to use rdimport functions type rdimport --help


rdimport [options] <group> <filespec> [,<filespec>]*

Import one or more files into the specified group in the library. By default, a new cart will be created for each file imported. A <filespec> of '-' will cause RDImport to read the list of filespecs from standard input.

The following options are available:

--verbose
    Print progress messages during processing.
--log-mode
    Prepend date/time information to each line of printed status (implies
    the '--verbose' option).
--normalization-level=<level>
    Specify the level to use for normalizing the audio, in dBFS.
    Specifying '0' will turn off normalization.
    On Rivendell meters, 0dB=-16dBFS


--autotrim-level=<level>
    Specify the threshold level to use for autotrimming the audio, in
    dBFS.  Specifying '0' will turn off autotrimming.
--single-cart
    If more than one file is imported, place them within multiple cuts
    within a single cart, rather than creating separate carts for each
    file.
--segue-level=<level>
    Specify the threshold level to use for setting the segue markers,
    in dBFS.
--segue-length=<length>
    Length of the added segue in msecs.
--to-cart=<cartnum>
    Specify the cart to import the audio into, rather than using the next
    available cart number for the group.  If the cart does not exist, it will
    be created.  Each file will be imported into a separate new cut within the
    cart.  Use of this option implies the '--single-cart' option as well,
    and is mutually exclusive with the '--use-cartchunk-cutid' option.
--use-cartchunk-cutid
    Import the audio into the cart specified by the CartChunk CutID parameter
    associated with the file.  If the cart does not exist, it will be
    created.  Use of this option is mutually exclusive with the '--to-cart'
    option.
--title-from-cartchunk-cutid
    Set the cart title from CartChunk CutID.
--delete-source
    Delete each source file after successful import.  Use with caution!
--delete-cuts
    Delete all cuts within the destination cart before importing.  Use
    with caution!
--drop-box
    Operate in DropBox mode.  RDImport will run continuously, periodically
    scanning for the specified files, importing and then deleting them when
    found.  WARNING:  use of this option also implies the '--delete-source'
    option!
--metadata-pattern=<pattern>
    Attempt to read metadata parameters from the source filename, using
    the pattern <pattern>.  Patterns consist of a sequence of macros and
    regular characters to indicate boundaries between metadata fields.
    The available macros are:
         %a - Artist
         %b - Record Label
         %c - Client
         %e - Agency
         %g - Rivendell Group
         %i - Cut Description
         %l - Album
         %m - Composer
         %n - Rivendell Cart Number
         %o - Cut Outcue
         %p - Publisher
         %r - Conductor
         %s - Song ID
         %t - Title
         %u - User Defined
         %y - Year
         %% - A literal '%'
    Detection of either the Rivendell Group [%g] or Rivendell Cart [%n]
    will cause RDImport to attempt to import the file to the specified Group
    and/or Cart, overriding whatever values were specified elsewhere on the
    command line.
    Boundaries between metadata fields are indicated by placing regular
    characters between macros.  For example, the pattern '%t_%a_%g_%n.',
    when processing a filename of 'My Song_My Artist_TEMP_123456.mp3',
    would extract 'My Song' as the title and 'My Artist' as the artist,
    while importing it into cart 123456 in the TEMP group.
--fix-broken-formats
    Attempt to work around malformed audio input data.

Notes

It may be necessary to enclose individual <filespec> clauses in quotes in order to protect wildcard characters from expansion by the shell. A typical indicator that this is necessary is the failure of RDImport to process newly added files when running in DropBox mode.



How I used rdimport

So this is how I added a whole lot of songs to my RD database...

rdimport --verbose --segue-level=-10 Examplegroupname *.mp3 2> errorlog.txt

This imports everything with an MP3 file extension in a particular directory to the RD database, and places a SEQUE LEVEL fade point at the end of the track at such a point where the volume drops to -10dB. A new CART number is created for each file. It also creates an error log. If the error log already exists put 2>> errorlog.txt to add to the bottom of an existing error log.

The only songs that don't get converted with more than one DOT or comma in the file name. eg Artist Name - Song Name..mp3

or Artist Name - Song Name, Middle Name.mp3

Another thing you can do is make all the tracks CUTs inside the one cart.

rdimport --verbose --segue-level=-10 --single-cart Examplegroupname *.mp3 2> errorlog.txt

or if the CART already exists you can add CUTs to it.

rdimport --verbose --segue-level=-10 --to-cart=400 Examplegroupname *.mp3 2> errorlog.txt

Other things to consider with Linux and Unix based systems is all file names directory paths are case sensitive. eg Song Name.mp3 is different from song name.mp3 And when converting files using RDIMPORT... the group name is case sensitive.

Wildcards

Q: I set up the metadata option as: --metadata-pattern=SPN_%l_[0-9]*_[0-9]*_%t\.mp3

A: Ah, you're using regexes. Unfortunately, RDImport doesn't have the smarts to deal with that -- just '*' and '?' wildcards. Now that you bring it up, it isn't a bad idea though... Frederick F. Gleason, Jr. - Chief Developer - Paravel Systems