Convert h264 file to mp4 with `cv::cudacodec`

Everything that is currently merged into the official 4.x branch will be part of 4.9.0 when that is released which will probably be before the end of the year.

Hi @cudawarped ,

Sorry for my ignorance on the release plan of OpenCV…Just out of curiosity, your PR merges to the branch 4.x of opencv_contrib, but I am aware that there is a separate 5.x branch. How will these two repos reconcile functions added to 4.x only? I suppose this would not be an automatic process given the different changes made to 5.x only?

See

and for an example of how the 5.x branch is updated

1 Like

Hi @piyushupload1 ,

@cudawarped has updated the repo, you can use the latest 4.x branch to save .mp4 file directly from cv::cudacodec::VideoReader.

You may also take a look at this example I prepared.

@cudawarped ,

Just tested, works like a charm! Compared with the normal instance that uses FFmpeg backend (which is also using hardware-acceleration), the cudacodec version can cut CPU usage by ~70%.

1 Like

Hi @cudawarped ,

One more minor issue: not sure if this README.md is still relevant, but all cuda-related modules are not included in it.

It could do with being updated but so could the CUDA docs in general they are really out of date. I started updating them ages ago but didn’t have time to finish the job. Maybe next year.

perhaps enough of a project for a GSoC worker and you could be a mentor/supervisor

A post was merged into an existing topic: cv::cudacodec::VideoWriter not working with only NVCUVID