【问题标题】:How to edit EXIF data of mp4 video file in Windows Phone 8.1如何在 Windows Phone 8.1 中编辑 mp4 视频文件的 EXIF 数据
【发布时间】:2014-05-21 12:49:08
【问题描述】:

有人知道如何在 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);

【问题讨论】:

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


    【解决方案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

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

    【讨论】:

    • 是的,我已经尝试过这个,例如:var items = await eyeFile.Properties.GetVideoPropertiesAsync(); eyeFile.Properties.GetVideoPropertiesAsync(); items.Publisher = "Hello world!"; items.SavePropertiesAsync(); 这个变体工作正常,但不幸的是我不能将数据添加到像“MakerNote”这样的属性,以及大多数其他属性(例如像经度,纬度是只读的)PS MSDN 页面 - msdn.microsoft.com/ru-ru/library/windows/apps/…
    猜你喜欢
    • 2011-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-16
    • 2020-01-08
    • 2012-04-30
    相关资源
    最近更新 更多