Skip to main content

ytpodgen - turns YouTube live streams into podcasts

prerequisite

  • python3 and pip
  • docker(for dropcaster and yt-dlp)
  • rclone

first time setup

pip3 install --user ytpodgen

Set environment variable SLACK_WEBHOOK_URL, if you want Slack notification.

If you want to upload files as well, don't forget to configure rclone remote for Cloudflare R2. For now, remote name must be cloudflare and bucket name must be podcast.

examples

watch for new livestream, record it and generate podcast RSS in background

TITLE=<title>
LIVEURL=<liveurl> #youtube live url
HOSTNAME=<hostname> #hostname to serve files from
screen -dmS ${TITLE} ytpodgen --liveurl ${LIVEURL} --title ${TITLE} --hostname ${HOSTNAME}

Since this might take a while, I'm running this in background using screen.

Why not upload them as well!?

You can pass --upload argument to enable file uploadig to Cloudflare R2. By enabling it, mp3s/RSS are uploaded to Cloudflare R2.

For example, by running the commands below , you create a screen session that watches for YouTube livestream on the given URL and saves the data under current directory if there is a livestream.

TITLE=<title>
LIVEURL=<liveurl> #youtube live url
HOSTNAME=<hostname> #hostname to serve files from
screen -dmS ${TITLE} ytpodgen --upload --liveurl ${LIVEURL} --title ${TITLE} --hostname ${HOSTNAME}

I just want to generate RSS from mp3 files, no download/upload needed

TITLE=<title>
HOSTNAME=<hostname> #hostname to serve files from
ytpodgen --title ${TITLE} --hostname ${HOSTNAME}

This generates index.rss file under current directory.

how it works

(default)1. watch for and download YouTube live in mp4 format, then convert to mp3, with yt-dlp and ffmpeg (default)2. generate Podcast-compatible RSS file, with dropcaster (optional)3. upload RSS/mp3 files to S3-compatible storage, with rclone

TODO

Release files for ytpodgen 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ytpodgen 0.1.1
File Size Uploaded
ytpodgen-0.1.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ytpodgen 0.1.1
File Interpreter ABI Platform
ytpodgen-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / ytpodgen-0.1.1.tar.gz

Download URL ytpodgen-0.1.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a1f753da4358394c3d706013062edbb56ac3b3df1b1b7cde18c5c543fc9e5452
BLAKE2b-256 checksum
How to use checksums
99cd5336b5f2b2798e6b43cb396c7b2d25a6173aa52bc33809e5461ea0169f05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-67-generic

Release files / ytpodgen-0.1.1-py3-none-any.whl

Download URL ytpodgen-0.1.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
514895a50c16539ce4aaf14da81397e0cd8a6475cc647656d7ead75738dd7235
BLAKE2b-256 checksum
How to use checksums
bb5a7773975fa7a30abdcf98bb29a708522bd09ba9bb47150be9e8769b0a778c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-67-generic

Release history Release notifications | RSS feed

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page