Accessing audio/video metadata with .NET

前端 未结 7 478
礼貌的吻别
礼貌的吻别 2020-12-29 13:22

What is the best way to get and set the meta data for mp3, mp4, avi files etc. with .NET?

相关标签:
7条回答
  • 2020-12-29 13:51

    I used COM interop to access DirectShow's Media Detector functionality.

    This does work pretty well, but it's a right pain in the backside. You need to know lots about COM, win32 interop, and so on.

    You can also use DirectShowNet which should handle most of that for you, I just didn't want to lug that whole thing around when I was only interested in the MediaDetector part

    0 讨论(0)
  • 2020-12-29 13:58

    These are the example class files for different languages found in the MediaInfo.dll zip

    • MediaInfoDLL.cs
    • MediaInfoDLL.def
    • MediaInfoDLL.h
    • MediaInfoDLL.java
    • MediaInfoDLL.jsl
    • MediaInfoDLL.pas
    • MediaInfoDLL.py
    • MediaInfoDLL.vb
    • MediaInfoDLL_Static.h

    You do have to use interop and I don't know if you can edit tags, I've never needed to do that but it's pretty much a swiss army knife at least for getting media information from files.

    Link to downloads page (sourceforge)

    MediaInfo_0.7.7.4_DLL_Win32.zip

    0 讨论(0)
  • 2020-12-29 13:59

    I use MediaInfo with my C# apps, gives you a lot of information about media files.

    0 讨论(0)
  • 2020-12-29 14:05

    You can use free UltraID3Lib .NET library to read/write MP3 metadata.

    0 讨论(0)
  • 2020-12-29 14:08

    Looks like MediaInfo is read-only at this point, by the way: http://sourceforge.net/forum/message.php?msg_id=4241318&abmode=1

    Very cool project, though. It's fun finding out about all this cool stuff here on SO.

    0 讨论(0)
  • 2020-12-29 14:13

    I've been looking at the NTag project as well, which handles MP3/WMA/OGG. I don't know of a single library that handles audio and video files, so you might have to use a few.

    0 讨论(0)
提交回复
热议问题