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.

Problem occurred when I use multiprocessing with VPF encoding, need help! #161

@TracelessLe

Description

@TracelessLe

Describe the bug
Problem occurred when I run two encoding process on one GPU (GeForce RTX 3090) as follows:

Traceback (most recent call last):
  File "./multiprocessing/ending_data_manager.py", line 39, in flush_avaliable_frames
    video_writer.write(output_img)
  File "./util/video.py", line 25, in write
    success, encByteArray = self.convert_numpy_to_nv12(bgr_frame)
  File "./util/video.py", line 45, in convert_numpy_to_nv12
    success = self.nvEnc.EncodeSingleSurface(cvtSurface, encFrame, sync=False)
RuntimeError: NvEncoder : m_nvenc.nvEncOpenEncodeSessionEx(&encodeSessionExParams, &hEncoder) returned error 10
Description: EncodeAPI Internal Error.
 at ./VideoProcessingFramework/PyNvCodec/TC/src/NvEncoder.cpp:84

It is worth mentioning that the problem only appear on my GeForce RTX 3090 GPU, but not appear on my Tesla V100 GPU.

I notice the error "EncodeAPI Internal Error." appears near the code "nvEncOpenEncodeSessionEx" in VPF source code, so I look up the NvEncodeAPI doc. It seems that the error means that a process cannot open an encoding session.

截屏2021-02-05 11 31 26

Further, I find the number of NVENC/CHIP is different between Tesla V100 and RTX 3090. As the website shows, Tesla V100 has 3 NVENC/CHIP, and RTX 3090 only has 1. I wonder whether the difference caused this error in my mutiprocessing application.

Please give me some advice, thanks a lot.

截屏2021-02-05 11 31 18

Desktop (please complete the following information):

  • OS: ubuntu 20.04
  • Nvidia driver version: 460.32.03
  • CUDA Version: 11.1
  • Video Codec SDK Version: 9.1.23
  • Python Version: 3.8.5

Metadata

Metadata

Assignees

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