A Microsoft platform for building and publishing apps for Windows devices.
Hello @Jeff Haynes Welcome to Microsoft Q&aA,
CreateFileOutputNodeAsync(IStorageFile, MediaEncodingProfile) almost always fails
During testing with code sample it could work well, I suppose you have not specific input device or pass incorrect MediaEncodingProfile , please check this code sample and create MediaEncodingProfile like the following.
private MediaEncodingProfile CreateMediaEncodingProfile(StorageFile file)
{
switch(file.FileType.ToString().ToLowerInvariant())
{
case ".wma":
return MediaEncodingProfile.CreateWma(AudioEncodingQuality.High);
case ".mp3":
return MediaEncodingProfile.CreateMp3(AudioEncodingQuality.High);
case ".wav":
return MediaEncodingProfile.CreateWav(AudioEncodingQuality.High);
default:
throw new ArgumentException();
}
}
MediaEncodingProfile fileProfile = CreateMediaEncodingProfile(file);
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.