ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
211 stars 53 forks source link

ffmpeg4.2 FrameGrabber Crash #176

Closed sudongg closed 4 years ago

sudongg commented 4 years ago

Hi, @lukasf After I updated the latest version of FFmpegInteropX + ffmpeg4.2.2, some videos crashed after using extract frame

Crashing code await FrameGrabber.CreateFromStreamAsync(stream);

I still have the problem after switching back to the old version of FFmpegInteropX,It may be a crash caused by updating ffmpeg 4.2.2

Below is a link to a sample video of the crash https://www.dropbox.com/s/a8kl02ge24764sp/FrameGrabber%20Crash%20Sample.zip?dl=0

lukasf commented 4 years ago

Hi @sudongg I cannot reproduce the crash with the provided files and ffmpeg 4.2.2. Does the crash also occur when using our sample apps?

sudongg commented 4 years ago

@lukasf I just downloaded the latest version of FFmpegInteropX for testing. Clicking the extract frame button on the left will still crash when playing the sample.

The reason I can think of is that there is a problem with my ffmpeg 4.2.2 build file. Can you provide a available ffmpeg 4.2.2 build file to download?

sudongg commented 4 years ago

Hi @lukasf It's really something wrong with my build file. My build files are all downloaded at https://ffmpeg.zeranoe.com/builds/ Downloaded is the latest build 4.2.2.

However, I am at https://ffmpeg.zeranoe.com/builds/win64/shared/ Download ffmpeg-4.2.2-win64-shared.zip, after using this bin file, there is no crash.

The 4.2.2 build in January did not crash, only the recently build 4.2.2 will crash. I didn't know in the past that 4.2.2 has multiple sub versions, In the future, I will directly download the earliest build version.

lukasf commented 4 years ago

Please be aware that you won't be able to submit an app to the Windows Store if you use Zeranone build dlls. They are normal "desktop" / Win32 dlls, using APIs that are not allowed in the Windows Store. You can use them for testing or private/internal use (if they are not buggy). But as soon as you want to submit an app to the Windows Store, you must use UWP builds of FFmpeg.

sudongg commented 4 years ago

@lukasf Thank you for your reply. The uwp version of ffmpeg refers to using BuildFFmpeg_VS2017.bat build files? Can I use the DLLs file in ffmpeginteropx nuget packets to submit to the store? I still don't understand why 4.2.2 on https://ffmpeg.zeranoe.com/builds/ will crash. I'm worried that this problem will continue to the future version.

lukasf commented 4 years ago

Yes you can use the FFmpegInteropX.FFmpegUWP nuget packet for Store submissions. It is tagged "prerelease" but fully functional.