Working with Media Libraries

You have a question or need an advice about how to do something? Ask it here!
Post Reply
User avatar
radio42
Site Admin
Posts: 5561
Joined: 05 Apr 2012 16:26

Working with Media Libraries

Post by radio42 » 10 Apr 2012 12:59

A media library is a collection (list) of media entries. Besides keeping a reference to the physical location of the related audio file, a media entry also keeps the meta data associated to it. The meta data for a media entry might come from different sources, e.g. the TAG data of the audio file itself, a dedicated .pfmd meta data file stored along side with the audio file, a dedicated meta data database table or it might come directly from the media library itself (whereas not all types of media libraries do actually support this, see below).
Media libraries are used mainly at two places:
1. Within Scripts to automatically query new tracks to a playlist whenever needed
2. Within the Find-Window to quickly find and locate a certain media entry (track).

As said: A media library is a collection (list) of media entries. So what is a media entry?
A media entry is a single object mainly keeping a reference to the physical location of a playable audio track. At least that’s all it needs. But a media entry is effectively a bit more, as it also keeps the meta data associated with it. Meta Data might be devided into two main groups:
a) TAG data assigned to the track (like the title, artist, album, duration, writer etc.) and
b) Additional Meta Data (like cue-points, hooks, track options, moderator info etc.)

Where a) is typically present for most tracks and commonly available for most standard media players (like Winamp, Windows Media Player, iTunes etc.); b) is very specific to on-air playout systems and often not available as standardized information. As such the additional meta data might also be something very specific for ProppFrexx ONAIR only. A details list of meta data used by ProppFrexx ONAIR is given below.

Media libraries might be small or large (depending for what they are actually used). There is no real limit of how many entries one media library might contain (the actual limit is effectively over 2.4 billion entries per library). However, it is typically usefull to group and organize your tracks into multiple media libraries, e.g. grouped by genre, age, type of tracks etc. Therefore the same physical track might also be present within multiple media libraries.

This is also a fundamental difference to other broadcasting, scheduling or playout system (which mostly only use one huge database or media library containing all your tracks and use a 'category' or other fields to seperate their grouping). ProppFrexx allows you to already define any number of media libraries and as such keep then separated in a more natural way.

As such all your defined media library entries build your entire logical ‘repository’ or ‘database’ (name it as you like) of available tracks which can be used wherever you want. However, you might also operate ProppFrexx ONAIR even without any media library defined at all. In such case you simply can not search for tracks, can not use media libraries within scripts and would have to add tracks to your playlists manually (e.g. by dragging them from the Windows explorer over to a playlist window). However, I assume you want to use media libraries!

So the very first step when working with ProppFrexx would be to setup your media libraries...

User avatar
radio42
Site Admin
Posts: 5561
Joined: 05 Apr 2012 16:26

Re: Working with Media Libraries

Post by radio42 » 10 Apr 2012 13:15

ProppFrexx ONAIR basically supports three main media library sources to obtain the list of media entries from (types of media libraries; see below for details) which can all be used in parallel:

1. Playlist based Media Libraries
A standard playlist (e.g. a .pfp or .m3u) file is used as one media library. Each playlist file entry is used as a media entry within the media library. You can use different playlist files to use multiple/different media libraries. The media library name is taken from the playlist file name.

2. Folder based Media Libraries
A certain base folder (directory) is used as one media library. Any audio file within this base folder and any sub-folder is used as a media entry within the media library. You can use different base folders to use multiple/different media libraries. The media library name is taken from the base folder name.

3. Database based Media Libraries
A certain database table (or view) is used as one media library. Each row within the database table is used as a media entry within the media library. You can use different database tables resp. views to use multiple/different media libraries. The media library name is taken from the database table name.

(Note: 'Remote Media Libraries' are hosted by the 'ProppFrexx Media Library Server' and are accessed remotely via a TCP/IP connection, but are essentially of the same type as above)

ProppFrexx ONAIR maintains all media libraries inside main memory! When a media library is (re)loaded all related entries are read in from the related source (of course only the reference location, TAG and meta data and NOT the physical audio file itself). Once loaded, the source isn’t touched during normal operation (access). A media library (with all its media entries) is (re)loaded into main memory:
  • initially when the Media Library is defined
  • at initial startup of ProppFrexx ONAIR (for all defined Media Libraries)
  • automatically at a certain time (if enabled/configured)
  • automatically when a Script is started (the list of libraries to reload can be specified)
  • automatically when the ‘AutoWatch’ feature is enabled (only available for playlist and folder based libraries) and the related source is changed externally
  • manually via a specific control-command
