tubesync
tubesync copied to clipboard
Disable Thumbnail Resize
It would be great if there was a way to disable thumbnail resizing.
Resizing 1280x720 thumbnail to 430x240
I can afford the space to save a 720p thumbnail for every video, gimping it to 240p is not necessary or ideal.
Given this is likely to be quite a rare choice and if you index a large channel you might use gigabytes just for thumbnails would an environment variable work as a setting for you? Something like:
TUBESYNC_THUMBNAIL_SIZE=1280x720
Note it would be up to you to make sure the image was the same aspect ratio otherwise the thumbnails on the UI might look a bit distorted.
This would be great to have. Seems jellyfin doesn't play nice with either the size or the conversion to jpg. I'm getting black bars on some thumbnails. Right now I'm testing changing the size in the settings.py but it would be nice to have it skip the resize and conversion to jpg.
Another option might be if we could choose between downloading the maxresdefault.webp or sddefault.webp without resizing seems when using yt-dlp I normally just get maxresdefault.webp.
The black bars issue is generally due to yt-dlp
impersonating a mobile client and then downloading the mobile thumbnail, which often contains the black bars. Having said that, this changes quite frequently so I'll recheck this issue now as there might be a more sensible default option (such as the maxresdefault.webp
file) to use now than there was two years ago. I can likely just switch to webp
now by default and skip the encoding to jpg
all together.
I did some more testing last night with the script I currently use (pasted below) Some of the thumbnails it grabs have the black bars as well but Jellyfin ignores them. Possibly because of the webp format? I know this use case is a bit out of scope for your project so I appreciate you taking a look.
#!/bin/sh
#TheFrenchGhosty's Ultimate YouTube-DL Scripts Collection: The ultimate collection of scripts for YouTube-DL
#/https://github.com/TheFrenchGhosty/TheFrenchGhostys-Ultimate-YouTube-DL-Scripts-Collection
#https://github.com/TheFrenchGhosty
#Version: 3.2.2
yt-dlp --cookies-from-browser firefox --format "(bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best)" --verbose --force-ipv4 --sleep-requests 1 --sleep-interval 5 --max-sleep-interval 30 --ignore-errors --no-continue --no-overwrites --download-archive archive.log --add-metadata --parse-metadata "%(title)s:%(meta_title)s" --parse-metadata "%(uploader)s:%(meta_artist)s" --write-description --write-info-json --write-annotations --write-thumbnail --embed-thumbnail --check-formats --concurrent-fragments 5 --match-filter "!is_live & !live" --output "%(playlist)s - (%(uploader)s)/%(upload_date)s - %(title)s/%(upload_date)s - %(title)s [%(id)s].%(ext)s" --merge-output-format "mkv" --datebefore "$(date --date="0 days ago" +%Y%m%d)" --throttled-rate 100K --batch-file "Source - Playlists.txt" 2>&1 | tee output.log
Yes, that's just due to using webp
without converting it.