Reputation: 132
Is anybody know how possible to edit EXIF data of video file in Windows Phone 8.1?
Case i can record video (screen capture) and need to modify EXIF data of video. Example:
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);
Upvotes: 1
Views: 1372
Reputation: 982
I haven't had a chance to test this myself to see where the metadata is written but the StorageFolder.Properties property might be what you are looking for.
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
Edit: Added more details for clarity on how to save properties.
Upvotes: 1