This means that once a media library is loaded (into memory) and ProppFrexx is accessing a media library it doesn’t touch the underlying source (e.g. the playlist file, the database table or folder structure); instead ProppFrexx only accesses the cached main memory image (the loaded media library entries). This has noumerous advantages, like:
  • You can change the source of a media library externally (e.g. the playlist file, the database table or folder structure) at any time without affecting the currently loaded media entries. ProppFrexx will continue to use the cached media entries up until the related media library is (re)loaded. E.g. you can define a ‘daily’ media library which can be maintained/updated externally during the day, but is only (re)loaded once in the night.
  • Access to the media entries (e.g. searching, filtering etc.) is much faster than any direct access to the source (e.g. a database table) and is also independent of the type of media library.
  • Once a media library was loaded successfully into memory the external source isn’t needed anymore, e.g. even if your external source would become unavailable (e.g. because of a database backup, maintenance of a storage device etc.) the media entries are still available.
But this also means that:
  • External changes to the source of a media library (e.g. the playlist file, the database table or folder structure) are not immediately visible within ProppFrexx, but only available once the media library is (re)loaded (except you are using the ‘AutoWatch’ feature).
  • External changes to the TAG or meta data of a loaded media entry might also not always be immediately visible within ProppFrexx (for search or filter operations), but only available once the media library is (re)loaded. But if your media library wouldn’t contain any TAG or meta data directly those would need to be loaded anyhow once a library entry is accessed (e.g. when a search or filter operation is performed) which might slow down the resp. operation.
Note: A media library is kept cached in main memory until (re)loaded. Changes to the external source will only be ‘visible’ within ProppFrexx once the media library is (re)loaded! Using very large media libraries might therefore result in a higher memory usage. To overcome memory limits (if you experience those – which should rarely be the case) you might use Remote Media Libraries (see below).
However, if you make changes to your media library entries from within ProppFrexx ONAIR internally, those changes are immediately available!

The question now is: How do I define a media library and where does it get it tracks from?

Media Libraries can be created, modified, edited (maintained) directly from within ProppFrexx ONAIR. The standard playlist window is the point where you can do so. E.g. select ‘New’ from the ribbon main menu to open a new and empty playlist. Now you can manually add any numer of tracks to that playlist window and later on save it, e.g. to a supported playlist file. Once a playlist file is created you might use that as a media library. Or if you have already defined a media library, select the ‘Media Libraries’ sub-menu from the ‘Open’ menu of the main ribbon to open an existing media library. This will open a new playlist wndow showing all tracks contained within this media library. You can now change such playlist and as such the underlying media library will be changed accordingly! This is also true for database based media libraries, e.g. just create an empty table and reference this as a new media library. Database based media libraries can as such also be opened and maintained in the playlist window (new tracks added, modified or removed will update the underlying database table accordingly).
Folder based media libraries don’t need to be maintained from within ProppFrexx, you simply manage them with your Windows Explorer.

User avatar
radio42
Site Admin
Posts: 5561
Joined: 05 Apr 2012 16:26

Re: Working with Media Libraries

Post by radio42 » 10 Apr 2012 13:24

ProppFrexx ONAIR supports the following media library types:

Playlist based Media Libraries
The list of media entries is directly gathered from the playlist file itself. As such a playlist file can be seen as a 'small' but effective list containing all entries for this media library. When a playlist based media library is loaded, the resp. playlist file is read-in with all its information.
ProppFrexx supports various different playlist file formats, such as .m3u, .pls, .wpl, .smil, .xml, .xspf, .mpl, .pfp, .dbf (DRS2000), .mdb (Carmen).
Depending on the playlist file format used, a playlist file might contain none, some or all meta data. E.g. a .m3u playlist file basically only contains the file location of a track, but no additional meta data - as such the meta data must be read-in from any of the other available sources, typically the audio files TAG data.
A .pfp (ProppFrexx Playlist Format) playlist on the other hand might contain all meta data - as such this is the recommended playlist format to be used with media libraries - as only this playlist format might ensure, that additional TAG reading is not needed during any search and find operation as the meta data might already be stored inside this playlist format!
Note: A .pfp playlist format (even if capable of saving all meta data) can of course only save those meta data as available at that time. I.e. if you create a new .pfp playlist and want to make sure, that it really contains all meta data, you need to also make sure, that at the time you save the .pfp file all the TAG data was already read-in! Depending on your general TAG reading settings (see above) this might not be the case, as e.g. the default settings only reads in TAG data once a entry becomes visible within a playlist window. As such you might want to perform a manual and dedicated TAG reading. You can do this via the playlist windows context menu (Selection – (Re)Read TAGs).
Advantages:
- very fast loading time
- can be maintained manually
Disadvantages:
- might not contain meta data
- must be maintained manually

Folder based Media Libraries
The list of media entries is determined by all audio tracks contained in the defined folder incl. any sub-folders. When a folder based media library is loaded, the resp. folder and any sub-folders are scanned and read-in. Any meta data must be read-in in the background for all audio files found. When using the 'Keep _synced.pfp Playlist with Folders' option (which is set by default) a .pfp playlist file is stored in the base folder keeping that information what meta data has been read-in so far to avoid a full (re)scan and TAG reading each time such a media library is (re)loaded.
When you initially define a new folder based media library this folder an all its sub-directories are scanned for audio files. In addition for each found audio file the meta data TAGs are being read. This means the TAGs are read for this audio file (as such the file is opened and the TAGs, e.g. ID3, APE, WMA, RIFF, OGG...whatsoever are being read in).
This scanning and TAG reading is done only once and initially when using a folder based media library. Note, that this might take some time (depending on your harddisk speed)!
Once all files in the respective folder(s) have been read in (according to the above mentioned option) a '_synced_.pfp' file is written to the defined media library folder. This special playlist file now contains all tracks found in the respective folder incl. and meta data read.
As such, when you (re)start ProppFrexx ONAIR again, it would reload your folder based media library again. But instead of doing the scanning and TAG reading all over again - this time ProppFrexx will actually first read the '_synced_.pfp' file (if available) and only scan the folder for changes or new audio files.
To monitor this background scanning and TAG reading process you might click on the small red Busy Indicator icon at the very left bottom of the main screen. This will open a Worker Thread Status dialog. Here you can monitor the number of outstanding background Entry TAG Reader tasks. They should count down to 0 when all files have been fully read in.
As said the TAG reading is an initial task to read in all files initially from a newly defined folder based media library. If you shutdown ProppFrexx ONAIR before this scanning and TAG reading process has been fully finished, ProppFrexx would save 'what it has so far scanned' and continue with the next (re)start.
Advantages:
- can be maintained automatically
- incl. an auto watch feature (new files copied to the folder are autom. added)
- average loading time
Disadvantages:
- long initial scanning time
- does not contain any meta data

Database based Media Libraries
The list of media entries is determined by a special SQL database table or view (each row in such a table references one media entry). When a database based media library is loaded, the resp. table is selected and read-in. The table structue is defined in the Appendix. Most columns are optional columns and thus could be null. The meta data is defined as well in certain table columns.
Advantages:
- fast loading time
- can be maintained manually

Disadvantages:
- might not contain meta data
- must be maintained manually
- additional SQL know how needed

Remote Media Libraries
A remote media library is a media library defined and existing on a ProppFrexx Media Library Server. The ProppFrexx Media Library Server is a small application shipped with ProppFrexx ONAIR. It’s available only in certain editions.
The ProppFrexx Media Library Server can sit/run on the same machine or on a different machine wthin your LAN and hosts any of the above media library types by its own (you define the media libraries on the server and the server loads these media libraries and makes them available for ProppFrexx ONAIR clients). As such ProppFrexx ONAIR would access such media libraries remotely. In large environments this allows you to detach the library management to a dedicated remote server.
Advantages:
- perfect for large setups
- decouples playout a media library management
- allows remote audio access stored on a central server only
Disadvantages:
- more complex to maintain

User avatar
radio42
Site Admin
Posts: 5561
Joined: 05 Apr 2012 16:26

About Media Entries

Post by radio42 » 10 Apr 2012 13:37

As already mentioned a media entry is a single object containing information about a logial track, e.g. as loaded by a media library. It keeps the following information (the only mandatory attribute is the ‘Filename’ all other attributes are optional). When a media library resp. the related media entries are loaded whatever TAG and meta data is available will be loaded with it as available from the media library source. If no TAG or meta data is available from the related media library source these missing information might need to be obtained at a later stage (e.g. when the entry becomes visible in the playlist window or at least when loaded to a ProppFrexx player).

