I am using the HEVC software plugin to decode a live stream.
The decoder randomly crashes (sometimes i got ~15000 decoded frames ~10 minutes and late I managed to get ~46200 decoded frames = ~30 minutes. the frame rate is 25 FPS). I just re-run my application without any changes...
I don't do anything (right now) with the output, just wanted to test the stability of my code using the SW decoder.
I use the same code to decode live AVC stream and so far it never crashed.
callstack (if it helps...)
> mfxplugin64_hevcd_sw.dll!00007ff84567af67() Unknown
Any idea what can cause the crash?
It's hard to analyze with above limited information, can you please provide us more information about the system variables and environment.
Thank you for your response.
OS :windows 10 pro
CPU : Core i7-3632QM
GPU : Intel graphics HD4000
I am using MediaServerStudio professional evalutaion
My application is based on sample_multi_transcode.
The source is live mpegts containing HEVC (3840x2160, 59.94FPS, 25mbps, 10bit) + AAC. My application demultiplex the source and pushes the video frames to the decoder.
for some reason (probably performance issue, CPU is ~95% - I don't think my machine can decode 4k HEVC video quick enough using the sw decoder), it takes too long and the compressed frames queue becoming full(I hold max 200 compressed frames = ~3.3 seconds of video)
When the queue overflows, I drop the new frame(s).
It looks like the decoder can't recover from a broken GOP and crashes.
My guess is that I will have to reset the decoder for every frame I drop but restarting the decoder is an expensive operation that will cause more frames to drop.
Is there any way for the decoder to fail without crashing?
Attached are the logs of the system analyzer and the decoding session (it crashed after ~20 seconds, with ~200 dropped frames)
Thanks for sharing system details. Few points to note here -
Media Server Studio 2015 R6 supports 4th and 5th generation, so Core i7-3632QM is not a supported configurations.
Also, Media Server Studio doesn't support windows 10 OS. The set up has a discrete graphics card, in the past it has been reason of some crashes/failures. To make sure I understand your application, you are using sample_multi_transcode to decode hevc 4k stream and encoding to h264 or h265 codec? Can you please copy the cmd line you are using, have you made any changes to sample_multi_transcode? On windows using MSS pro there are two decode implementation -sw or hybrid.
Any other system you have where you can test this application. If we can reproduce this issue on supported configuration then it's definitely an issue on our side and needs debugging. Also, Will it be possible for you to run the application without discrete graphics card to rule out any discrete card issue possibilities?
I have taken a quick look at tracer logs, will give in depth look and get back if I find anything interesting.
I don't think changing the machine to a compatible one is necessary - my goal is to run my application on a cloud machine where I don't have hw acceleration at all and I am going to use the sw implementation only.
I am not using sample_multi_transcode. I used sample_multi_transcode as a reference for my live transcoder application.
Since your last crash happened within few seconds then we might can try different scenarios to find the culprit -
In the end if you can reproduce the issue on a supported system with supported OS, that will definitely help.
sample_decode does not crash since it's reading from a file. As I mentioned before my guess is that the decoder crashes because I drop frames from my live source (probably because performance issues, cpu was ~95%) and the decoder does not receive full GOP.
I tried to decode with my application a live HEVC 720p25 source and it was working fine (CPU% was ~50% which is not that high...). My app didn't drop any frame and the decoder didn't crash during the test.
My cloud server will be CentOS.