rdimport 1 October 2020 Linux Audio Manual rdimport Audio importation tool for the Rivendell Radio Automation System Fred Gleason fredg@paravelsystems.com Application Author rdimport OPTIONS group-name filespec Description rdimport1 is a command-line tool for importing one or more audio files into the Rivendell Radio Automation System. By default, a new cart will be created for each file imported, although this behavior can be modified by use of the appropriate options (see the and options, below). A filespec of - will cause the list of filespecs to be read from standard input. Options str Add Scheduler Code str to the target cart. The specified code must exist in RDAdmin->SchedulerCodes. This option may be specified multiple times. level Specify the threshold level to use for autotrimming the audio, in dBFS. Specifying 0 will turn off autotrimming. [=service-name] Determine the target cart number by looking it up in the ISCI cross-reference table, using the ISCI code provided by the or options. If service-name is given, prepend the Program Code for the specified service followed by an underscore to the ISCI code when doing the cart number lookup in the ISCI cross-reference table. Useful for importing sets of copy-split audio. This option is mutually exclusive with the option. offset Add offset to the cart number as determined from the metadata pattern or . Do not set the cut start and end datetimes, even if such are found in the file's import metadata. Mutually exclusive with the option. Do not set the cut start and end daypart times, even if such are found in the file's import metadata. Mutually exclusive with the option. days If the imported file does not reference an end date, create with end date offset by days days relative to the current date. Cannot be less than the value the value for (default = 0). days If the imported file does not reference an start date, create with start date offset by days days relative to the current date. Cannot be greater than the value the value for (default = 0). Delete all cuts within the destination cart before importing. Use with caution! Delete each source file after successful import. Use with caution! Operate in DropBox mode, causing rdimport1 to run continuously, periodically scanning for files matching the specified filespec, importing and then deleting them when found. WARNING: use of this option also implies the option! Print a copy of the current ISCI cross-reference table and then exit. Useless except for debugging. days If the imported file references an end date, offset the value by days days. Attempt to work around malformed audio input data. Print a short usage message and exit. filename The filename to write logs to. This option is mutually exclusive with the option. Rivendell "Filepath" wildcards can be used in filename. See the rivendell-wildcards7 man page for details. Writes the logs to syslog3. Overrides the [Logs] section of rd.conf5. This option is mutually exclusive with the and options. Send an e-mail message for each file processed, rather than a single message per run summarizing all actions taken. Implies the --send-mail switch. See the --send-mail switch (below) for more details about generating e-mailed reports from rdimport1. pattern Attempt to read metadata parameters from the source filename, using the pattern pattern. Patterns consist of a sequence of wildcards and regular characters to indicate boundaries between metadata fields. This option is mutually exclusive with the option. The available wildcards are: %a Artist %b Record Label %c Client %e Agency %g Rivendell group name (overrides the group-name parameter) %i Cut Description %k Time component of the cut start date/time, in format HH:MM:SS %K Time component of the cut end date/time, in format HH:MM:SS %l Album %m Composer %n Cart Number %o Outcue %p Publisher %q Date component of the cut start date/time, in format YYYY-MM-DD. If the %Q wildcard has not also been provided, the end date will be assumed to be the same as the start date. If the %k wildcard has not been provided, a start time of 00:00:00 will be assumed, while if the %K wildcard has not been provided, an end time of 23:59:59 will be assumed. %Q Date component of the cut end date/time, in format YYYY-MM-DD. If the %K wildcard has not been provided, an end time of 23:59:59 will be assumed. %r Conductor %s Song ID %t Title %u User Defined %wc Industry Standard Commercial Identification [ISCI] Code %wi International Standard Recording Code [ISRC] %wm MusicBrainz Recording ID %wr MusicBrainz Release ID %y Release Year %% A literal '%' Detection of either the Rivendell Group [%g] or Rivendell Cart [%n] will cause rdimport1 to attempt to import the file to the specified Group and/or Cart, overriding whatever values were specified on the command line. If the option has been used, then the value specified there will be used instead of %u. 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. level Specify the level to use for peak normalizing the audio, in dBFS. Specifying 0 will turn off normalization. pattern Specify a pattern string (which may include metadata wildcards), which will cause rdimport1 to print this string to standard output once for each file successfully imported, with the wildcards appropriately resolved. See the section (above) for the list of supported wildcards. length Length of the added segue in length msecs. See , below. level Specify the threshold level to use for setting the segue start marker, in dBFS, as measured after any specified normalization has been applied. Default action is not to create segue markers. Send e-mail to the address(es) specified in the destination group's Notification E-Mail Addresses setting in rdadmin1 summarizing the action(s) performed during the run. Each invocation of rdimport1 will potentially generate one message for all successful imports and another for all failed imports (but see the switch (above) for a way to modify this behavior). NOTE: Rivendell uses the system's sendmail1 interface when originating e-mail. For many modern e-mail setups, additional site- and distro-specific configuration will likely be necessary beyond what can be covered here. start-datetime,end-datetime Set the cut start and end datetimes, in the format YYYYMMDD-HHMMSS. Mutually exclusive with . start-time,end-time Set the cut start and end datetimes, in the format HHMMSS. Mutually exclusive with . offset Set the marker end marker to a given offset value, with offset specified in milliseconds. If positive, it is taken to indicate a marker position relative to the absolute beginning of the audio cut, while if negative, it is taken to indicate a marker position relative to the absolute end of the audio cut. The following marker values are recognized: cut The Cut markers hook The Hook markers segue The Segue markers talk The Talk markers offset Set the FadeDown marker to offset. See the discussion of the option above for a description of the offset parameter. offset Set the FadeUp marker to offset. See the discussion of the option above for a description of the offset parameter. offset Set the marker start marker to a given offset value, with offset specified in milliseconds. See the discussion of the option above for a description of the marker and offset parameters. Set the cart label field field to string. This will override any other values --e.g. from . Values recognized for field are: agency Agency Name album Album Name artist Artist Name bpm Beats per Minute (integer numeric) client Client Name composer Composer Name conductor Conductor Name description Cut Description isci Industry Standard Commercial Identification [ISCI] Code isrc International Standard Recording Code [ISRC] label Record Label Name (rights holder) outcue Cut Outcue publisher Music Publisher (rights holder) recording-mbid MusicBrainz Recording ID release-mbid MusicBrainz Release ID song-id Song ID title Title user-defined Miscelaneous Information year Year Released (four digit numeric) string Deprecated. Use instead. If more than one file is imported, place them within multiple cuts within a single cart, rather than creating separate carts for each file. days If the imported file references a start date, add days days to it. Set the cart title from CartChunk CutID. ticket-hash:ipv4-address Run rdimport1 as the Rivendell user specified by ticket rather than as the currently "logged in" user. cartnum Import into cart cartnum, 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 and is mutually exclusive with . Import the file as a monaural cut. If the file is stereo, both left and right channels will be mixed together. 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 . Print progress messages during processing. Output version information and exit. Attempt to read file metadata in RDXML format from the file basename.xml. This option is mututally exclusive with the option. Exit Values 0Normal exit 2Unable to open database 4Unknown/invalid command line option 13One or more audio imports failed 14Unknown dropbox ID 15No such group 16Invalid cart number 17No such scheduler code 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 rdimport1 to process newly added files when running in DropBox mode. BUGS It could be argued that RMS rather than peak normalization would be more appropriate for use with the option. See Also sendmail1 , rdexport1 , rdmarkerset8