Skip to content

feat(output): add thumbnail format setting so embedded cover art is readable - #832

Open
Phr33d0m wants to merge 6 commits into
jely2002:mainfrom
Phr33d0m:feature/thumbnail-format
Open

feat(output): add thumbnail format setting so embedded cover art is readable#832
Phr33d0m wants to merge 6 commits into
jely2002:mainfrom
Phr33d0m:feature/thumbnail-format

Conversation

@Phr33d0m

@Phr33d0m Phr33d0m commented Aug 8, 2026

Copy link
Copy Markdown

Why

I download YouTube videos as MKV with "Add cover image" enabled, but Dolphin (KDE Plasma) never showed the YouTube thumbnail as the file preview, just a random frame from the video.

The cover is embedded fine. It is embedded as cover.webp, and FFmpeg only treats an attachment as cover art when its mime type is jpeg/png/gif/tiff. I embedded the same image as webp, jpeg and png into otherwise identical files: only jpeg and png produced a thumbnail.

Nothing in the app could change this, since we let yt-dlp attach whatever the site served.

What this adds

A Thumbnail format setting (JPEG / PNG / Keep original) that passes --convert-thumbnails to yt-dlp.

It also changes the extension of files saved by "Save thumbnail file", because yt-dlp converts every thumbnail on disk, not just the embedded one. The hint text mentions this.

MP4 benefits too. yt-dlp converts webp to PNG there, which is much larger than JPEG and unreliable in Windows Explorer.

Default

Defaults to JPEG, so MKV covers start working and saved thumbnails become .jpg instead of .webp.

"Add cover image" is already on by default and currently produces a cover most software cannot read, so I treated this as a fix rather than a new preference. It is still a behaviour change though, so if you would rather default to "Keep original", say so and I will flip it.

Testing

cargo test 128 passed, npm run test:unit 131 passed, build/clippy/eslint clean.

Real download vs a control on current behaviour:

$ mkvmerge -J out.mkv          # setting on JPEG
  {'content_type': 'image/jpeg', 'file_name': 'cover.jpg', ...}
$ mkvmerge -J control.mkv      # current behaviour
  {'content_type': 'image/webp', 'file_name': 'cover.webp', ...}

Adds 7 backend and 4 frontend tests, updates 7 existing argument tests for the new default. English locale only, per CONTRIBUTING.

Screenshots

image

Disclosure

This PR and code have been AI generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant