MediaEncodingProfile.CreateHevc(VideoEncodingQuality.Auto)

Hong 1,211 Reputation points
2022-09-18T19:00:23.157+00:00

I followed the official instructions to transcode media files, so let me avoid copying all the code here. If I use the following:

MediaEncodingProfile profile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto);  

Everything works flawlessly - the app can transcode both any H.264 and H.265 file to an MP4 file with H.264 encoding.

However, if I use the following:

MediaEncodingProfile profile = MediaEncodingProfile.CreateHevc(VideoEncodingQuality.Auto);  
...  
PrepareTranscodeResult prepareOp = await  
                                            transcoder.PrepareFileTranscodeAsync(sourcefile, destinationfile, profile);  

prepareOp.CanTranscode is false and prepareOp. FailureReason is "Unknown".

Could anyone offer a tip on how to diagnose this?

Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.