Storing config options for yt-dlp in a config file
I should probably file this under “read the fantastic man page”.
I am using yt-dlp
and jellyfin as a media server setup.
I recently added ytdl-sub
to automate downloads from YouTube, from pre-defined channels.
And it all works well. Really well.
Except for playback on Apple devices.
It turns out that the default download format is .webm, and Apple devices - iOS / iPadOS / tvOS, at least - seem to struggle with this, or else be incapable of playing it, forcing transcoding.
There are command line options for yt-dlp
to specify downloading another format (e.g. mp4), and it finally dawned on me that there must be a way of passing options to it when using it non-interactively.
And there is: the config file
I added a config file in the same directory as my yt-dlp
binary. (If you are not sure what that is, then which yt-dlp
should help.)
I’ve added:
-f mp4 --sponsorblock-remove "default"
So far, this has worked, but I am not sure what (if anything) is going to happen if I were to try to download a video for which there was not a .mp4 version. I presume it will fail, but I’ve yet to try it.
I could also look at transcoding files which arrive as webm.
You may also like:
- I went to the cinema. It sucked
- YouTube (and other video sites) without the irritations: integrating yt-dlp and jellyfin, with a web interface
- A working wireless plug-and-play display solution for Linux laptops (and others OSs)
- Replacing the thermal paste on my laptop
- Downloading YouTube subscriptions and channels automatically
- Improving my laptop's battery with TLP
- Stopping music in my office automatically when I get a phone call or join an audio/video call
- Will I ever buy a new laptop again? Why would I?
- Adding an Internet radio stream (such as RadioFreeFedi) to mpd
- Getting the Sierra Wireless EM7455 LTE modem working in a ThinkPad with Debian 12 Linux (with GPS)
- Fixing dropbear-initramfs '/scripts/init-premount/dropbear: cat: not found' error
- Keeping bash history in sync using atuin and a self-hosted sync server
- Very initial thoughts on the Xreal companion 'Beam' device
- Keyboard shortcut for adding random albums to the playlist in ncmpcpp
- This is a test post