Jellyfin Forum
Relying on MKV metadata for TV episodes - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Relying on MKV metadata for TV episodes (/t-relying-on-mkv-metadata-for-tv-episodes)



Relying on MKV metadata for TV episodes - sfdkjghsj - 2024-02-26

I have a large collection of TV shows and episodes, all in .mkv files. They are not named to conform to Jellyfin's naming format for seasons and episodes, and renaming them is not an option. Jellyfin doesn't seem to support custom name regexs like Kodi. It does however have two options that should help: for a library, I can enable "Prefer embedded titles over filenames" and "Prefer embedded episode information over filenames."

Therefore, I want to embed that metadata into my .mkv files directly. I can script this with mkvpropedit, but I can't find out what metadata keys and values I should be using that are used by Jellyfin. I am assuming that I can set the metadata in the .mkv container and tell Jellyfin to rescan the directory--or just recreate the library--and Jellyfin will automatically detect the season, episode name, and episode number of all my .mkv episodes. This also means I don't need to rename files, and to emphasize: renaming my files is not an option.

Given a sample .mkv filename of "test.mkv", how can I use mkvpropedit to set properties on the file to be, for example, season 1, episode 2, and an episode name of "Test Episode?"

Thanks.


RE: Relying on MKV metadata for TV episodes - TheDreadPirate - 2024-02-26

You could use a library type like Music Videos that doesn't scrape for online metadata.


RE: Relying on MKV metadata for TV episodes - sfdkjghsj - 2024-02-26

That may work, but I'm hoping to have the best of both worlds: keep my file name structure while still having Jellyfin pull the media info from TheTVDB or an equivalent source. I just want to tell it "this file is for season 1, episode 2." Is what I'm describing possible? Or maybe I'm misinterpreting those two settings about embedded metadata?


RE: Relying on MKV metadata for TV episodes - TheDreadPirate - 2024-02-27

I think it is an either/or situation. It can't pull metadata if the file folder names don't conform to our documentation (to generate the query for TMDB/TVDB).


RE: Relying on MKV metadata for TV episodes - sfdkjghsj - 2024-03-06

Unfortunate.

As an alternative, has anybody tried to use the Jellyfin API to do this? The API looks comprehensive but I'm struggling to see where I can start. I'm confident I could build a regex to get the relevant information from my filenames, and if I can figure out how the API works, I can then just tell Jellyfin "this file is for this episode" directly without renaming anything. My library is pretty static, so I wouldn't need to run a script like that very often.