# \#cudacodec

**URL:** https://forum.opencv.org/tag/cudacodec/341.md

[Latest](https://forum.opencv.org/latest.md) · [Categories](https://forum.opencv.org/categories.md) · [Tags](https://forum.opencv.org/tags.md)

---

## [Persistent CUDA/cuDNN Build Errors (4.12.0, CUDA 12.9, VS2022)](https://forum.opencv.org/t/persistent-cuda-cudnn-build-errors-4-12-0-cuda-12-9-vs2022/23451)

<div class="topic-metadata">

**Author:** [@mercylotus](https://forum.opencv.org/u/mercylotus)\
**Replies:** 7\
**Last updated:** [August 1, 2025, 11:19am UTC](https://forum.opencv.org/t/persistent-cuda-cudnn-build-errors-4-12-0-cuda-12-9-vs2022/23451 "2025-08-01T11:19:29Z")

</div>

Hello, I am attempting to build OpenCV 4.12.0 with CUDA and cuDNN support for use with my python project including EasyOCR. I want GPU acceleration inside my python project. I’ve encountered persistent build errors rel…

---

## [OpenCV cudacodec nvdec says unsupported format on blackwell Gpu](https://forum.opencv.org/t/opencv-cudacodec-nvdec-says-unsupported-format-on-blackwell-gpu/20684)

<div class="topic-metadata">

**Author:** [@haider\_abbasi](https://forum.opencv.org/u/haider_abbasi)\
**Replies:** 4\
**Last updated:** [April 1, 2025, 6:42pm UTC](https://forum.opencv.org/t/opencv-cudacodec-nvdec-says-unsupported-format-on-blackwell-gpu/20684 "2025-04-01T18:42:12Z")

</div>

Hey CudaMates, Context: I have just started working with OpenCV gpu/cuda decoding capabilites to utilize its advantages over the cpu counterpart in my goal of making an efficient application. The problem is i am getting…

---

## [CUDA Decoder issues](https://forum.opencv.org/t/cuda-decoder-issues/20514)

<div class="topic-metadata">

**Author:** [@gabrielgq](https://forum.opencv.org/u/gabrielgq)\
**Replies:** 4\
**Last updated:** [March 14, 2025, 6:33pm UTC](https://forum.opencv.org/t/cuda-decoder-issues/20514 "2025-03-14T18:33:36Z")

</div>

I am trying to build OpenCV with CUDA support, it worked but now I wanted to add cudacodec as well, however I am having issues with installing the NVIDIA Video Codec SDK and get errors for the headers and libraries. I am…

---

## [Status and usage of cudacodec::VideoWriter](https://forum.opencv.org/t/status-and-usage-of-cudacodec-videowriter/17396)

<div class="topic-metadata">

**Author:** [@tvercaut](https://forum.opencv.org/u/tvercaut)\
**Replies:** 39\
**Last updated:** [May 13, 2024, 8:07am UTC](https://forum.opencv.org/t/status-and-usage-of-cudacodec-videowriter/17396 "2024-05-13T08:07:55Z")

</div>

Hi, I am interested in efficiently encoding and writing video files from images stored on the GPU from python. It seems like the cv::cudacodec::VideoWriter class has recently been revived but there isn’t much documentat…

---

## [Unable to use CUDA decoder](https://forum.opencv.org/t/unable-to-use-cuda-decoder/17101)

<div class="topic-metadata">

**Author:** [@ragnarok](https://forum.opencv.org/u/ragnarok)\
**Replies:** 7\
**Last updated:** [April 2, 2024, 10:28am UTC](https://forum.opencv.org/t/unable-to-use-cuda-decoder/17101 "2024-04-02T10:28:34Z")

</div>

I am working on a desktop PC running Linux Mint 21.3, with the proprietary NVIDIA drivers (v545) installed from the Driver Manager. I have built OpenCV (v4.9.0) with CUDA (v12.3.2) support, using the -D WITH\_NVCUVID=ON a…

---

## [Video writing is too slow in OpenCV](https://forum.opencv.org/t/video-writing-is-too-slow-in-opencv/15882)

<div class="topic-metadata">

**Author:** [@Ratheesh](https://forum.opencv.org/u/Ratheesh)\
**Replies:** 12\
**Last updated:** [January 16, 2024, 9:57am UTC](https://forum.opencv.org/t/video-writing-is-too-slow-in-opencv/15882 "2024-01-16T09:57:34Z")

</div>

Hi Technical Team, Environment used for my task: Windows 11 CUDA toolkits: 12.1 GPU Name : NVIDIA T1200 Laptop GPU OpenCV 4.8.0 I have build OpenCV with CUDA support using CMake GUI for C++. My requirement is “writ…

---

## [cv::cudacodec::VideoWriter not working with only NVCUVID](https://forum.opencv.org/t/cv-videowriter-not-working-with-only-nvcuvid/16009)

<div class="topic-metadata">

**Author:** [@mamsds](https://forum.opencv.org/u/mamsds)\
**Replies:** 8\
**Last updated:** [December 31, 2023, 6:17am UTC](https://forum.opencv.org/t/cv-videowriter-not-working-with-only-nvcuvid/16009 "2023-12-31T06:17:50Z")

</div>

I try to use both cv::cudacodec::VideoReader and cv::cudacodec::VideoWriter in my OpenCV program (a minimally reproducible example here). Previously, I build OpenCV with NVCUVENC, my cmake output contains something like…

---

## [CudaCodec::VideoReader runtime error](https://forum.opencv.org/t/cudacodec-videoreader-runtime-error/13369)

<div class="topic-metadata">

**Author:** [@Kaushik\_James](https://forum.opencv.org/u/Kaushik_James)\
**Replies:** 2\
**Last updated:** [May 31, 2023, 12:51pm UTC](https://forum.opencv.org/t/cudacodec-videoreader-runtime-error/13369 "2023-05-31T12:51:47Z")

</div>

I am using opencv.4.7 dev in RHEL 9. Using VideoReader and VideoWriter was working smoothly. All of a sudden running codec calls giving error. Also for VideoWriter too Terminate called after throwing an instance of cv…

---

## [Problem with using cv2.cudacodec.createVideoReader](https://forum.opencv.org/t/problem-with-using-cv2-cudacodec-createvideoreader/12861)

<div class="topic-metadata">

**Author:** [@Jinqing\_Wang](https://forum.opencv.org/u/Jinqing_Wang)\
**Replies:** 1\
**Last updated:** [April 19, 2023, 1:55pm UTC](https://forum.opencv.org/t/problem-with-using-cv2-cudacodec-createvideoreader/12861 "2023-04-19T13:55:31Z")

</div>

import cv2 import time cap = cv2.cudacodec.createVideoReader("D:/obsrecord/tiktok-live-sample2.flv") t1 = time.time() while True: ret, frame = cap.nextFrame() if not ret: t2 = time.time() print(…

---

## [Not able to read Video from Capture Card with GPU (Unsupported Format) while Reading with CPU works fine](https://forum.opencv.org/t/not-able-to-read-video-from-capture-card-with-gpu-unsupported-format-while-reading-with-cpu-works-fine/9506)

<div class="topic-metadata">

**Author:** [@data](https://forum.opencv.org/u/data)\
**Replies:** 47\
**Last updated:** [August 26, 2022, 3:19pm UTC](https://forum.opencv.org/t/not-able-to-read-video-from-capture-card-with-gpu-unsupported-format-while-reading-with-cpu-works-fine/9506 "2022-08-26T15:19:24Z")

</div>

Hello all, First of all, i am new to the Open CV World and just started a few weeks ago. I tried to solve this error by reading questions to similar problems, but until now, i couldn’t fix it. Context: I am working wi…

---

## [Reading Video Signal with CPU vs GPU](https://forum.opencv.org/t/reading-video-signal-with-cpu-vs-gpu/9593)

<div class="topic-metadata">

**Author:** [@data](https://forum.opencv.org/u/data)\
**Replies:** 1\
**Last updated:** [July 22, 2022, 10:37am UTC](https://forum.opencv.org/t/reading-video-signal-with-cpu-vs-gpu/9593 "2022-07-22T10:37:04Z")

</div>

Hello, I am still new to OpenCV and CV in general. I have some beginner questions regarding the VideoIO with CPU and GPU: Is it possible to read a video signal directly via the GPU? Does it make sense to do so or is …

---

## [Why cudacodec::VideoReader returns 4 channels?](https://forum.opencv.org/t/why-cudacodec-videoreader-returns-4-channels/9345)

<div class="topic-metadata">

**Author:** [@sway\_wang](https://forum.opencv.org/u/sway_wang)\
**Replies:** 1\
**Last updated:** [June 30, 2022, 11:28am UTC](https://forum.opencv.org/t/why-cudacodec-videoreader-returns-4-channels/9345 "2022-06-30T11:28:23Z")

</div>

Hi, I’m using nvcuvid to decode the video and do inference with tensorrt for acceleration. However, every time I call retrieve() method, it gives me a 4-channel GpuMat, instead of 3. I have to convert it to 3 channels, s…
