如何在Windows Phone 8.1中编辑mp4视频文件的EXIF数据

时间:2014-05-21 12:49:09

标签: c# xaml video windows-phone windows-phone-8.1

有人知道如何在Windows Phone 8.1中编辑视频文件的EXIF数据吗?

案例我可以录制视频(屏幕截图)并需要修改视频的EXIF数据。 例如:

StorageFolder folder = KnownFolders.VideosLibrary;
string currentFileName = DateTime.Now.ToString("yy-MM-dd__hh-mm-ss");
StorageFile videoFile = await folder.CreateFileAsync(currentFileName+".mp4", CreationCollisionOption.ReplaceExisting);

...

// Create an encoding profile to use.                  
var profile = Windows.Media.MediaProperties.MediaEncodingProfile.CreateMp4(Windows.Media.MediaProperties.VideoEncodingQuality.HD1080p);
// Start recording
await _mediaCapture.StartRecordToStorageFileAsync(profile, videoFile);

1 个答案:

答案 0 :(得分:1)

我自己没有机会对此进行测试,以查看元数据的写入位置,但StorageFolder.Properties属性可能就是您要查找的内容。

StorageFile file = //get a file
Dictionary<String, object> propertiesToSave = new Dictionary<string, object>();

//This provides convenient access to the properties
var videoProps = await file.Properties.GetVideoPropertiesAsync();

//You can add as many properties to save as you want here
propertiesToSave.Add("System.Video.Director", "Director Name");

videoProps.SavePropertiesAsync(propertiesToSave);

The list of properties is useful for finding what you can write

编辑:添加了更多详细信息,以明确如何保存属性。