Skip to content

Instantly share code, notes, and snippets.

@chasetb
Created October 1, 2024 15:38
Show Gist options
  • Save chasetb/e4e4532c6779b04acb9470f8eac3d5cd to your computer and use it in GitHub Desktop.
Save chasetb/e4e4532c6779b04acb9470f8eac3d5cd to your computer and use it in GitHub Desktop.
ytdl-sub config file that better matches the naming convention of Jellyfin
# Bare-bones config. Here are some useful links to get started:
# Walk-through Guide: https://ytdl-sub.readthedocs.io/en/latest/guides/index.html
# Config Examples: https://github.com/jmbannon/ytdl-sub/tree/master/examples
# Prebuilt Presets: https://ytdl-sub.readthedocs.io/en/latest/prebuilt_presets/index.html
# Config Reference: https://ytdl-sub.readthedocs.io/en/latest/config_reference/index.html
#
# The subscriptions in `subscriptions.yaml` uses prebuilt presets which do not require
# any additions to this config. They can be downloaded using the command:
#
# ytdl-sub --config config.yaml sub subscriptions.yaml
#
# Or dry-ran with:
#
# ytdl-sub --dry-run --config config.yaml sub subscriptions.yaml
#
# See the documentation above on how to build your own custom presets.
#
configuration:
working_directory: ".ytdl-sub-working-directory"
presets:
###############################################################################
# Set tv_show_directory here instead of in the subscriptions file
tv_show_paths:
overrides:
tv_show_directory: "/tv_shows"
###############################################################################
# Filter out any YouTube shorts
no_shorts:
match_filters:
filters:
- "original_url!*=/shorts/"
###############################################################################
# Remove all the following sponsorblock sections
sponsorblock:
chapters:
sponsorblock_categories:
# - "intro"
# - "outro"
# - "selfpromo"
# - "preview"
- "interaction"
- "sponsor"
- "music_offtopic"
remove_sponsorblock_categories: "all"
force_key_frames: False
###############################################################################
# Wait 2 days before downloading in hopes to get more accurate sponsorblock
sponsorblock_wait:
# Import the sponsorblock preset defined above
preset:
- "sponsorblock"
date_range:
before: "today-2days"
#############################################################################
# Playlist preset
playlist_preset_ex:
download: "{url}"
output_options:
output_directory: "{output_directory}/{playlist_name}"
file_name: "{playlist_name}.{title}.{ext}"
###############################################################################
# base preset to use on all TV Show-based subscriptions
base:
preset:
- "Jellyfin TV Show by Date" # Set intended player
- "best_video_quality" # prebuilt preset to get best quality in a .mkv file
- "no_shorts"
- "sponsorblock"
- "chunk_initial_download"
- "tv_show_paths"
overrides:
episode_file_name: "{tv_show_name}.S{season_number_padded}E{episode_number_padded}.{title_sanitized}"
# Embed chapters into video files
chapters:
embed_chapters: True
# Embed English subtitles into video files (supports more)
subtitles:
embed_subtitles: True
languages:
- "en"
allow_auto_generated_subtitles: True
# ytdl_options lets you pass any arg into yt-dlp's Python API
ytdl_options:
merge_output_format: "mkv"
# max_downloads: 20
# For YouTube, get English metadata if multiple languages are present
extractor_args:
youtube:
lang:
- "en"
###############################################################################
# Custom preset to archive an entire channel
Custom Jellyfin:
preset:
- "base"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment