Bug 509991 - Dolphin does not load thumbnails in webp format embedded in mkv file
Summary: Dolphin does not load thumbnails in webp format embedded in mkv file
Status: REPORTED
Alias: None
Product: ffmpegthumbs
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-27 10:40 UTC by Michał Walenciak
Modified: 2025-11-28 21:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
mkv with jpeg, mkv with webp and screenshot (2.20 MB, application/gzip)
2025-09-27 18:12 UTC, Michał Walenciak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Walenciak 2025-09-27 10:40:41 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Dolphin will not load and use thumbnails embedded in an mkv file for preview, if these are in webp format.

STEPS TO REPRODUCE
1. Create an mkv file with webp file embedded as thumbnail
2. Open containing directory with dolphin.

OBSERVED RESULT
Dolphin will not use embedded thumbnail, but will generate own one.

EXPECTED RESULT
Dolphin should use embedded thumbnail

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version:  6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
None
Comment 1 Nicolas Fella 2025-09-27 13:10:17 UTC
Can you share an affected file with us?
Comment 2 Michał Walenciak 2025-09-27 18:12:04 UTC
Created attachment 185326 [details]
mkv with jpeg, mkv with webp and screenshot
Comment 3 Nicolas Fella 2025-09-27 19:14:57 UTC
Thanks. How did you create the file?

as far as I can tell there is a stream with a webp image inside, but it doesn't have the correct content disposition (AV_DISPOSITION_ATTACHED_PIC) so the thumbnailer code doesn't use it.

See https://invent.kde.org/multimedia/ffmpegthumbs/-/blob/master/ffmpegthumbnailer.cpp?ref_type=heads#L110
Comment 4 Michał Walenciak 2025-09-28 05:50:52 UTC
(In reply to Nicolas Fella from comment #3)
> Thanks. How did you create the file?
> 
> as far as I can tell there is a stream with a webp image inside, but it
> doesn't have the correct content disposition (AV_DISPOSITION_ATTACHED_PIC)
> so the thumbnailer code doesn't use it.
> 
> See
> https://invent.kde.org/multimedia/ffmpegthumbs/-/blob/master/
> ffmpegthumbnailer.cpp?ref_type=heads#L110

these files were created with mkvtoolnix-gui tool, but the original files I have problems with are being created with yt-dlp (invoked with --embed-thumbnail option). 
When I use it to download playlist I can clearly see that all movies with webp thumbnail do not get it in dolphin, while jpeg thumbnails are fine.
Comment 5 Michał Walenciak 2025-09-28 06:09:55 UTC
I played a bit with 'mkvpropedit', 'ffprobe' and 'mkvmerge -J' and I can confirm that for webp thumbnails 'attached_pic' disposition is not set, but from the other side I found no way to set it for webp files.
Comment 6 Nicolas Fella 2025-09-28 20:19:39 UTC
Looking at https://www.matroska.org/technical/attachments.html it says 

> Only JPEG and PNG image formats SHOULD be used for cover art pictures.

Given that and the lack of AV_DISPOSITION_ATTACHED_PIC in your file makes me think it's unlikely that we can/will fix this for your file
Comment 7 John 2025-11-28 21:26:45 UTC
(In reply to Nicolas Fella from comment #6)
> Looking at https://www.matroska.org/technical/attachments.html it says 
> 
> > Only JPEG and PNG image formats SHOULD be used for cover art pictures.
> 
> Given that and the lack of AV_DISPOSITION_ATTACHED_PIC in your file makes me
> think it's unlikely that we can/will fix this for your file

I think somebody needs to contact the developers / maintainers of the Matroska specification.
Maybe Moritz Bunkus (the developer of MKVToolnix) is one of them or knows how to contact them, to ask them to support also these newer image formats, like:
Webp, Avif, JPEG-XL.
They can't use forever just those old image formats, without wide color formats, HDR support.
I bet even the AV1 or VVC video codecs were not supported from day one and they were added later.
They can do the same for image formats too.