MediaClip.CreateFromFileAsync() throws System.ArgumentException
Hong
1,216
Reputation points
MediaClip videoClip = await MediaClip.CreateFromFileAsync(storageFileVideo);
The above code occasionally throws the following exception:
System.ArgumentException
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
I want to emphasize that the code works flawlessly most of the time. It throws the exception only for some MP4 video files. When it throws the exception, I check the video file and it always plays perfectly. I even use Mp4 Explorer to examine the MP4 file and cannot find any problems.
Could anyone offer a tip on the possible causes?
Sign in to answer