zipswich avatar image
0 Votes"
zipswich asked zipswich commented


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?

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you using the same code from the document and is the destinationfile a .HEVC file? I made a simple test following the document. The prepareOp.CanTranscode shows true. I'm testing on a Windows 11 device. Are you testing on Windows 11?

1 Vote 1 ·
zipswich avatar image zipswich RoyLi-MSFT ·

Thank you very much for your help. I should have stated that I was transcoding fragmented MP4. If you do not mind, could you try this sample fragmented MP4?
Yes, I am testing on a Windows 11 PC.

0 Votes 0 ·

I could reproduce the behavior when using that fragmented MP4 file. I'll consult other engineers to check if this kind of files are supported for transcoding.

1 Vote 1 ·
Show more comments

0 Answers