Skip to main content

turns YouTube live streams into podcasts

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ytpodgen-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

ytpodgen-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file ytpodgen-0.1.1.tar.gz.

File metadata

  • Download URL: ytpodgen-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-67-generic

File hashes

Hashes for ytpodgen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a1f753da4358394c3d706013062edbb56ac3b3df1b1b7cde18c5c543fc9e5452
MD5 de4180c460d73d104b15b549f2c8db46
BLAKE2b-256 99cd5336b5f2b2798e6b43cb396c7b2d25a6173aa52bc33809e5461ea0169f05

See more details on using hashes here.

File details

Details for the file ytpodgen-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ytpodgen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-67-generic

File hashes

Hashes for ytpodgen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 514895a50c16539ce4aaf14da81397e0cd8a6475cc647656d7ead75738dd7235
MD5 6ca06bcdf519ca7a8f51acffc938db72
BLAKE2b-256 bb5a7773975fa7a30abdcf98bb29a708522bd09ba9bb47150be9e8769b0a778c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page