yb.podcast.publish

Assemble a publishable podcast episode from a media file.

Produces the per-episode asset bundle in an output directory: an MP3 (with ID3 chapters embedded), show-notes text, a PSC chapter sidecar, a chapters JSON, and optionally a cover-over-audio video for video platforms. Delivery to a host/Spotify is via RSS (yb.podcast.feed) — this prepares the assets and a ready-to-use yb.podcast.feed.EpisodeFeedItem stub.

class yb.podcast.publish.PodcastEpisode(audio: Path, show_notes: Path, chapters_psc: Path | None = None, chapters_json: Path | None = None, cover_video: Path | None = None, content: PublicationContent | None = None, extras: dict = <factory>)[source]

Paths to the generated episode assets.

yb.podcast.publish.prepare_podcast_episode(media: str | Path, output_dir: str | Path, *, content: PublicationContent | None = None, audio: str | Path | None = None, cover_image: str | Path | None = None, make_cover_video: bool = False, ken_burns: bool = False, embed_chapters: bool = True, language: str = 'English', brand: str | None = None, extra_context: str | None = None, audio_bitrate: str = '192k') PodcastEpisode[source]

Build a podcast episode bundle from media into output_dir.

Parameters:
  • media – Source audio or video.

  • output_dir – Directory to write the episode assets into.

  • content – Precomputed PublicationContent; built via yb.content.prepare_content() when omitted.

  • audio – Explicit episode audio. When omitted, media is used if it is audio, else its audio track is extracted to MP3.

  • cover_image – Cover art (required for make_cover_video).

  • make_cover_video – Also render a cover-over-audio mp4 (e.g. for YouTube).

  • ken_burns – Apply a Ken Burns pan/zoom to the cover video.

  • embed_chapters – Embed ID3 chapter frames into the episode MP3.

  • extra_context (language / brand /) – Forwarded to prepare_content.

  • audio_bitrate – Bitrate for extracted MP3 audio.

Returns:

A PodcastEpisode with the asset paths.