2

I am trying to make sense of the documentation for Kodi and Video Tagging. The documentation states:

It seems that Kodi will not import a media file without a valid title in the metadata tag. This makes it the most critical tag of all.

Title also differs from Filename - I may have a file called Blade_Runner_2049_(2017)Withalotofexcessinformation.mp4, But the title value can simply be "Blade Runner 2049". Kodi will then display "Blade Runner 2049).

So here is what I tried on my side (as a native French speaker). I like using my own file name convention, for instance: 2010 Moi, moche et méchant (Despicable Me).mkv. To make the video easily imported in Video Library I tried a simple:

$ mkvpropedit "2010 Moi, moche et méchant (Despicable Me).mkv" --edit info --set title="Despicable Me"

However when I import a folder with this file in it, it continue to fail to recognize it. I need to manually fix the library entry (Refresh option).

So my questions:

  1. What does the title metatag inside MP4 or MKV does actually ?
  2. Is there a way to keep my own filename convention AND set enough metatag to get the file to be recognize properly (I am not a big fan of NFO).

Update I also tried the following experiment:

$ mkvpropedit "Blade.mkv" --edit info --set title="Blade Runner 2049"

The movie with filename "Blade.mkv" is being recognized as 'Blade' instead of 'Blade Runner 2049'.

malat
  • 12,152
  • 13
  • 89
  • 158

2 Answers2

2

Starring at the source code long enough I figure the logic is here:

The function CVideoInfoScanner::FindVideo only takes as input the filename as stored on disk. This leads to something like this in the debugger:

#0  VIDEO::CVideoInfoScanner::FindVideo (this=0x55757515fbf0, videoName="BigBuckBunny_320x180.mp4", 
    scraper=std::shared_ptr (count 3, weak 1) 0x7f3b2801d780, url=..., progress=0x0) at VideoInfoScanner.cpp:2114

So this returns no result for the file eventhough the title was set nicely in the ISO Media, MP4 Base Media v1 [IS0 14496-12:2003] container

$ wget http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4
$ ffprobe -i BigBuckBunny_320x180.mp4 2>&1| grep title
    title           : Big Buck Bunny

For comparison music is handled very differently since a whole set of tags are being read directly from the MP3 file itself, see:


Update

Because I believe this would a nice feature to have in future version, I did report an issue in Trac:


Update 2

I have prepared a pull request and it was accepted today:

malat
  • 12,152
  • 13
  • 89
  • 158
2

Best approach for you would probably be to add an nfo file with the same name and the info about the file in it. See for reference: http://kodi.wiki/view/Nfo

Razze
  • 4,124
  • 3
  • 16
  • 23
  • I wanted something similar to [MusicBrainz picard](http://kodi.wiki/view/Music_tagging#MusicBrainz) but for MP4/MKV. – malat Jan 29 '18 at 12:33
  • Yeah, that's not really how it works at the moment :/ The workflow would be to rename your files via something like filebot. Or use nfo. I also thought you could change the parsing via advancedsettings.xml but I can't find any docs about that. – Razze Jan 29 '18 at 16:11
  • Make sense, but one need to pay attention to some weird character in filenames, I just shot myself in the foot using [':' (colon) in filename on NTFS](https://unix.stackexchange.com/a/114470/32896). – malat Jan 29 '18 at 16:43