Win Possible bug: MP4/M4A Over 2 GB don't get added to the musiclibrary
#1
Hey guys, not really sure if this is an actual bug, whatever one would call it. Music video files of .MP4 and audio only .M4A files that are larger than 2 GB don't make it to the music library.

I installed a fresh build of Kodi 20.1 with portable mode and scanned an album of 19 music videos in .MP4. Three of those are larger than 2 GB they didn't make it to the library. The others were added just fine.

I also scanned 1 large 2.97 GB audio only M4A file, that didn't work.

Of course this is not a huge problem for m4a since they about never reach the size of 2 GB. But it is worse with MP4s which I like to have scanned in my musiclibrary.

All files tagged with picard and they have MB tags.

Here is a log when I scan the files:
https://paste.kodi.tv/locisaquho.kodi

Screenshot on album in explorer, sorted by size (sorry for the swedish)
Image
from fileview, note the tracks lenght vs the biggest files size:
Image
One of the larger files highlithed:
Image
Library view, note the missing songs:
Image
The big audio only m4a file in fileview:
Image
Mp3 tag showing the largest files tags:
Image

Edit: here is another thread where this is mentioned.

https://forum.kodi.tv/showthread.php?tid=366293&page=2
Reply
#2
MP4 files are video files in my book, and therefore should be in the video library, not in the music library.
Reply
#3
(2023-03-14, 19:28)Klojum Wrote: MP4 files are video files in my book, and therefore should be in the video library, not in the music library
Yes, that is your opinion.

I enjoy adding fully tagged MP4s in the musiclibrary.

What about M4A?
Reply
#4
From your log: "ScanTags - No tag found"
Not sure why tags aren't being found.  Also not sure if taglib or ffmpeg is being used here as the tag reader.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply
#5
Thanks for looking in the log.

(2023-03-15, 00:32)scott967 Wrote: Also not sure if taglib or ffmpeg is being used here as the tag reader.
Is this a setting somewhere? I didn't change any settings except added mp4 as musicextensions in the advancedsettings xml.
Reply
#6
No setting.  I'm pretty sure it's handled by ffmpeg though.  I don't really know the code and to investigate would need to run Kodi in a debugger which takes some time.  It's something i want to look at.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply
#7
(2023-03-14, 19:28)Klojum Wrote: MP4 files are video files in my book, and therefore should be in the video library, not in the music library.

I’ve been adding tagged MP4 music videos to my Kodi Music Library for a while. This works well for me.

The work around for large MP4 files is to use a CUE file, but fixing MP4 tags for large files would be a better solution.

I thought Kodi Music uses TagLib not ffmpeg.
Reply
#8
what this sounds like is similar to id3 tags being put at the end of the file data

if the function reading the tags is reading the whole file into memory to scan for tags at the end, it may have a limited buffer defined and that might make sense why it's "2GB" - seems like a normal limit someone would have set

just trying to provide some context, like @scott967 i have no idea where in the code to look for this but im fairly certain it's going to be a 3rd party library like ffmpeg is
Reply
#9
Thanks guys.

(2023-03-16, 23:56)scott967 Wrote:   I'm pretty sure it's handled by ffmpeg though.

It looks like that in the log when i play a big file from fileview after i scanned the files.
Reply
#10
I'm not in the know on how metadata gets stored in mp4 container, but my initial thought agrees that if it is at the end that might be a problem.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply
#11
I tried to rewrite 1 file with ffmpeg (I also tried MP4Box) and put the metadata at the beginning of the file. I have very little knowledge of how to proper operate ffmpeg with command line but I got working files (I.E the file would play outside of Kodi)
But I think I messed up the metadata at each try and no one would scan in to Kodi music library.
Reply

Logout Mark Read Team Forum Stats Members Help
Possible bug: MP4/M4A Over 2 GB don't get added to the musiclibrary0