New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cuda::videoWriter and VideoWriter error #21207
Comments
Two problems have been found that may cause errors in cv::VideoWriter:
However, there is still a problem, why cudacodec::VideoReader's decoding is normal, but cudacodec::VideoWriter throw_no_cuda error? The error message:
|
/cc @cudawarped |
Depending on the backend which is used for the video source
|
I read the video in, decode it, and then transcode it for storage.
Is there any way to encode with GPU? |
Inside OpenCV at the moment I would say no. It may be possible to use Outside OpenCV you could probably just use most of the code from the transcoding example (AppTrans) from the Nvidia Video Codec SDK samples. |
Well, I will try to use the Nvidia Video Codec SDK to solve this problem, thanks a lot! |
I tried the Nvidia Video Codec SDK, but the AppTrans in it also cannot support NVEnc, because CUDA no longer supports NVEnc. However, I found an open source algorithm that may be helpful for this. https://github.com/rigaya/NVEnc If someone implements the Nvidia Video Codec SDK that supports NVEnc, can you tell me how to do it? |
I am not sure what you are trying to do and what you mean by NVEnc and that CUDA no longer supports NVEnc? The AppTrans application decodes and encodes video using an Nvidia GPU. On my system I can see it using both the video encode and decode hardware units for most of the processing. What hardware and CUDA version are you using? |
RTX2080, CUDA 10.2 |
That's an opencv error not an AppTrans error. What error do you get from AppTrans which indicates that GPU hardware decoding is not supported? |
the displayArea field no longer holds the correct video size in the version 4.7. In my case, the correct size of video frame is 1440x1080 but displayArea is 1440x1088. I have to use VideoReader to get the correct size first for cropping |
Have you read a frame and checked that the format is valid?
I am in the process of changing this so it will be unecessary to check in the future. |
Are there open items in the ticket. Could it be closed? |
Fixed in opencv/opencv_contrib#3470.
Exactly it wasn't an issue the default format for
This was related to
Not that I can see, lets close it so we don't have to read through it again! |
environment:
cuda::videoReader is running normally, but cuda::videoWriter has throw_no_cuda error. Try to use VideoWriter to store the image decoded by cuda::videoReader. The stored file is only 1kb. But the video files obtained by VideoCapture are stored correctly by VideoWriter. why?
The following is the source code:
The text was updated successfully, but these errors were encountered: