Skip to content
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

Function opencv::cudacodec::create_video_reader error #526

Closed
Yawpets opened this issue Dec 13, 2023 · 2 comments
Closed

Function opencv::cudacodec::create_video_reader error #526

Yawpets opened this issue Dec 13, 2023 · 2 comments

Comments

@Yawpets
Copy link

Yawpets commented Dec 13, 2023

= note: libopencv-a2ac1998c6b0aedd.rlib(32f7d63781172ad3-cudacodec.o) : error LNK2019:
reference to an unresolved external element "bool __cdecl
cv::cudacodec::operator==(struct cv::cudacodec::EncoderParams const &,struct cv::cudacodec::EncoderParams
const &)" (??8cudacodec@cv@@YA_NAEBUEncoderParams@01@0@Z) in function
cv_cudacodec_operatorEQ_const_EncoderParamsR_const_EncoderParamsR.
C:\Users\danch.DESKTOP-R8T7DK9\Rust\projects\camera\target\debug\deps\camera.exe : fatal error
LNK1120: unresolved external elements: 1

  1. Windows 10
  2. Manual build with Visual Studio 2019
  3. 4.8.0
  4. rustc 1.74.0 (79e9716c9 2023-11-13)

build.log

opencv_cudacodec480 is specified in OPENCV_LINK_LIBS. cuda.rs example code works fine.

@twistedfall
Copy link
Owner

That looks like bindings for some function that's not actually present in OpenCV shared libraries are generated. Would be able to provide a short code sample that's triggering this error?

@Yawpets
Copy link
Author

Yawpets commented Dec 14, 2023

use opencv::{cudacodec, highgui, prelude::*, Result};

fn main() -> Result<()> {
    let window = "Camera";
    highgui::named_window(window, highgui::WINDOW_AUTOSIZE)?;
    let _d_reader = cudacodec::create_video_reader_def("test.mp4").unwrap();
    Ok(())
}

I was originally planning to work with rtsp stream, but then I checked on a regular test video, the error persists in all functions related to videoReader. Also I came across similar discussions related to implementation in other languages opencv_contrib/issues/3359 and opencv_contrib/issues/3225 where author mentions that the encoder has not worked for several years, maybe using videoReader is really impractical.

@Yawpets Yawpets closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants