Adding .M4V to music library
#1
I have been adding musicvideos to my musiclibrary. Some of them are part of albums and some albums are musicvideo library albums. I like them to be part of the music library (and not video).

It is working well for musicvideos in MP4 format, but not in M4V format. No idea what is driving this. I have added the below in my advancedsettings:

<musicextensions>
<add>.mp4|.m4v</add>
</musicextensions>


Any thoughts?
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#2
Maybe you could provide some more detail about what is "not working well". My understanding is MP4 and M4V is exactly the same, but maybe not. Keep in mind that it wasn't intended that video would be part of the music library. The fact that it works at all is kind of an accident.

scott s.
Reply
#3
I assume it is just problems with tagging as discussed in the other thread https://forum.kodi.tv/showthread.php?tid=319105

Workarounds discussed there too.
Reply
#4
Thanks for your messages.

Unfortunately, the issue is completely different from what I described for MP4s. MP4s are being added to the library (just sometimes my tags are not perfect, so they don't show up as I want them to), while M4Vs are not added at all. Basically, Kodi ignores my M4V files completely although I have included in my advancedsettings to include the (see above).

Do you guys have any M4V files and can comment whether you succeeded to add them to the music library. If so, the issue will be my tags and I can sort this out.
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#5
No .m4v files so I can't test, sorry.

Turn debug on and get a debug log while adding a music source with just .m4v files in and "yes" to scan to library. That will show if it is scanning these files, and having problems with the tagging, or not even seeing them. You can post a link to the resulting log if you like.
Reply
#6
Thanks for your help. Below is the debug log. It appears quite obvious from the log that the tags are the issue. I have no idea though why and I don't think it is related to the other issue. The tags show fine in Picard and also on MP3Tag. Any thoughts?

https://pastebin.com/isKENUSF
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#7
Ah, wait... It is not a tag issue, but a Kodi issue. I just renamed the file from .m4v to .mp4. Now it reads the tag and shows properly. Obviously, this is not the solution. Any idea how to get Kodi to read tags from files with .m4v ending? Any thoughts appreciated!
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#8
Dave would know best, but my browsing suggests that taglib (at least current version 1.11.1 which the Kodi build dependencies seems like this is the Kodi ver) does support M4V file extension as having MP4 tags (taglib fileref.cpp):

Code:
if(ext == "M4A" || ext == "M4R" || ext == "M4B" || ext == "M4P" || ext == "MP4" || ext == "3G2" || ext == "M4V")
return new MP4::File(stream, readAudioProperties, audioPropertiesStyle);

but in Kodi MusicInfoTagLoaderFactory.cpp:

Code:
if (strExtension == "aac" ||
      strExtension == "ape" || strExtension == "mac" ||
      strExtension == "mp3" ||
      strExtension == "wma" ||
      strExtension == "flac" ||
      strExtension == "m4a" || strExtension == "mp4" || strExtension == "m4b" ||
      strExtension == "mpc" || strExtension == "mpp" || strExtension == "mp+" ||
      strExtension == "ogg" || strExtension == "oga" || strExtension == "oggstream" ||
      strExtension == "opus" ||
      strExtension == "aif" || strExtension == "aiff" ||
      strExtension == "wav" ||
      strExtension == "mod" ||
      strExtension == "s3m" || strExtension == "it" || strExtension == "xm" ||
      strExtension == "wv")
{

Seems like it could be easily (well, easy for me to say!) PRed to add M4V as a valid file extension like notspiff did in PR#11147 for m4b (part of audiobook support).

scott s.
.
Reply
#9
Our friend Scott is right on all counts!

Taglib will handle .m4v files, but I had not noticed that MusicInfoTagLoaderFactory.cpp was not including them as a valid extension. I can raise the trivial PR to add this extension sure.

However 17.4 is at RC so I'm not sure this fix will get into Krypton. Also I'm a little uncomfortable pushing through a change that I can not test. This means that I will raise the PR, but I am less than sure what will happen to it.
Reply
#10
Seems like a small change so no objections for 17.4
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#11
(2017-08-17, 09:10)Martijn Wrote: Seems like a small change so no objections for 17.4
As I said, I will raise the PRs (Leia and Krypton), the button is all yours.

EDIT
PRs here
https://github.com/xbmc/xbmc/pull/12682
https://github.com/xbmc/xbmc/pull/12684
Reply
#12
Fantastic, thanks so much scott967, DaveBlake and Martijn. I was thinking to rename all my m4v files manually, but glad to read that this will not be needed. Much appreciated!
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#13
Steve there is a Krypton test build for Windows with the .m4v change here
http://mirrors.kodi.tv/test-builds/windo...AD-x86.exe

Perhaps you could do a fresh portable mode installation on a PC, not to impact your normal system in any way, and check this this can handle your .m4v files. Some testing would help move this forwards, and I do not have the files.
Reply
#14
I have been lazy/brave and upgraded my existing Kodi Krpton. Things work as normal, but m4v are not supported yet. Please have a look at the log file below:

https://pastebin.com/Gw8Wzi5K
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#15
Just as well you tested then Steve, thanks for that. Of course this is the issue with making changes that I can not test myself. Sad

There is a second place in the code that needs a change, so I will amend the PRs, create a test build and let you try again.

BTW installing a separate version of Kodi on Windows and running in portable mode is really trivial to do. There is never any need to risk disruption of your main system. To do it just install Kodi to a non-system folder e.g. c:\Kodi_test rather than the default, say no to desktop shortcut, and before running create your own shortcut and add " -p" to the exe string. Use that to run the test Kodi version.

I have several versions of Kodi installed on my test PC at any time.
Reply

Logout Mark Read Team Forum Stats Members Help
Adding .M4V to music library0