ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps8) failed -> CUDA_ERROR_DEINITIALIZED: driver shutting down

简介: ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps8) failed -> CUDA_ERROR_DEINITIALIZED: driver shutting down

吾有专门文章介绍如何在FFMPEG中使用NVIDIA硬件编解码。然后在Freeswitch中使用,并给别人提供了技术指导。


  从某一时间开始,吾发现Freeswitch无法使用硬件编解码,编码无效,解码直接崩溃。吾后来使用ffmpeg测试:


ffplay -vcodec h264_cuvid sample_720p-2.h264

  直接报错。

[quantum6@freeswitch freeswitch]$ ffplay -vcodec h264_cuvid sample_720p-2.h264 
ffplay version 4.3.1 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
  configuration: --extra-cflags='-I/usr/local/cuda/include -fPIC ' --extra-ldflags='-L/usr/local/cuda/lib64 -ldl ' --pkg-config-flags=--static --enable-shared --enable-static --enable-sdl --enable-gpl --enable-libx264 --enable-cuvid --enable-nvenc --enable-nonfree --nvcc='nvcc=/usr/local/cuda/bin/nvcc'
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, h264, from 'sample_720p-2.h264':    0KB sq=    0B f=0/0   
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc
[h264_cuvid @ 0x7f38c8028180] ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps8) failed -> CUDA_ERROR_DEINITIALIZED: driver shutting down
[h264_cuvid @ 0x7f38c8028180] ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps10) failed
[h264_cuvid @ 0x7f38c8028180] ctx->cvdl->cuvidGetDecoderCaps(&ctx->caps12) failed
Failed to open file 'sample_720p-2.h264' or configure filtergraph
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

  网上查了一下,以下方法测试无效:

./configure --enable-cuda --enable-nvenc --enable-cuvid --enable-libnpp --extra-cflags=-I<path_to_libnpp_headers> --extra-ldflags=-L<path_to_libnpp_libraries>

  吾反复安装系统,有十几次,都不成功。甚至有几次机器都开不了机。为什么开枪有问题?经过分析是显卡问题。于是吾就猜测,是显卡出问题,导致硬件编解码失败。


目录
相关文章
Failed to execute script ‘xxx‘ due to unhandled exception:No module named ‘ctypes‘
Failed to execute script ‘xxx‘ due to unhandled exception:No module named ‘ctypes‘
428 0
|
3月前
|
并行计算 TensorFlow 算法框架/工具
【Deepin 20系统】解决Check failed: err == cudaSuccess || err == cudaErrorInvalidValue Unexpected CUDA erro
本文介绍了在使用Nvidia RTX 2070 GPU和TensorFlow 2时,解决GPU内存不足错误的方法,包括杀死占用内存的进程、重置GPU以及重启设备等方案。
70 3
|
并行计算 Linux PyTorch
RuntimeError: CUDA error: device-side assert triggered
我在运行PyG和transformers代码时两次遇到了这一问题,在此加以记录。
|
Java
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
1089 0
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
|
6月前
|
机器学习/深度学习 并行计算 PyTorch
【已解决】RuntimeError: CUDA error: device-side assert triggeredCUDA kernel errors might be asynchronous
【已解决】RuntimeError: CUDA error: device-side assert triggeredCUDA kernel errors might be asynchronous
|
6月前
|
并行计算 PyTorch 算法框架/工具
【已解决】RuntimeError: CuDA error: no kernel image is available for execution on the device
【已解决】RuntimeError: CuDA error: no kernel image is available for execution on the device
|
6月前
|
计算机视觉 Python
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
168 0
|
Unix Linux 异构计算
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See /var/log/nv
成功解决 ERROR: An error occurred while performing the step: “Building kernel modules“. See  /var/log/nv
|
计算机视觉
【在虚拟环境下完美解决】1698: error: (-215:Assertion failed) empty() in function cv::CascadeClassifier
首先我们要找到那个分类器所在的路径,我们可以在Cmd中直接输入【若是虚拟环境的话,则需要切换到对于虚拟环境中,再去查找对应的opencv版本与位置信息】
434 0
|
计算机视觉
cv2.error: OpenCV(4.5.2) : -1 : error: (-5:Bad argument) in function ‘rectangle‘
cv2.error: OpenCV(4.5.2) : -1 : error: (-5:Bad argument) in function ‘rectangle‘
445 0