有没有办法在wmf文件中存储和检索自定义元数据,请注意我不是指Windows Media Format?
可选使用.net和C#?
答案 0 :(得分:0)
简短的回答是“不”,因为除了类型,版本,大小和项目数等基本内容之外,WMF不支持元数据。
答案 1 :(得分:0)
要检索信息,您可以参考以下路径。
http://www.codeproject.com/KB/audio-video/MetaDataReader.aspx
此外,您需要下载WMF SDK。使用以下链接。
http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=d9c6f6e0-dd2b-427e-9787-73312bb62532
它支持以下属性。
Index Name Stream Language Type
----- ------ ------ -------- ----
0 Duration 0 0 QWORD
1 Bitrate 0 0 DWORD
2 Seekable 0 0 BOOL
3 Stridable 0 0 BOOL
4 Broadcast 0 0 BOOL
5 Is_Protected 0 0 BOOL
6 Is_Trusted 0 0 BOOL
7 Signature_Name 0 0 STRING
8 HasAudio 0 0 BOOL
9 HasImage 0 0 BOOL
10 HasScript 0 0 BOOL
11 HasVideo 0 0 BOOL
12 CurrentBitrate 0 0 DWORD
13 OptimalBitrate 0 0 DWORD
14 HasAttachedImages 0 0 BOOL
15 Can_Skip_Backward 0 0 BOOL
16 Can_Skip_Forward 0 0 BOOL
17 FileSize 0 0 QWORD
18 HasArbitraryDataStream 0 0 BOOL
19 HasFileTransferStream 0 0 BOOL
20 WM/ContainerFormat 0 0 DWORD
21 Title 0 0 STRING
22 Author 0 0 STRING
23 Copyright 0 0 STRING
24 Description 0 0 STRING
25 Rating 0 0 STRING
26 BannerImageURL 0 0 STRING
27 CopyrightURL 0 0 STRING
28 WMFSDKVersion 0 0 STRING
29 WMFSDKNeeded 0 0 STRING
30 IsVBR 0 0 BOOL
31 WM/AlbumTitle 0 0 STRING
32 WM/Track 0 0 STRING
33 WM/PromotionURL 0 0 STRING
34 WM/AlbumCoverURL 0 0 STRING
35 WM/Genre 0 0 STRING
36 WM/Year 0 0 STRING
37 WM/GenreID 0 0 STRING
38 WM/Composer 0 0 STRING
39 WM/Lyrics 0 0 STRING
40 WM/ToolName 0 0 STRING
41 WM/ToolVersion 0 0 STRING
42 WM/AlbumArtist 0 0 STRING
43 WM/AuthorURL 0 0 STRING
44 WM/AudioFileURL 0 0 STRING
45 WM/Language 0 0 STRING
46 WM/ParentalRating 0 0 STRING
47 WM/BeatsPerMinute 0 0 STRING
48 WM/InitialKey 0 0 STRING
49 WM/Mood 0 0 STRING
50 WM/DVDID 0 0 STRING
51 WM/UniqueFileIdentifier 0 0 STRING
52 WM/ModifiedBy 0 0 STRING
53 WM/RadioStationName 0 0 STRING
54 WM/RadioStationOwner 0 0 STRING
55 WM/PlaylistDelay 0 0 STRING
56 WM/Codec 0 0 STRING
57 WM/DRM 0 0 STRING
58 WM/ISRC 0 0 STRING
59 WM/Provider 0 0 STRING
60 WM/ProviderRating 0 0 STRING
61 WM/ProviderStyle 0 0 STRING
62 WM/ContentDistributor 0 0 STRING
63 WM/SubscriptionContentID 0 0 STRING
64 WM/ASFPacketCount 0 0 QWORD
65 WM/ASFSecurityObjectsSize 0 0 QWORD
答案 2 :(得分:0)
WMF不支持作者,标题,描述等元数据。但是,根据Windows Metafile Format Specification,第192页,可以将注释(在您的情况下为自定义元数据)写入MFCOMMENT打印机转义。