# mp4 m4v metadata extractor tool

**URL:** <https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [September 22, 2010, 5:34pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518 "2010-09-22T17:34:46Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ussalaska](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@ussalaska](https://forums.plex.tv/u/ussalaska)\
**Post date:** [September 22, 2010, 5:34pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/1 "2010-09-22T17:34:46Z")

</div>

Its rough but it works on my files. Its extracts title, year, content rating, tagline (comes from short description), summary (from long description), studio (from tv network atom), and imbd (from Tv Episode ID). For fields with multiple items it will pull out the actors, directors, and genres. For some reason make sure the first letter is Capitalized or it gets cut off and separate each with a comma. Also it only pulls actors names not role or thumb.  
  
  
  
Weak points does not extract cover art, yet: working on it. Also since I have a deficiency getting paths into terminal correctly and file with a apostrophe in it will not scan.

---

<div class="post-metadata">

**Author:** ![retroseriestv](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@retroseriestv](https://forums.plex.tv/u/retroseriestv)\
**Post date:** [September 23, 2010, 11:46am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/2 "2010-09-23T11:46:39Z")

</div>

Sorry, but I don’t know if I understood at all. That rough extract tool does extracts info fields as title, year, actors…from MP4 and M4V files. But you don’t explain anything about how come I can introduce that info in to Plex9. Is it possible to do that or just extraction?. Could you explain how can introduce the metadata info in Plex9, if its possible? Thanks.

---

<div class="post-metadata">

**Author:** ![MTI](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MTI](https://forums.plex.tv/u/MTI)\
**Post date:** [September 23, 2010, 1:16pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/3 "2010-09-23T13:16:41Z")

</div>

> [@](#):
>
> Its rough but it works on my files. Its extracts title, year, content rating, tagline (comes from short description), summary (from long description), studio (from tv network atom), and imbd (from Tv Episode ID). For fields with multiple items it will pull out the actors, directors, and genres. For some reason make sure the first letter is Capitalized or it gets cut off and separate each with a comma. Also it only pulls actors names not role or thumb.  
>   
> Weak points does not extract cover art, yet: working on it. Also since I have a deficiency getting paths into terminal correctly and file with a apostrophe in it will not scan.

  
Thanks, good work! I'll test it asap - I have all my content in M4V containers, so for me this important :)  
  
However, I know that the devs will include this functionality in the PMR - hopefully soon, as the basis for that is already in place. I don't know what their strategy is, though. Having an regular agent like the one you are coding, allows for the M4V metadata to be prioritized vs online and local (NFO) metadata (in "Info Provider Settings").

---

<div class="post-metadata">

**Author:** ![ussalaska](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@ussalaska](https://forums.plex.tv/u/ussalaska)\
**Post date:** [September 23, 2010, 2:56pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/4 "2010-09-23T14:56:46Z")

</div>

> [@](#):
>
> Sorry, but I don't know if I understood at all. That rough extract tool does extracts info fields as title, year, actors......from MP4 and M4V files. But you don't explain anything about how come I can introduce that info in to Plex9. Is it possible to do that or just extraction?. Could you explain how can introduce the metadata info in Plex9, if its possible? Thanks.

  
  
It does it. Put in the the plug ins folder, restart PMS, then select it in the Info Provider Settings and moved towards the top of the list. Then plex will use the metadata.

---

<div class="post-metadata">

**Author:** ![ussalaska](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@ussalaska](https://forums.plex.tv/u/ussalaska)\
**Post date:** [September 25, 2010, 12:13am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/5 "2010-09-25T00:13:25Z")

</div>

Okay I need some help getting this to extract the poster. I set the agent to extract the art inside the file to the folder where the movie is in, which works fine. Then I set up to use the first image as the poster and if a second as the fanart, which also works. Then delete the created images, which works but currently disabled. But something strange is happening with the timing. When you add the movie for the first time the artworks files are created and are linked in the PMS but there is no image. Just the default Plex image. Now here is where it get strange, if you leave the images in the folder and hit refresh the poster and fanart show up in PMS customize sections, so the links are good.   
  
  
  
My question to developers since the images are created during the metadata agent phase does this somehow not allow them to be used during the same scan process (does the scanner make a list of files in the folder once it starts scanning for use). With my script if the files are there before the scan starts everything is fine, they get used the way I planned, but if not I get default icons instead.  
  
  
  
Any help would greatly be appreciated.  
  
Chris

---

<div class="post-metadata">

**Author:** ![CrazyMonkey-Ben](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@CrazyMonkey-Ben](https://forums.plex.tv/u/CrazyMonkey-Ben)\
**Post date:** [October 29, 2010, 1:16am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/6 "2010-10-29T01:16:17Z")

</div>

> [@](#):
>
> Okay I need some help getting this to extract the poster. I set the agent to extract the art inside the file to the folder where the movie is in, which works fine. Then I set up to use the first image as the poster and if a second as the fanart, which also works. Then delete the created images, which works but currently disabled. But something strange is happening with the timing. When you add the movie for the first time the artworks files are created and are linked in the PMS but there is no image. Just the default Plex image. Now here is where it get strange, if you leave the images in the folder and hit refresh the poster and fanart show up in PMS customize sections, so the links are good.   
>   
> My question to developers since the images are created during the metadata agent phase does this somehow not allow them to be used during the same scan process (does the scanner make a list of files in the folder once it starts scanning for use). With my script if the files are there before the scan starts everything is fine, they get used the way I planned, but if not I get default icons instead.  
>   
> Any help would greatly be appreciated.  
> Chris

  
  
In the PMS metadata combined folder for a movie, for example:  
/Users/tv/Library/Application Support/Plex Media Server/Metadata/Movies/3/acef553f28316568fb7cda9db20118662f7eaab.bundle/Contents/\_combined/posters  
  
There are generally several symlinks to the various posters generated by metadata agents. most are viewable by double clicking on them in finder and display in Preview as images. The one for your poster shows as a script:  
  
For example:  

```auto

<open file '~/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/MP4\ Extractor.bundle/Contents/Resources/AtomicParsley /Volumes/Media/Movies/Good\ Luck\ Chuck/Good\ Luck\ Chuck.mp4 -t', mode 'r' at 0x18a8cc8>

```

  
  
My guess is that this file needs to be an actual image. But then I don't know anything about plex, and I'm just making an observation based on how the other agents seam to provide images. My guess is that when PMS reads your agent's output it reads this file literally instead of running it as a script, or whatever it is meant to do.  
  
I hope you find this of some help as I would REALLY like to use my own metadata in Plex, the servers get it wrong a bit too often for my taste, and I have some obscure titles.

---

<div class="post-metadata">

**Author:** ![macshome](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@macshome](https://forums.plex.tv/u/macshome)\
**Post date:** [October 31, 2010, 4:58pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/7 "2010-10-31T16:58:55Z")

</div>

I just tried this agent and it is extracting tags just fine. I’ll try adding a poster to one and see if I can help any with that as well.

---

<div class="post-metadata">

**Author:** ![Nemesis7](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Nemesis7](https://forums.plex.tv/u/Nemesis7)\
**Post date:** [December 1, 2010, 11:09pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/8 "2010-12-01T23:09:40Z")

</div>

Any updates?

---

<div class="post-metadata">

**Author:** ![ussalaska](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@ussalaska](https://forums.plex.tv/u/ussalaska)\
**Post date:** [December 2, 2010, 3:47am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/9 "2010-12-02T03:47:34Z")

</div>

I have not looked at the scanner in a while (long while using nfo agent now) but there seems to be a renewed interest; so I will give it a once over and testing the next day or so to fix any bugs that have developed with updates. When I last updated it it would extract the metadata and enter into plex just not the cover art.  
  
  
  
Chris

---

<div class="post-metadata">

**Author:** ![Nemesis7](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Nemesis7](https://forums.plex.tv/u/Nemesis7)\
**Post date:** [December 5, 2010, 12:13am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/10 "2010-12-05T00:13:21Z")

</div>

> [@](#):
>
> I have not looked at the scanner in a while (long while using nfo agent now) but there seems to be a renewed interest; so I will give it a once over and testing the next day or so to fix any bugs that have developed with updates. When I last updated it it would extract the metadata and enter into plex just not the cover art.  
>   
> Chris

  
  
Awesome!

---

<div class="post-metadata">

**Author:** ![Vanderlei\_Loula](https://avatars.discourse-cdn.com/v4/letter/v/e495f1/32.png) [@Vanderlei\_Loula](https://forums.plex.tv/u/Vanderlei_Loula)\
**Post date:** [December 8, 2010, 9:32am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/11 "2010-12-08T09:32:02Z")

</div>

Looking forward too.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [December 8, 2010, 9:49am UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/12 "2010-12-08T09:49:36Z")

</div>

We’re updating the local media agent to read MP4 data, just need to test a bit more.

---

<div class="post-metadata">

**Author:** ![MTI](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MTI](https://forums.plex.tv/u/MTI)\
**Post date:** [December 8, 2010, 3:59pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/13 "2010-12-08T15:59:56Z")

</div>

> [@](#):
>
> We're updating the local media agent to read MP4 data, just need to test a bit more.

  
So if we want the local media agent to gather thumbnails and fanart BUT NOT MP4 tags, we are out of luck? :)  
  
I would prefer separate agents for local media assets and tags...

---

<div class="post-metadata">

**Author:** ![Nemesis7](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Nemesis7](https://forums.plex.tv/u/Nemesis7)\
**Post date:** [December 8, 2010, 11:21pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/14 "2010-12-08T23:21:27Z")

</div>

> [@](#):
>
> We're updating the local media agent to read MP4 data, just need to test a bit more.

  
  
Even more awesome-uberness!!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:47pm UTC](https://forums.plex.tv/t/mp4-m4v-metadata-extractor-tool/5518/15 "2019-12-20T20:47:06Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
