Hey everybody,
I successfully compiled the (opencv-3.1.0/samples/gpu/) video_reader.cpp sample with nvcc.
The sample works just fine with any video I've tested except a MJPEG file.
I also tried parsing a ".jpg" file without any success.
If I try to parse a MJPEG/JPG file I get the error:
OpenCV Error: Gpu API call (CUDA_ERROR_NO_DEVICE [Code = 100]) in create, file /home/ubuntuuser/subfolder/opencv-3.1.0/modules/cudacodec/src/video_decoder.cpp, line 104
terminate called after throwing an instance of 'cv::Exception'
what(): /home/ubuntuuser/subfolder/opencv-3.1.0/modules/cudacodec/src/video_decoder.cpp:104: error: (-217) CUDA_ERROR_NO_DEVICE [Code = 100] in function create
But the video_decoder.cpp tells me:
// Validate video format. These are the currently supported formats via NVCUVID
CV_Assert(cudaVideoCodec_MPEG1 == _codec ||
cudaVideoCodec_MPEG2 == _codec ||
cudaVideoCodec_MPEG4 == _codec ||
cudaVideoCodec_VC1 == _codec ||
cudaVideoCodec_H264 == _codec ||
cudaVideoCodec_JPEG == _codec ||
cudaVideoCodec_YUV420== _codec ||
cudaVideoCodec_YV12 == _codec ||
cudaVideoCodec_NV12 == _codec ||
cudaVideoCodec_YUYV == _codec ||
cudaVideoCodec_UYVY == _codec );
I'm currently using:
- kernel 3.16.0-60-generic
- Ubuntu 14.04.4 LTS
- opencv-3.1.0
- cuda V7.0.27
- nvidia-driver version 346.46
- card GeForce GT 740
I'm thankful for any idea why it's not working with MJPEG files.