Bug 418290 - .m4a AAC audio files are classed as videos
Summary: .m4a AAC audio files are classed as videos
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kfilemetadata
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.67.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-28 14:20 UTC by Paul McAuley
Modified: 2020-03-29 00:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
output of baloo_filemetadata_temp_extractor "09 Lights & Thunder.m4a" > /tmp/kfm_m4a.bin (145 bytes, application/octet-stream)
2020-03-20 19:05 UTC, Paul McAuley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul McAuley 2020-02-28 14:20:37 UTC
On the left-pane click on Search For -> Videos. As well as seeing videos, I also see numerous .m4a AAC audio files.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.2
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 1 Julian Steinmann 2020-03-08 19:48:04 UTC
Can confirm, but that's probably an issue in KIO (or maybe KFileMetaData, or Baloo).
Comment 2 Stefan Brüns 2020-03-20 18:19:46 UTC
Please provide the output of

$> balooshow -x <affected_file>.m4a

and attach /tmp/kfm_m4a.bin after running:

$> baloo_filemetadata_temp_extractor <affected_file>.m4a > /tmp/kfm_m4a.bin
Comment 3 Paul McAuley 2020-03-20 19:05:52 UTC
Created attachment 126914 [details]
output of baloo_filemetadata_temp_extractor "09 Lights & Thunder.m4a" > /tmp/kfm_m4a.bin

paul@PAUL-DELL:~/Music/Synced/Gareth Emery/Drive> balooshow -x "09 Lights & Thunder.m4a"
198612172668980 52 46243 09 Lights & Thunder.m4a [/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a]
        Mtime: 1532717424 2018-07-27T19:50:24
        Ctime: 1581093822 2020-02-07T16:43:42
        Cached properties:
                Bitrate: 126626
                Duration: 281
                Genre: Electronica
                Track Number: 9
                Comment: 
                Album: Drive
                Title: Lights & Thunder

Internal Info
Terms: Mmp4 Mvideo T3 Tvideo X1-126626 X10-drive X15-lights X15-thunder X3-281 X4-electronica X6-9 drive electronica lights thunder 
File Name Terms: 09 F09 Flights Fm4a Fthunder lights m4a thunder 
XAttr Terms: 
trackNumber: 9
genre: electronica
duration: 281
bitRate: 126626
title: lights thunder
album: drive
Comment 4 Paul McAuley 2020-03-20 19:08:35 UTC
This .m4a file was created using MediaCoderx64 on Windows with FAAC CODEC, if that is of any help.
Comment 5 Stefan Brüns 2020-03-20 22:06:17 UTC
Please check the output of
$>xdg-mime query filetype <path>

If that returns 'audio/...', try running

$> balooctl clear <path>
$> QT_LOGGING_RULES='kf5.*=true' balooctl index <path>

and check the output of balooshow again.
Comment 6 Stefan Brüns 2020-03-20 22:07:37 UTC
Also:
$> head -c 160 <path>  | hexdump -C
Comment 7 Paul McAuley 2020-03-20 23:35:25 UTC
The clear command did not seem to work:


