Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.
This repository was 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

Description

@Garfield2005

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.

Activity

  1. Sayyam-Jain commented on Dec 13, 2023

    @Sayyam-Jain

    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

  2. ggzzzzz628 commented on Mar 2, 2024

    @ggzzzzz628

    same problem

  3. leyankon commented on Mar 26, 2024

    @leyankon

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions