SUMMARY: A MPEG-2 TS or Matroska file, with embedded DTS HD audio, is flagged as audio/vnd.dts.hd STEPS TO REPRODUCE: Download a .m2ts video that has embedded DTS HD audio, check with xdg-mime query filetype testfile.m2ts OBSERVED RESULTS The mimetype is shown as "audio/vnd.dts.hd". EXPECTED RESULTS The mimetype is shown as "video/mp2t" SOFTWARE/OS VERSIONS Neon Testing Plasma : 5.22.4 Frameworks : 5.85.0 Qt : 5.15.5 ADDITIONAL INFORMATION The same affects Matroska files with embedded DTS HD audio xdg-mime query filetype testfile.mkv shows a mimetype of "audio/vnd.dts.hd". Seems to be an issue with the "magic" for the DTS HD entry which has a priority "60" in freedesktop.org.xml, higher than that for MPEG-2 TS files (that have a priority of "50") or for Matroska files (that have the default priority of "50"), potentially also "application/x-matroska" and "video/webm" The container files, I suspect, need a higher priority than the DTS HD audio and the "video/x-matroska" entry should include sufficient "magic" so that a priority can be specified. If changing the priority of "video/x-matroska", the "application/x-matroska" and "video/webm" priorities may also need changing. I don't have test cases for the full range of formats. (Issue extracted from Bug 420939)
This doesn't look like a KDE-specific issue, probably better reported at freedesktop.org: https://freedesktop.org/wiki/Software/shared-mime-info/ Please reset the status back to "Reported" if you know it's KDE specific.
(In reply to Paul Worrall from comment #1) > ... better reported at freedesktop.org ... Done: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/167 It impacts KDE as baloo depends on the mimetype to work out whether it extracts video specific metadata.
See attachment, Synthetic test for video/mp2t https://bugs.kde.org/attachment.cgi?id=140645 This is a MPEG-2 TS file, zero'd out except for the bytes that flag that it was video/mp2t with embedded audio/vnd.dts.hd It should return a mimetype of video/mp2t but, seemingly depending on the Frameworks version, returns text/vnd.qt.linguist or audio/vnd.dts.hd It is an upstream issue, except for "which wrong mimetype" is returned. With Frameworks 5.85.0, returns text/vnd.qt.linguist, with 5.84.0, 5.83.0, 5.80.0, returns audio/vnd.dts.hd. Consider a curious edge case....
(In reply to tagwerk19 from comment #3) > It is an upstream issue... Patch... https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/0678d7c3e7384dde48f2f17059e54bef1507fd69 > With Frameworks 5.85.0, returns text/vnd.qt.linguist, with 5.84.0, 5.83.0, > 5.80.0, returns audio/vnd.dts.hd. Consider a curious edge case ... No, not as clear cut. Not correlated with version of Frameworks