paul@PAUL-DELL:~/Music/Synced/Gareth Emery/Drive> xdg-mime query filetype "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"      audio/mp4
paul@PAUL-DELL:~/Music/Synced/Gareth Emery/Drive> balooctl clear "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"
mdb.c:2071: Assertion 'rc == 0' failed in mdb_page_dirty()
Aborted (core dumped)
paul@PAUL-DELL:~/Music/Synced/Gareth Emery/Drive> QT_LOGGING_RULES='kf5.*=true' balooctl index "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"
Skipping: /home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a Reason: Already indexed
File(s) indexed
paul@PAUL-DELL:~/Music/Synced/Gareth Emery/Drive> head -c 160 "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a" | hexdump -C
00000000  00 00 00 18 66 74 79 70  6d 70 34 32 00 00 00 00  |....ftypmp42....|
00000010  6d 70 34 32 69 73 6f 6d  00 43 4f ba 6d 64 61 74  |mp42isom.CO.mdat|
00000020  de 04 00 00 6c 69 62 66  61 61 63 20 31 2e 32 38  |....libfaac 1.28|
00000030  00 00 42 55 1f ff ff 9d  ff fe 89 04 61 81 30 50  |..BU........a.0P|
00000040  46 14 0c 05 82 83 60 90  54 24 41 a1 e3 95 b8 4a  |F.....`.T$A....J|
00000050  e7 cc ce 7e 3e bc 6b cf  3e 7e 78 c6 a5 26 44 eb  |...~>.k.>~x..&D.|
00000060  1d 42 e0 21 6d 6a d1 fa  bb f5 17 7d df b7 1f 6e  |.B.!mj.....}...n|
00000070  7f f7 e9 8f cf fc e0 c3  4b 61 fd 78 cb 1f c6 e9  |........Ka.x....|
00000080  12 6d 25 bf 13 97 56 49  ff f9 bb 05 8f 0f b7 da  |.m%...VI........|
00000090  e0 47 ba 4d f5 07 c5 f1  7c ff a0 6d 7f 8f f1 f1  |.G.M....|..m....|
000000a0
Comment 8 Stefan Brüns 2020-03-21 01:38:24 UTC
Older versions of baloo did not determine the mime type correctly under some circumstances, so that probably is the reason you ended up with a wrong mimetype in your DB.

Unfortunately, your DB shows internal corruption, so it is no longer possible to update it.

Please rebuild your DB by running
$> balooctl purge
Comment 9 Paul McAuley 2020-03-29 00:10:38 UTC
OK, it seems to clear and index again now. I think my Baloo has also be updated. I am now on Frameworks 5.68.0.


paul@PAUL-DELL:~> balooctl clear "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"
Clearing /home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a
File(s) cleared
paul@PAUL-DELL:~> QT_LOGGING_RULES='kf5.*=true' balooctl index "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"
kf5.kfilemetadata: Searching for extractors: "/usr/lib64/qt5/plugins/kf5/kfilemetadata"
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.epubextractor","MimeTypes":{"application/epub+zip":{"Version":"0.0"}},"Name":"EpubExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.exiv2extractor","MimeTypes":{"image/bmp":{"version":"0.0"},"image/gif":{"version":"0.0"},"image/jp2":{"version":"0.0"},"image/jpeg":{"version":"0.0"},"image/pgf":{"version":"0.0"},"image/png":{"version":"0.0"},"image/tiff":{"version":"0.0"},"image/webp":{"enabled":"1","version":"0.0"},"image/x-canon-cr2":{"version":"0.0"},"image/x-canon-crw":{"version":"0.0"},"image/x-exv":{"version":"0.0"},"image/x-fuji-raf":{"version":"0.0"},"image/x-minolta-mrw":{"version":"0.0"},"image/x-nikon-nef":{"version":"0.0"},"image/x-olympus-orf":{"version":"0.0"},"image/x-panasonic-rw2":{"version":"0.0"},"image/x-pentax-pef":{"version":"0.0"},"image/x-photoshop":{"version":"0.0"},"image/x-samsung-srw":{"version":"0.0"},"image/x-tga":{"version":"0.0"}},"Name":"Exiv2Extractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.ffmpegextractor","MimeTypes":{"video/mp2t":{"Version":"0.0"},"video/mp4":{"Version":"0.0"},"video/mpeg":{"Version":"0.0"},"video/ogg":{"Version":"0.0"},"video/quicktime":{"Version":"0.0"},"video/webm":{"Version":"0.0"},"video/x-flv":{"Version":"0.0"},"video/x-matroska":{"Version":"0.0"},"video/x-ms-asf":{"Version":"0.0"},"video/x-ms-wmv":{"Version":"0.0"},"video/x-msvideo":{"Version":"0.0"}},"Name":"FFMpegExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.odfextractor","MimeTypes":{"application/vnd.oasis.opendocument.presentation":{"Version":"0.0"},"application/vnd.oasis.opendocument.spreadsheet":{"Version":"0.0"},"application/vnd.oasis.opendocument.text":{"Version":"0.0"}},"Name":"OdfExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.office2007extractor","MimeTypes":{"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"Version":"0.0"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"Version":"0.0"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"Version":"0.0"}},"Name":"Office2007Extractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.officeextractor","MimeTypes":{"application/msword":{"HasRuntimeDependency":"1","Version":"0.0"},"application/vnd.ms-excel":{"HasRuntimeDependency":"1","Version":"0.0"},"application/vnd.ms-powerpoint":{"HasRuntimeDependency":"1","Version":"0.0"}},"Name":"OfficeExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.plaintextextractor","MimeTypes":{"text/plain":{"Version":"0.0"}},"Name":"PlaintextExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.poextractor","MimeTypes":{"text/x-gettext-translation":{"Version":"0.0"}},"Name":"PoExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.popplerextractor","MimeTypes":{"application/pdf":{"Version":"0.0"}},"Name":"PopplerExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.postscriptdscextractor","MimeTypes":{"application/postscript":{"Version":"0.0"},"image/x-eps":{"Version":"0.0"}},"Name":"PostscriptDSCExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.taglibextractor","MimeTypes":{"audio/flac":{"Version":"0.0"},"audio/mp4":{"Version":"0.0"},"audio/mpeg":{"Version":"0.0"},"audio/mpeg3":{"Version":"0.0"},"audio/ogg":{"Version":"0.0"},"audio/opus":{"Version":"0.0"},"audio/speex":{"Version":"0.0"},"audio/wav":{"Version":"0.0"},"audio/x-aifc":{"Version":"0.0"},"audio/x-aiff":{"Version":"0.0"},"audio/x-ape":{"Version":"0.0"},"audio/x-mpeg":{"Version":"0.0"},"audio/x-ms-wma":{"Version":"0.0"},"audio/x-musepack":{"Version":"0.0"},"audio/x-opus+ogg":{"Version":"0.0"},"audio/x-speex+ogg":{"Version":"0.0"},"audio/x-vorbis+ogg":{"Version":"0.0"},"audio/x-wav":{"Version":"0.0"},"audio/x-wavpack":{"Version":"0.0"}},"Name":"TaglibExtractor"})
kf5.kfilemetadata: Found plugin with metadata: QJsonObject({"Id":"org.kde.xmlextractor","MimeTypes":{"application/xml":{"Version":"0.0"},"image/svg":{"Version":"0.0"},"image/svg+xml":{"Version":"0.0"}},"Name":"XmlExtractor"})
kf5.kfilemetadata: Searching for extractors: "/usr/bin/kf5/kfilemetadata"
kf5.kfilemetadata: Searching for external extractors: "/usr/lib64/libexec/kf5/kfilemetadata/externalextractors"
kf5.kfilemetadata: Fetching extractors for "audio/mp4"
Indexing /home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a
File(s) indexed
paul@PAUL-DELL:~> balooshow -x "/home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a"
The document IDs of the Baloo DB and the filesystem are different:
Url: /home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a
ID:       198612172668971 (DB) <-> 198612172668983 (FS)
Inode:    46243 (DB) == 46243 (FS)
DeviceID: 43 (DB) <-> 55 (FS)
198612172668983 55 46243 /home/paul/Music/Synced/Gareth Emery/Drive/09 Lights & Thunder.m4a
        Mtime: 1532717424 2018-07-27T19:50:24
        Ctime: 1581093822 2020-02-07T16:43:42
        Cached properties:
                Bitrate: 126000
                Channels: 2
                Duration: 282
                Genre: Electronica
                Sample Rate: 44100
                Track Number: 9
                Release Year: 2018
                Comment: 
                Artist: Gareth Emery; Krewella
                Album: Drive
                Title: Lights & Thunder

Internal Info
Terms: Maudio Mmp4 T2 Taudio X1-126000 X10-drive X15-lights X15-thunder X2-2 X3-282 X4-electronica X5-44100 X6-9 X7-2018 X9-emery X9-gareth X9-krewella drive electronica emery gareth krewella lights thunder 
File Name Terms: 09 F09 Flights Fm4a Fthunder lights m4a thunder 
XAttr Terms: 
duration: 282
channels: 2
sampleRate: 44100
genre: electronica
releaseYear: 2018
trackNumber: 9
artist: emery gareth krewella
album: drive
title: lights thunder
bitRate: 126000
Comment 10 Paul McAuley 2020-03-29 00:11:23 UTC
 info provided
Comment 11 Stefan Brüns 2020-03-29 00:23:37 UTC
(In reply to Paul M from comment #10)
>  info provided

Obviously the wrong information no longer is in the DB

Old: Terms: Mmp4 Mvideo T3 Tvideo
New: Terms: Maudio Mmp4 T2 Taudio