Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Decode Error occurred for picture & HW decoder faced error. Re-create instance & frame missing #533

Open
Garfield2005 opened this issue Sep 21, 2023 · 3 comments

Comments

@Garfield2005
Copy link

I am using the code from branch v2.0.0 and found a problem:

Decode Error occurred for picture 76303
HW decoder faced error. Re-create instance

This problem also appeared in earlier versions, and the solution is to catch the exception, e.g. #47 #353

while True:  
    try: 
        rawSurface = nvD.DecodeSingleSurface() 
        if rawSurface.Empty(): 
            print('No more video frames') 
            break 
    except nvc.HwResetException: 
        print('Continue after HW decoder was reset') 
        continue 

But in the branch v2.0.0, the HwResetException will not be thrown, why?

I modified the source code to throw this exception, and decoding can continue , but there is another problem: a few frames are missing like issue #67 . The solution from @rarzumanyan was given in the issue_67 branch, but issue_67 has not been merged into the latest code, why?

So, can this problem be solved in the new version?
Thanks.

@Sayyam-Jain
Copy link

I am using the code from branch v2.0.0 and found a problem:

Decode Error occurred for picture 76303
HW decoder faced error. Re-create instance

This problem also appeared in earlier versions, and the solution is to catch the exception, e.g. #47 #353

while True:  
    try: 
        rawSurface = nvD.DecodeSingleSurface() 
        if rawSurface.Empty(): 
            print('No more video frames') 
            break 
    except nvc.HwResetException: 
        print('Continue after HW decoder was reset') 
        continue 

But in the branch v2.0.0, the HwResetException will not be thrown, why?

I modified the source code to throw this exception, and decoding can continue , but there is another problem: a few frames are missing like issue #67 . The solution from @rarzumanyan was given in the issue_67 branch, but issue_67 has not been merged into the latest code, why?

So, can this problem be solved in the new version? Thanks.

I was also facing the same problem, where code runs for few minutes and then after running some time, starts throwing
HW decoder faced error. Re-create instance constantly.

I solved the problem after figuring out that some part of my code was occupying a large chunk of the cpu power resulting in decoding issue. Make sure you have sufficient cpu processing power (you can use top with ctrl+i to disable irix mode to monitor cpu usage).

Also, make sure that no part of the code is running in a constant while loop without any delay (add sleep as it will reduce cpu power) .

You can also check if you have enough decoding resources using the following command:
nvidia-smi pmon

@ggzzzzz628
Copy link

same problem

@leyankon
Copy link

How do I change the source code? I've also encountered this problem, which occurs after decoding H265 for a while.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants