William
William

Reputation: 3395

Accessing/Changing Metadata of Video Files (MKV, etc.) in C# (Plex Media Server)

Background

I have a media server with a large number of television shows on it. It is currently organized with the following folder structure:

[Genre][Show Name]\Season [Season Number]([Season]x[Episode]) Episode Name.[extension]

So, an episode of House would have the following path:

\Drama\House\Season 7(07x14) Recession Proof.mkv

Metadata

I have started to play around with Plex Media Server. The only issue is that Plex seemingly organizes your videos via the metadata that it gathers from the video files.

I want to make a program that goes through all of my media files and changes the meta data based on the folder structure that the file resides.

In order to accomplish this, I need to be able to view/edit metadata via C#. I have tried downloading MediaInfo.dll, but when I try to add it as a reference in a project, VS says that it is not a valid assembly or COM component.

Does anyone know of any better way of reading/editing meta data?

Upvotes: 2

Views: 4124

Answers (1)

Johnny Bones
Johnny Bones

Reputation: 8402

I have never used it personally, but I've heard TagLib-Sharp is the de-facto C# tool for editing metadata in media files.

BTW, you could also try editing the metadata that's stored locally in C:\Documents and Settings\MyUserName\Local Settings\Application Data\Plex Media Server\Metadata on a PC, I'm not positive what the path would be on a Mac. I have a feeling that the first option is the best one, however.

Upvotes: 1

Related Questions