Replace / customize the abos.txt:
P - Playlist, saves a whole playlist with index numbers
C - Channel, saves all new videos with date prepended
PC - PlaylistChannel, saves ALL Playlists of a Channel to subfolders
Number of Days to refresh. For Playlists and PlaylistChannels this is ignored / always all videos
Folder to save in - will be autocreated. For PlaylistChannels subfolders of the Playlists name will be created
For Playlists make sure to get the playlist?list= link
For Channels its recommended to use the channels /videos link
For PlaylistChannels use the channels /playlists link
You can change the options, but i use avc1 limited because my TVs hardly play 4k from YT:
-f bv*[vcodec^=avc1][ext=mp4]+ba*[ext=m4a]/b[ext=mp4]
You will surely need to alter the --cookies-from-browser path to your firefox profile or chrome, etc.
All human created subtitles are converted to .srt first, then embedded in the mkv.
Thumbnails will be embedded by default.
I use the archive function to speedup the parsing of video pages. If something goes awry just delete this archive.txt and/or the whole folder.
All videos will be cutted from the sponsorblock infos. Remember that these are maybe not accurate for very new and rare videos.
I run this service twice daily and usually all videos from widely known channels are correctly cut.
The supplied .service and .timer files are to use in ~/.config/systemd/user if you want to run this per user or /etc/systemd/user if running on the server. Both ConditionHost / User allow you to select further where this service should actually run.
I keep the script in ~/Videos/Youtube/yt-timeshift, if you keep it elsewhere fix the paths accordingly.
The .timer is a simple example how to run it twice daily at 8 AM / PM