Always available data:
Filename: The fully qualified path and filename (location, URI, UNC) of the physical file. The extension of the file name might determine the format and type of media entry. E.g. any supported audio file extension will denote a playable audio entry; any supported playlist extension will denote a playable embedded playlist entry; a recognized document extension (.txt, .rtf, .html, .docx, .odt) or any other extension will denote a non-playable entry. The prefix (http: or ftp:) of an audio file might denote, if the audio should be streamed rather than directly played. Depending on the type of media library being used the file name might be converted into a fully qualified file name and path as needed (in general ProppFrexx ONAIR supports absolute and relative locations as well as UNC paths):
Playlist based Media Libraries: If the file name given in the playlist is in relative notations it will be expanded to its fully qualified (absolute) notation by using the directory of the playlist file as the base folder. In any other case the file name is already given in absolute or UNC notation and doesn’t need to be expanded.
Folder based Media Libraries: The file name is already scanned as fully qualified and doesn’t need to be expanded.
Database based Media Libraries: If the file name given in the table column is in relative notations it will be expanded to its fully qualified (absolute) notation by using the base directory(ies) as specified in the database connection setup dialog. In any other case the file name is already given in absolute or UNC notation and doesn’t need to be expanded. It is however suggested to use absolute or UNC file names within a database table.
Remote Media Libraries: If the file name given by the remote server is in relative notations it will be expanded to its fully qualified (absolute) notation by using the base directory(ies) as specified in the remote connection setup dialog. In any other case the file name is already given in absolute or UNC notation and doesn’t need to be expanded. Note, that you might specify within the ProppFrexx Media Library Server application how a file name should be transmitted to a client. It is however suggested to use absolute or UNC file names within a remote media library.
MediaCollection: An optional list of media entries to compose an embedded entry (only used internally).
Trackname: The default name of the media entry (if nothing else is available this defaults to the filename without its extension, else it is composed as ‘Artist - Title’).

Basic TAG Data:
Duration: The duration of the media entry (ie. the nominal length of the track).
Title: The title/name of the media entry.
Artist: The artist/performer of the media entry.
Album: The name of the album of the media entry.
Album Artist: The name of the album of the media entry.
Track: The track number of the media entry (position and/or total number of a track in the source, e.g. a CD).
Disc: The disc number of the media entry (position and/or total number of discs in the source, e.g. a CD).
Genre: The genre(s) of the media entry.
Year: The release date of the media entry.
Grouping: The grouping or category of the media entry.
Mood: The mood description of the media entry.
Copyright: The copyright string of the media entry.
Encoded By: The encoded by value of the media entry.
Publisher: The publisher or record label of the media entry.
Composer: The composer of the media entry.
Conductor: The conductor of the media entry.
Lyricist: The lyricist or text writer of the media entry.
Remixer: The remixer or special editor of the media entry.
Producer: The producer of the media entry.
Comment: A general comment description related to the media entry.
Rating: The user rating value of the media entry. ProppFrexx expects, that the rating value is numeric and scales from 0 to 100 (0=Unknown, 1-20=Poor, 21-40=Average, 41-60=Good, 61-80=VeryGood, 81-100=Excelent)! This except for the ID3v2 POPM frame, which scales from 0 to 255 and is automatically transformed internally to a 0-100 value.
ISRC: The international standard recording code of the media entry.
BPM: The numeric beat per minute value of the media entry.
Replaygain_Track_Gain: The tracks replay gain adjustment value (in dB as a numeric value).
Replaygain_Track_Peak: The tracks peak level value as a numeric value (between 0.0, silence and 1.0, maximum – or above).
TAGs: Any arbitrary list of all native TAG objects contained in the audio file. A list of fully supported TAG attributes as used by ProppFrexx for the different TAG formats according to the above TAG data (any other available TAG attributes might also be read-in and would be available read-only) can be found here: viewtopic.php?f=9&t=7
Note, that if you don't want to write TAG data directly to the audio file, ProppFrexx also supports reading/writing meta data to a separate .pfmd files along with the audio file or even from a dedicated meta data database table.
Cover Art (Pictures): An image associated with the media entry. The cover art image is either obtained directly from the audio files TAG data or (if the audio file doesn’t contain any pictures) gathered from the path location of the audio file. In this case the following is tested in the following order:
Track-Image: The filename extension is changed to .jpg, .gif, .png or .bmp.
Folder-Image: The directory of the audio file is scanned for a ‘Folder.jpg’ or ‘Album*.jpg’ file.
Album-Image: The ‘Album’ tag name is extended by ‘.jpg’ and the directory of the audio file is scanned for such file.
Other-Image: The directory of the audio file is scanned for any .jpg, .gif, .png or .bmp file.
The Basic TAG Data might be obtained/saved from/to the following sources:
- The audio files standard TAGs (e.g. ID3, WMA, OGG, APE, etc.)
- A .pfp playlist file
- A database based media library (columns)
- A database based meta data table (columns)
- A separate ProppFrexx Meta Data file (.pfmd)

