Hello,
Welcome to our Microsoft Q&A platform!
The MediaClip.CreateFromFileAsync
method accepts a parameter type of IStorageFile
, which means you need to pass in a variable of type StorageFile
.
Although we can use a MemoryStream
to save a file stream in memory, MediaClip
doesn't have a method of CreateFromStreamAsync
, so in your case you can only load data from the file.
---
If you are establishing a connection between MediaClip and Stream, you can use StorageFile.ReplaceWithStreamedFileAsync as a relay.
You can first read the StorageFile
as a Stream
, then use this method to convert the Stream
to a StorageFile
when needed, and pass it to MediaClip
.
However, it should be noted that loading the file into memory has no effect on the speed of MediaComposition
.
Thanks.