Skip to content

Downloading using youtube dl

Ethan Marshall edited this page Apr 16, 2022 · 1 revision

Podbit supports the downloading of podcast entries from arbitrary sources using HTTP by default. However, podbit can also download using any detected external YouTube download helper on the system. This guide explains how to use this feature of podbit.

YouTube podcast entries

Podbit detects YouTube podcast entries from the queue file by the entry beginning with a leading '+'. Note that althought these podcasts are referred to as "YouTube podcasts", this does not mean that they must come from YouTube. youtube-dl supports downloading from several video sites and other sites in general, including from sites which simply include a video file. So, to extract a podcast episode from an arbitrary URL, simply preface the queue file entry with a '+' symbol. So, for example:

+https://youtube.com/watch?v=dQw4w9WgXcQ "/home/user/.local/share/podcasts/watch?v=dQw4w9WgXcQ"

In my personal scripts, I have a script called lqueue which simply contains the following:

#!/bin/sh
echo "+$1 \"$PODDIR/$(basename $1)\"" >> $XDG_DATA_HOME/newsboat/queue

This simply queues a YouTube podcasts for podbit to download to $PODDIR (my podcast download directory) formatted as required by podbit.

Download tools

Podbit currently supports downloading using the following two external tools:

  1. youtube-dl
  2. yt-dlp

Podbit will select whichever is present, but will prefer the latter if present.

NOTE: Due to maintainence issues with upstream youtube-dl (not yt-dlp), streams downloaded using the former will be significantly slower and have a lower bitrate than the latter. This is not an issue in podbit. Please open issues upstream.

Podbit will download the video from the passed URL and extract the best audio, before encoding to a well-supported codec (mp3) and writing audio metadata to show in the UI. This could take some time, so do not panic when your YouTube podcast has stopped on "In Progress" at 100% - it is simply undergoing the re-encode process.

Known issues

If a download is cancelled, the download tool may leave a certain amount of temporary files in your home folder. These are safe to delete and were just temporary during the download that your tool isn't cleaning up properly (again, please open upstream).

Clone this wiki locally