Podcasting 2.0 Chapters, Transcripts and Funding Tags, and the Parser Traps Behind Them
A podcast is an RSS feed with an audio file in each item's enclosure. Everything else an app shows you, from chapter markers to a transcript to a "support the show" button, has to come from extra tags. The open option for those is the Podcasting 2.0 namespace, maintained by Podcast Index in the podcast-namespace repository and dedicated to the public domain.
Three of its tags were in the first batch formalized when the Phase 1 comment period closed on November 15, 2020: podcast:transcript, podcast:chapters and podcast:funding. They are the ones most worth adding to a feed, and also the ones a generic feed parser handles worst.
The namespace declaration
Everything starts on the rss element:
<rss version="2.0" xmlns:podcast="https://podcastindex.org/namespace/1.0">
The tag specification adds a few rules people skip. Clients must treat https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md as the same namespace, and they should accept prefixes other than podcast. And any URL pointing at a web resource must use https:, never http:.
Transcripts
podcast:transcript goes in an item and may appear more than once, one tag per format:
<podcast:transcript url="https://example.com/ep12/transcript.vtt" type="text/vtt"/>
<podcast:transcript url="https://example.com/ep12/transcript.srt" type="application/x-subrip" rel="captions"/>
url and type are required. language is optional and falls back to the channel's language. rel="captions" marks the file as closed captions with timecodes, whatever its MIME type says.
The format notes list WebVTT, HTML, JSON and SRT, and recommend WebVTT if you only make one. It plays in browsers through the <track> element, and its <v Name> voice spans carry speaker names. Apple Podcasts is the big reason to ship one. Its transcript help page says it ingests your own transcripts from the feed's transcript tag, accepts VTT or SRT, and uses VTT voice tags to label speakers. You also have to pick "Display transcripts I provide" in Podcasts Connect, or Apple keeps showing its own auto-generated text. Spotify is different. RSS.com's help docs say Spotify doesn't read transcripts from the feed and wants a .vtt uploaded in Spotify for Creators.
Chapters
podcast:chapters is a single tag per item that points at a separate JSON file:
<podcast:chapters url="https://example.com/ep12/chapters.json" type="application/json+chapters"/>
Keeping chapters outside the MP3 means you can fix a typo or a timestamp after publishing without re-uploading audio, and web players that can't read ID3 tags still get them. The JSON chapters format needs only two properties: version as a string and a chapters array. Each chapter needs startTime in seconds as a number. title, img, url, endTime, location and toc are optional, and "toc": false makes a silent chapter that changes artwork without showing up in the list. Chapters are assumed to be in ascending startTime order.
Two details trip people up. The tag spec asks for the type application/json+chapters, but the repository's own example.xml uses plain application/json, so a reader should accept both. And the format doc warns that chapter images and links are fetched at play time, which can be used for tracking. It suggests apps ask the listener before trusting a show's chapter content.
A short check catches the usual mistakes, a number sent as a string and chapters out of order:
import json, sys
doc = json.load(open(sys.argv[1]))
problems = []
if not isinstance(doc.get("version"), str):
problems.append("version missing or not a string")
chapters = doc.get("chapters")
if not isinstance(chapters, list):
problems.append("chapters missing or not an array")
chapters = []
last = -1.0
for i, ch in enumerate(chapters):
start = ch.get("startTime")
if not isinstance(start, (int, float)) or isinstance(start, bool):
problems.append(f"chapter {i}: startTime missing or not a number")
continue
if start < last:
problems.append(f"chapter {i}: starts at {start}, before the previous chapter")
last = start
print("\n".join(problems) or f"ok, {len(chapters)} chapters")
Run against the spec's example.json it prints ok, 9 chapters. Fed a file with "version": 1.2, a "startTime": "02:48" and a chapter at 260 seconds after one at 410, it flags all three.
Funding
podcast:funding can sit in the channel, an item or a podcast:liveItem, as many times as you like. The url attribute is where the button goes. The text inside is the button label, and the spec asks you to keep it under 128 characters or aggregators may cut it.
<podcast:funding url="https://example.com/members">Become a member</podcast:funding>
What a generic parser does with them
This is where generic tooling falls short. We ran a small test feed through Python's feedparser 6.0.14, a widely used feed library. The item had a VTT and an SRT transcript, a chapters tag and a funding tag. Three things happened:
| Feed content | What feedparser returned |
|---|---|
Two podcast:transcript tags | Only the last one, the SRT. The VTT was gone. |
podcast:funding with label text | The url only. The label was dropped. |
Same feed with the prefix pc: instead of podcast: | Keys renamed to pc_transcript, pc_chapters, pc_funding |
So code that reads entry.podcast_transcript silently loses transcripts in any feed that lists more than one format, and finds nothing at all in a valid feed that picked a different prefix. Matching on the namespace URI fixes all three. This version, using only the standard library, returned both transcripts and both funding labels for either prefix:
import sys
import xml.etree.ElementTree as ET
NS = "https://podcastindex.org/namespace/1.0"
ALT = "https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md"
def pod(el, name):
return el.findall(f"{{{NS}}}{name}") + el.findall(f"{{{ALT}}}{name}")
channel = ET.parse(sys.argv[1]).getroot().find("channel")
for f in pod(channel, "funding"):
print("show funding:", f.get("url"), "|", (f.text or "").strip())
for item in channel.findall("item"):
print("item:", item.findtext("title"))
for t in pod(item, "transcript"):
print(" transcript:", t.get("type"), t.get("url"), t.get("rel") or "")
for c in pod(item, "chapters"):
print(" chapters:", c.get("type"), c.get("url"))
for f in pod(item, "funding"):
print(" funding:", f.get("url"), "|", (f.text or "").strip())
The header browser players need
Transcript and chapter files are fetched separately from the feed, and often by JavaScript in a web player on someone else's domain. The transcript notes call out that these files need CORS headers. We checked it in Chromium: a page on one origin fetching a .vtt from another got Failed to fetch when the server sent no Access-Control-Allow-Origin, and the file's text once it did. Check your own files like this:
curl -sI -H "Origin: https://player.example" https://example.com/ep12/transcript.vtt \
| grep -i -E 'content-type|access-control-allow-origin'
You want text/vtt and an Access-Control-Allow-Origin line back. Transcripts and chapters are public files by design, so * is a reasonable value. Serve them with the same caching headers as the feed, since apps will re-request them.
If you publish a show, the order of work is simple. Add a VTT transcript, then a chapters file, then a funding link, and test each URL with curl before the feed points at it. If you build a reader, read these tags by namespace URI and keep every repeated tag.