ytpodgen - turns YouTube live streams into podcasts
prerequisite
- python3 and pip
- docker(for
dropcasterandyt-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
- use
boto3for uploading files - package this app using
setuptoolsso that I can install this usingpip- example https://github.com/aws/aws-elastic-beanstalk-cli
- install under
~/.local/bin/and~/.local/share/ytpodgen/ - either Fire or Click
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)
| File | Size | Uploaded | |
|---|---|---|---|
| ytpodgen-0.1.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|