Share via

MediaEncodingProfile.CreateHevc(VideoEncodingQuality.Auto)

Hong 1,526 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?

Developer technologies | Universal Windows Platform (UWP)

Your answer

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