Skip to main content

Create podcast RSS from youtube-dl info JSON.

Project description

Build Status Coverage Dependency Status Documentation Status Python Versions Version on PyPI

Create podcast RSS of media downloaded from YouTube, Vimeo, Twitch or any other site supported by youtube-dl (or yt-dlc, yt-dlp, or other forks).

Introductory Example

To create an audio podcast from videos in GoogleTechTalks Make the Web Faster playlist:

youtube-dl --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
ytdl2rss *.info.json >podcast.rss

Features

  • Attempts to produce RSS which complies with guidelines from:

Installation

This package can be installed using Python package managers (pip, pipx, uv, conda, pixi, etc.), in the usual ways. For example, by running:

pip install ytdl2rss

Or by saving src/ytdl2rss/__init__.py as ytdl2rss.py in $PATH and, on Unix-like platforms, making it executable (chmod +x ytdl2rss.py).

Recipes

Periodic Updates

A podcast can be periodically updated by running youtube-dl and ytdl2rss from cron. Using --download-archive is recommended. For example, to update the introductory example daily at 5 a.m., the following can be added to crontab:

0 5 * * * cd path/to/podcast && youtube-dl --download-archive ytdl-archive.txt --write-info-json --no-clean-info-json -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4 && ytdl2rss *.info.json >|podcast.rss

Hosted Thumbnails

Episode thumbnail images can be hosted alongside downloaded media, so podcatchers will not download them from the original host, by using --write-thumbnail and modifying the .info.json files to use the downloaded thumbnails:

youtube-dl --write-info-json --no-clean-info-json --write-thumbnail -f bestaudio https://www.youtube.com/playlist?list=PLE0E03DF19D90B5F4
for info in *.info.json; do
    jq --arg t "${info%.info.json}.webp" '.thumbnail = $t' "$info" >"$info.new"
    mv -f "$info.new" "$info"
done
ytdl2rss *.info.json >podcast.rss

See contrib/ytdl-thumbnails.sh for an example that includes conversion from WebP to JPEG.

Podcast Metadata

In addition to JSON for individual videos, ytdl2rss accepts JSON for playlists (produced by youtube-dl --print-json for channel/playlist/user URLs). This can be used to define a podcast metadata not currently saved by youtube-dl, such as a description, thumbnail, and webpage URL. To combine info JSON into a playlist with custom metadata:

jq -s \
    --arg desc "My awesome podcast." \
    --arg thumb "channel_thumbnail.jpg" \
    --arg url "http://example.com/podcast-home.html" \
    '{
  _type: "playlist",
  entries: .,
  # Copy playlist metadata from info for first video
  id: .[0].playlist_id,
  title: .[0].playlist_title,
  uploader: .[0].playlist_uploader,
  uploader_id: .[0].playlist_uploader_id,
  # Add custom playlist metadata
  webpage_url: $url,
  description: $desc,
  thumbnail: $thumb
}' ./*.info.json | ytdl2rss - >|podcast.rss

See contrib/ytdl-playlist-meta.sh for an example which gets playlist metadata from Open Graph Metadata in the playlist HTML.

Documentation

The project documentation is hosted on Read the Docs. See the CLI documentation for command-line options and usage, and the API documentation for the Python API.

Contributing

Contributions are welcome and appreciated! See the contributing guidelines for recommendations.

Alternatives

If you are looking for an all-in-one podcast media download, conversion, and hosting tool, you may be interested in:

License

This project is available under the terms of the Unlicense, like youtube-dl, yt-dlc, yt-dlp, or other forks. See the summary at TLDRLegal.

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

ytdl2rss-0.1.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytdl2rss-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file ytdl2rss-0.1.0.tar.gz.

File metadata

  • Download URL: ytdl2rss-0.1.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ytdl2rss-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7e817ad8b3e74574802798b46a0573dc5ddbe7506ab7e1225571001acdb7edd
MD5 b358cbb40a17974dd9c8a1bc0893e777
BLAKE2b-256 8795e0730e54a280eeac19ad5e2a17d4b22ba5d6f323044c8948e453d049adbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytdl2rss-0.1.0.tar.gz:

Publisher: release.yml on kevinoid/ytdl2rss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ytdl2rss-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ytdl2rss-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ytdl2rss-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 759365ae01d68ec10cd19e85949e7defde4ab5bb92fec10361ccb4e0c789c9c2
MD5 6c4b6a23fa715095847a36c1798767f5
BLAKE2b-256 d42c0c1e5a9d04fe3e8f9dc6414807ed483a5eabe41f06a52ce1fd3f7259debd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytdl2rss-0.1.0-py3-none-any.whl:

Publisher: release.yml on kevinoid/ytdl2rss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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