Tool to embed PMS held metadata in to mp4 file

The other option is to use “Subliminal” GitHub - Diaoul/subliminal: Subliminal - Subtitles, faster than your thoughts which lives outside plex. Just a thought. I have used it in the past and it works great. The fork I used was the GitHub - wackou/subliminal: Subliminal - Subtitles, faster than your thoughts fork. I created a service on osx which I would just right click on the show/movie and it would use subliminal to search for the title. Again just another way to grab a subtitle. I haven’t found 1 single solution for getting subs.



Ideally something that could use either a hash or be title based and search several sub sites would be ideal. Also determine the number of subtitles to download. Some site have several versions of a language.



Keep me posted and I would be glad to help test sub searches etc. Ohh and don’t forget in the merging subs via subler :wink:

Ok, so I have pushed some changes to the repo. I added a flag to enable the generation of chapter preview images, and also for embedding any compatible “sidecar” subs (ones with same name as media item, sitting in the same folder as the media item). Currently it only attempts to embed srt as that seems to be what subler supports.

Please give it a shot (but only on copies of items, at least for now) and let me know if it works :slight_smile:



Also, for anyone keeping track. To make things neat I renamed the --subtitles flag to --export-subtitles, and --artwork to --export-artwork. Hope this doesn’t cause too much trouble for anyone!

Mr Jensen, I am thinking about convincing my dear friend to help me develop a Mac GUI version of this superb script. This will broaden the use of this (people tend to not even try stuff like this because it lives in the Terminal).

Would you give us your blessing to at least try? And IF we TRY, do you have any startup suggestions for how to do this the best way?

Please go ahead. If time and circumstances allowed I would do it myself :slight_smile:



I would suggest NOT writing a UI to wrap the tool I have made, and instead go full hog and use the Subler tool as inspiration. I think it’s open source, so you might even be able to use that app as a starting point!



My blessing you have, and I wish you luck in the endeavor!

Spas



You can do what you want 2 ways. I have Plex running on a Windows server 2003 and it runs great. Or your mounting idea is great. I linked Mac and Windows machines at a TV station I worked at to share and transfer files for editing. Just look on the mac how to hook to a windows network. then mount the drives you want.



Good Luck

This is actually truly amazing. Thank you so much, this is way easier than using MetaX or anything, and I already have things in Plex, it’s just perfect. It’s like “If only someone would make this exact thing I want,” but that thing never exists, and then somehow this time someone did exactly what i was looking for.

I also just wanted to say thank you. I’ve been using iDentify for a long time, but it seems to be having problems with TheTVDB lately. And yet, Plex is still getting metadata fine! Checked for a PMS -> metadata writer, and lo and behold. You’ve saved me a huge amount of effort. Thank you very, very much. It works wonderfully!

CCjensen: I do have some issues with my Band of Brothers series. The xml says it is embedded srt subtitles, but when I use your script (to export the embedded subs) it says that it finds no subtitles for that series. When I play it through Plex however it displays. I wanted to double-check that PMS hasn't misidentified the subs as SRT when they actually could be PGS, but the Media Info app also says that it is a text subtitle. So I am a bit confused. I could not find a log for this script, so I assume there is none. Am I right?

I've been getting the following error when trying to export artwork (i.e., --export-artwork):
 
"artwork export not yet implemented..."
 
Am I incompetent, or is it not working and/or implemented? As far as i know, I have the latest version.
 
Thanks!

I've been getting the following error when trying to export artwork (i.e., --export-artwork):
 
"artwork export not yet implemented..."
 
Am I incompetent, or is it not working and/or implemented? As far as i know, I have the latest version.
 
Thanks!

This, how to get it to work? Or any newer tools to export data from PMS to folders?

Hi all,

This is a fantastic idea! Unfortunately, although I have used terminal in the past and kind of understand how to use it, I am a complete newbie to python. I've downloaded the scripts and put them into My Documents ( I don't know where else to put them, this is almost certainly my mistake). Then I run the following in terminal "plexmediatagger.py --tag" (example 1) and get the following "-bash: plexmediatagger.py: command not found".

Could someone please point me to some information on what needs to be done so that the commands in terminal work.

Apologies for being such a newbie to this. I've googled to try to work this out but to no avail.

Much, much appreciated!

Hi all,

This is a fantastic idea! Unfortunately, although I have used terminal in the past and kind of understand how to use it, I am a complete newbie to python. I've downloaded the scripts and put them into My Documents ( I don't know where else to put them, this is almost certainly my mistake). Then I run the following in terminal "plexmediatagger.py --tag" (example 1) and get the following "-bash: plexmediatagger.py: command not found".

Could someone please point me to some information on what needs to be done so that the commands in terminal work.

Apologies for being such a newbie to this. I've googled to try to work this out but to no avail.

Much, much appreciated!

You have misunderstood slightly.

I placed my script in the Documents folder as well and ran the script like this on my Mac:

python /Users//Documents/PlexMediaTagger-master/plexmediatagger.py --tag

If you are on another OS I think you can still see what you need to do to get it working.

You have misunderstood slightly.

I placed my script in the Documents folder as well and ran the script like this on my Mac:

python /Users//Documents/PlexMediaTagger-master/plexmediatagger.py --tag

If you are on another OS I think you can still see what you need to do to get it working.

Hi Atrus

Yes I did misunderstand. Got it now, thank you so much.

Is there anyway you can add "Collections" metadata to the .m4v files?

For example, like Alien Series files would have the data need so that collection data can be imported when scan.

Which brings up the question: Would Plex create a collection if did not exist and would it read that tag?

@ccjensen

Thanks for a great tool!

May I ask if multiply subtitles can be supported?  I often have 2 or 3 sidecar subs for each movie as we are multi language family.

@ccjensen

Thanks for a great tool!

May I ask if multiply subtitles can be supported?  I often have 2 or 3 sidecar subs for each movie as we are multi language family.

Are you referring to extract subtitles into the folder, or are you referring to embedding subtitles into the mp4 file?

Are you referring to extract subtitles into the folder, or are you referring to embedding subtitles into the mp4 file?

I'm trying to embed them but it seems that for some reason only one track gets muxed into MP4.

Excellent tool that works like a charm.  Would love to see this as a full on mac app but then again it's not all that complex lol  I guess the command line utility works fine for me :)

unfortunately I can´t get it run .. 

of course I´m running the script from the PMS server.

adding -i IP didn´t help either. I can reach the plex server http://IP:32400/web/index.html#

from any computer in my network.

nnc-srv-mac-1:PlexMediaTagger Admin$ python plexmediatagger.py --tag
========================== Plex Media Tagger Started ===========================
Connecting to PMS at localhost:32400
  Could not connect to server localhost:32400

can anybody help me?

does this script still work with current PMS?

or are there any alternatives to tag files?