How to query the Media Library using OMQL

You can submit Ots Media Query Language (OMQL) queries to the Media Library and instantly find items which satisfy various criteria. OMQL queries can be typed directly into the Media Library Query input box. After pressing Enter, the query is sent to the OMQL interpreter, which queries the Media Library and then causes the matching items to be displayed underneath in the Media Library display area.

OMQL is a powerful language, and if you learn even just a little about it, you will find that your organizational abilities with OtsAV, and your potential to achieve with the product, will increase many fold.

Below are a couple of simple examples showing you how to query the Media Library. To help with understand the following examples we recommend that you immerse yourself in the OMQL reference documentation.

Note: The following examples make the assumption that you have the Dance and 2000s categories in your Media Library, and that you have populated these categories with items that you have rating and bpm information added.


Querying multiple categories

OMQL enables you to query multiple categories at one time to retrieve items which are related by the categories they are stored in. For example, you may wish to find a dance song that was released in 2000. You can simply retrieve items that meet this criteria by querying the Dance and 2000s categories.


Last Play query

By default OtsAV stores the date and time, of when an item was last played, in the Media Library. You are able to query the Media Library for items based on the lastplay information stored.


BPM query

In the following example we will use the bpm keyword to query the Media Library. You will find this keyword useful when trying to match songs of a similar bpm. For details on recording the bpm of a track click here.

In this example we will query the Media Library for songs that have a bpm between 120 and 140.


Rating query

In the following example we will use the rating keyword to query the Media Library. If you have rated your media collection you can quickly find items that meet a certain rating criteria.


Putting it all together

As an example we will combine the above queries to build a targeted query that will drill down and find items which meet the following criteria: the list of items must be in either the Dance or 2000s categories, must be popular (have a rating of 8 or higher), have not been played in the last 12 hours, and must have a bpm between 120 and 140.


Displaying Video, CD+G, Karaoke or Beat tracked items

The following keywords can be entered into the Query box to display the relevant type of item.


For more details on the Ots Media Query Language (OMQL) click here.


Related Topics:

Search features

Search Media Library feature

Ots Media Query Language (OMQL)