Additional Meta Data:
GUID: A global unique identifier of the media entry (might be empty if not available). Might be obtained/saved from/to either a .pfp playlist file, a database based or remote media library, a .pfmd file or the ‘ProppFrexx:’ user TAG. In any case, ProppFrexx might create a GUID for any new entry if not already available. This allows you uniquely identify a media entry either by its Filename or by its GUID.
EntryType: The type of media entry used to further classify the track within ProppFrexx ONAIR. This attribute is rather important and a default entry type might be defined per media library for all entries having no type set so far. The entry type might for example be used within ProppFrexx ONAIR to apply different mixing settings; filter certain entries for logging or streaming song title updates; perform automatic track insert transitions; colorize entries within cardwalls and playlists etc.
Options: The list of media entry options (see Script-Line Options for details) which are permanently assigned to a media entry.
Tempo: The initial track tempo adjustment in percent (default is 0, no tempo change).
Gain: The initial track gain adjustment in percent (default is 0, no gain change).
TrackEndIndicator: Any single character which might describe the ending of the track (e.g. ‘|’ for a cold, immediate ending or ‘\’ for a faded ending).
ModeratorText: An optional info text which might be used by the DJ or presenter.
CueIn: The cue-in position of the media entry (the effective start position of the track).
FullLevel: The position where the full volume level should be reached. If set, the tracks volume is ramped between CueIn and this position (when UseFading is used).
Ramp: The first intro position of the media entry (where the intro part of the track ends).
Ramp2: The second intro position of the media entry (where an alternative intro part of the track ends).
Outro: The outro position of the media entry (where the ending part of the track starts).
FadeOut: The position where the volume level should start fading out. If set, the tracks volume is ramped between this position and CueOut (when UseFading is used).
Next: The position of the media entry where a next track should start playing.
CueOut: The cue-out position of the media entry (the effective stop position of the track).
CuePoints: A list of an alternative set of cue-points (CueIn, FullLevel, Ramp, Ramp2, Outro, FadeOut, Next, CueOut) – e.g. used to store Hook cue-points.
VolumePoints: A list of additional volume points (consisting of a position and a level value) which in total might describe a volume envelope for the media entry.
EventEntries: A list of event entries (consisting of a position, an event type and an event parameter value) which might trigger a certain action at the event position. The following event entry types do exist:
- TempoChange: The tracks tempo will be changed at this position to a new value.
- FXChange: A special FX (e.g. Chorus, Echo, Flanger etc.) will be turned on or off at that position.
- TrackInsert: A media entry will be started (played) in parallal (overlayed) at that position. Note, this track insert will fully play til its end, independend of the duration of this track.
- PlaylistInsert: A playlist file will be started (played) as an embedded entry (all playlist entries as one continuous mix) in parallal (overlayed) at that position. Note, this playlist insert will fully play til its end, independend of the duration of this track.
- ExecuteCommand: The given control-command(s) will be executed at this position.
- SoundBed: Defines a general soundbed file to be used for this entire track (plus an optional attenuation value to be used for this entire track). The soundbed file will be played looped as long as the media entry is playling.
HotstartPositions: A list of up to ten positions which can be used to quickly jump to that position.
LoopPoints: A list of loop entries (consisting of a loop type and a loop start and lopp end position value) which might be used with the integrated Loop Sampler. The loop start and end position denote a range within the media entry which can either be looped in the sampler or skipped while playback.
The Additional Meta Data might be obtained/saved from/to the following sources:
- A .pfp playlist file
- A database based media library (columns)
- A database based meta data table (columns)
- A ProppFrexx Meta Data (.pfmd) file
- A special ‘proppfrexx:’ user TAG attribute within the audio file

Depending on the geneal setting option Force MetaData Reading, additional meta data has priority over playlist based meta data and is performed in the following order until found:
Default:
1. Playlist based meta data
2. Meta Data File (.pfmd)
3. Meta Data TAG (proppfrexx)
Force MetaData Reading:
1. Meta Data TAG (proppfrexx)
2. Meta Data File (.pfmd)
3. Playlist based meta data
Note: only in effect, if the Use MetaData File option is set.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests