The information below describes the metadata edits that you need to make to your podcasts' MP3 files in order to set the timing for mid-roll ad injection. It also describes how to configure pre- and post-roll ad insertion that is outside of the defaut "one ad before and one ad after" configuration (for example, to include two or three pre- or post-rolls, or to change their timings).
To make the metadata edits, you should have at least a basic understanding of web-based computer coding (such as HTML programming) although the technical challenges involved are minimal. For the most part you can just copy and paste from the examples in The Cue Point Format, and modify them to suit your specific needs.
The Cue Point Format for Podcasting
The cue point format uses tags and attributes to tell the MediaCaster where to insert ads. If you want to enable mid-roll ad insertion or change the default pre- or post-roll behavior, you need to insert the appropriate tags and attributes into the COMMENT section of the podcast MP3 file's metadata using one of the suggested MP3 File Editors.
It helps if you have at least a basic understanding of web coding, but it isn't strictly necessary. In most cases you should be able to figure out the code you need by looking at the examples and modifying them to suit your specific needs. You might find it easiest to write the code in a plain text editor first, such as Microsoft NotePad or Apple TextEdit, and then copy and paste the code into the MP3 file editor (into the "Comment" field).
Note: The format is case sensitive! Everything must be written in lowercase. Also, quotation marks must be "straight" not “smart/curly.”
This example shows a simple metadata comment that enables mid-roll ad insertion, and inserts two mid-roll ads starting at 20 minutes 30 seconds into the podcast.
<mediacaster>
<cuepoints>
<cuepoint time="20:30" type="midroll_2"/>
</cuepoints>
</mediacaster>
Nesting and Indenting
The examples shown in this document include carriage returns (line breaks) and indents. This is a formatting convention that helps you ensure your tags are properly nested and closed, but the MediaCaster does not actually require the tags to be formatted this way. In fact, some MP3 editors, such as the "mp3tag" tool, only allow you to enter a single line in the Comment field. Others, such as iTunes, limit you to a maximum of 255 characters.
You can use the cue point tags either way. If your MP3 editor restricts you to one line, simply remove any line breaks and indents, putting the entire contents of your comment on a single line with each tag separated by a space instead of a line break, like this:
<mediacaster> <cuepoints> <cuepoint time="20:30" type="midroll_2"/> </cuepoints> </mediacaster>
The tags and attributes, and how to use them, are explained below, in Cue Point Tags and Attributes.
Error Handling
If the MediaCaster detects an error in the comment information between the mediacaster
tags, an error message is returned to the player that has requested the podcast file. If you get reports of podcast download failures, capture the error message, as it will help you and Triton Digital troubleshoot the problem.
Remember that the text in the metadata is case-sensitive; uppercase or mixed-case characters will create errors.
Format Overview
The illustrations below show the basic components of the cue point format. The tags and attributes are explained in more detail below, in Cue Point Tags and Attributes.
Cuepoint format; tag nesting
- Metadata comment must open and close with the tag.
- Include all the cuepoint tags (for
time
andtype
) inside the tags. - Don’t forget the
/
on the closing tags!
Cuepoint format; setting attributes
- Any cuepoint tag that affects pre-rolls needs to also have a corresponding
ignore="media-start"
attribute in the cuepoints tag. - Any cuepoint tag that affects post-rolls needs to also have a corresponding
ignore="media-end"
attribute in the cuepoints tag. - Use the cuepoint tags to set the timing and type for ad insertions.
- Each cuepoint tag must be “closed” with an ending
/
Cue Point Tags and Attributes
The table below describes the tags and attributes that are used to customize pre- and post-roll ad insertion, and to enable and set the timing for mid-roll ad insertion. Refer to Usage Examples below to see them in use.
Tags and Attributes
Tag/Attribute | Description |
---|---|
<mediacaster> </mediacaster> | Required opening and closing tags that tell Triton Digital’s MediaCaster to parse the MP3 comment. These tags, and the content within, are stripped from the MP3 after the ads are stitched in and before the file is sent to listeners. (Listeners will not see the cuepoint metadata.) |
<cuepoints> </cuepoints> | Required opening and closing tags containing the list of cue points, and thus the location and type of ads that will be injected into the stitched audio file. |
<cuepoints ignore="[IDENTIFIER]"> | Optional attribute that can be used to disable automatic pre- or post-roll ad injection. The following two identifiers can be listed in this attribute (separated by commas):
|
<cuepoint time="[TIME]" type="[ROLLTYPE]"/> | Required element that defines each cue point (ad break) in terms of timing and roll type. Both attributes are required. The The |
"Type" attributes table
Type | Description |
---|---|
preroll_1, preroll_2, …, preroll_5 | Pre-roll ad break, where _1 to _5 defines the number of ads in the break, with a maximum of 5.* |
midroll_1, midroll_2, …, midroll_5 | Mid-roll ad break, where _1 to _5 defines the number of ads in the break, with a maximum of 5.* |
postroll_1, postroll_2, …, postroll_5 | Post-roll ad break, where _1 to _5 defines the number of ads in the break, with a maximum of 5.* |
“custom ad break type” | Optionally, and upon request, custom or new ad break types can be created. Contact Triton Digital customer support for such requests. |
* The number of ads defined is "up to" the number specified. In most cases the specified number of ads will be delivered, but in some cases, depending on targeting criteria and other availability factors, fewer than the specified number might deliver.
Usage Examples
Basic Mid-roll Break with Two Ads
This example shows a simple metadata comment that enables mid-roll ad insertion, and inserts two mid-roll ads starting at 20 minutes 30 seconds into the podcast.
<mediacaster>
<cuepoints>
<cuepoint time="20:30" type="midroll_2"/>
</cuepoints>
</mediacaster>
Two Mid-roll Breaks, Each with Two Ads
This example creates two mid-roll breaks; one at 00:10:10.005
(with two ads injected) and one at 00:35:00.300
(also with two ads injected).
<mediacaster>
<cuepoints>
<cuepoint time="00:10:10.005" type="midroll_2"/>
<cuepoint time="00:35:00.300" type="midroll_2"/>
</cuepoints>
</mediacaster>
Pre-roll with Two Ads, Post-roll with Three Ads
This example shows a metadata comment in which the default pre-roll and post-roll behavior is replaced. It starts by disabling the default pre-roll and post-roll behaviors:
<cuepoints ignore="media-start,media-end">
...then two pre-roll ads are specified:
<cuepoint time="00:00" type="preroll_2">
...along with three post-roll ads:
<cuepoint time="46:26" type="postroll_3">
Because the default post-roll behavior has been disabled, you need to know the precise end time of your podcast (in this case, time="46:26"
) to ensure the replacement post-rolls start at the correct place.
<mediacaster>
<cuepoints ignore="media-start,media-end">
<cuepoint time="00:00" type="preroll_2"/>
<cuepoint time="46:26" type="postroll_3"/>
</cuepoints>
</mediacaster>
No Pre-roll and No Post-roll; Mid-roll with Two Ads
This example shows a metadata comment that disables both pre-roll and post-roll ads (by including ignore="media-start,media-end"
), but enables mid-roll ad insertion at 20 minutes and 30 seconds into the podcast.
<mediacaster>
<cuepoints ignore="media-start,media-end">
<cuepoint time="20:30" type="midroll_2"/>
</cuepoints>
</mediacaster>
Default Pre-roll, Mid-roll with Two Ads, No Post-roll
This example shows a metadata comment that inserts a default pre-roll ad, enables mid-roll ad insertion at 20 minutes and 30 seconds into the podcast, and disables post-roll ads (by including ignore="media-end"
).
<mediacaster>
<cuepoints ignore="media-end">
<cuepoint time="20:30" type="midroll_2"/>
</cuepoints>
</mediacaster>
Post-intro Pre-roll with Four Ads
This example removes the default pre-roll ad injection and instead creates a pre-roll break with three ads 45 seconds into the podcast. This would be used if, for example, you wanted to run a 45-second introduction in your podcast before cutting to your pre-roll ads. There is no ignore="media-end"
cue point used, so the default single post-roll ad will be injected as expected.
<mediacaster>
<cuepoints ignore="media-start">
<cuepoint time="00:45" type="preroll_4"/>
</cuepoints>
</mediacaster>
Five Breaks with 14 Ad Insertions
This example disables the default pre-roll and post-roll behavior:
<cuepoints ignore="media-start,media-end">
... inserts a pre-roll ad break after 30 seconds of podcast content:
<cuepoint time="00:30" type="preroll_1"/>
... a mid-roll break with three ads at 17:15:123:
<cuepoint time="17:15.123" type="midroll_3"/>
... two more mid-roll breaks at 35 and 45 minutes:
<cuepoint time="35:00" type="midroll_4"/>
<cuepoint time="45:00" type="midroll_4"/>
... and finally a post-roll break with two ads at 1:05:00:360:
<cuepoint time="01:05:00.360" type="postroll_2"/>
<mediacaster>
<cuepoints ignore="media-start,media-end">
<cuepoint time="00:30" type="preroll_1"/>
<cuepoint time="17:15.123" type="midroll_3"/>
<cuepoint time="35:00" type="midroll_4"/>
<cuepoint time="45:00" type="midroll_4"/>
<cuepoint time="01:05:00.360" type="postroll_2"/>
</cuepoints>
</mediacaster>
Note: this example is for illustration only. Typically, you wouldn't have three mid-roll ad breaks and so many ad insertions, as too much advertising can annoy listeners.
How to Specify Mid-roll Timing
Mid-roll stitching is enabled by default when your podcast is served by Triton Digital. However, in order to inject ads at the right point in time, you must add cue point information to the MP3 file’s metadata. Specifically, you must indicate the precise point where mid-roll ad breaks start, and the maximum number of ads to inject. This is specified in the audio file’s metadata, in the MP3 ID3v2 COMM (comments) Tag.
This example shows a simple metadata comment that enables mid-roll ad insertion, and inserts two mid-roll ads starting at 20 minutes 30 seconds into the podcast.
<mediacaster>
<cuepoints>
<cuepoint time="20:30" type="midroll_2"/>
</cuepoints>
</mediacaster>
To create two mid-roll ad breaks, the metadata comment is very similar.
This example creates two mid-roll breaks; one at 00:10:10.005
(with two ads injected) and one at 00:35:00.300
(also with two ads injected).
<mediacaster>
<cuepoints>
<cuepoint time="00:10:10.005" type="midroll_2"/>
<cuepoint time="00:35:00.300" type="midroll_2"/>
</cuepoints>
</mediacaster>
See The Cue Point Format for more information on the correct formatting of timing metadata. Generally speaking, you can use the usage examples as a guide and simply modify them to suit your needs. Note that if other comments already exist in that tag, they can remain in place; the addition of the timing metadata does not affect them.
Additional notes:
- Adding the timing metadata can be done using any of the editors that are described in MP3 File Editors.
- The timing data you enter into the metadata comments is stripped out by the MediaCaster as part of the ad injection process. The metadata timing comments do not appear in the final MP3 file.
- You can read more about ID3v2 commenting here: https://id3.org/id3v2.3.0#Comments
How to Modify Pre- and Post-roll Insertion
By default, the Triton Digital podcast service inserts one pre-roll ad and one post-roll ad. If you prefer to insert more than one pre-roll or post-roll, you need to add cue point information to the MP3 file’s metadata. Specifically, you must disable the default behavior and replace it by indicating the number of pre-roll or post-roll ads to insert using the "type" attribute of the cuepoint tag. This is specified in the audio file’s metadata, in the MP3 ID3v2 COMM (comments) Tag.
The example below shows a basic metadata comment in which the default pre-roll and post-roll behavior is disabled (cuepoints ignore="media-start,media-end"
) and two pre-roll ads are specified (cuepoint time="00:00" type="preroll_2"
), along with three post-roll ads (cuepoint time="46:26" type="postroll_3"
). Note that you need to know the precise end time of your podcast (in this case, time="46:26"
) when using this cuepoint tag.
<mediacaster>
<cuepoints ignore="media-start,media-end">
<cuepoint time="00:00" type="preroll_2"/>
<cuepoint time="46:26" type="postroll_3"/>
</cuepoints>
</mediacaster>
You can also insert your pre-roll ads after some podcast content has played, such as if you have a 45 second introduction and then you want to a pre-roll ad break before the main content of the podcast begins. You configure this the same as a mid-roll, except that the ad insertion begins after only 45 seconds and the "type" is defined as "preroll" to ensure the inserted ads are ones that have been assigned the "pre-roll" traffic method in Tap.
This example removes the default pre-roll ad injection and instead creates a pre-roll break with three ads 45 seconds into the podcast. This would be used if, for example, you wanted to run a 45-second introduction in your podcast before cutting to your pre-roll ads. There is no "ignore=media-end" cue point, so the default single post-roll ad will be injected as expected.
<mediacaster>
<cuepoints ignore="media-start">
<cuepoint time="00:45" type="preroll_4"/>
</cuepoints>
</mediacaster>
See The Cue Point Format for more information on the correct formatting of comment metadata. Generally speaking, you can use the usage examples as a guide and simply modify them to suit your needs. Note that if other comments already exist in that tag, they can remain in place; the addition of the timing metadata does not affect them.
MP3 File Editors
There are a variety of tools that can be used to insert pseudo XML into the MP3 ID3v2 tag. It is important to make sure that the quotes (") used are not smart quotes (“), so it’s better to avoid “smart” editors like MS word.
Windows Explorer
In Microsoft Windows, it is suggested to simply use Windows explorer. Right click on a file, and select Properties. Then select the “Details” tab and click the “Comments” variable as shown in the image below.
The comments field in the Properties panel is small, so we recommend you write the metadata code in a plain text editor such as Notepad, then copy and paste it into the Comments field.
ID3Editor
ID3Editor is a tool available on both Windows and macOS operating systems.
http://www.pa-software.com/id3editor/
MP3Tag
MP3Tag is a tool available on both Windows and macOS operating systems.
https://www.mp3tag.de/en/mac-osx.html
Metadatics
Metadatics from Mark-V Apps is a tool available specifically for macOS.
Metadatics on the macOS App Store