Ffmpeg 无法使用h264_cuvid解码视频

Ffmpeg 无法使用h264_cuvid解码视频,ffmpeg,Ffmpeg,我使用的是nvidia GTX 1080Ti,驱动程序版本:387.12 我正在使用以下命令: ffmpeg -c:v h264_cuvid -i http://stream:port/channel output.mkv 并获得以下输出: ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160

我使用的是nvidia GTX 1080Ti,驱动程序版本:387.12

我正在使用以下命令:

ffmpeg -c:v h264_cuvid -i http://stream:port/channel output.mkv 
并获得以下输出:

ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-cflags=-I/usr/local/cuda-8.0/include --extra-ldflags=-L/usr/local/cuda-8.0/lib64 --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-cuda --enable-cuvid --enable-nvenc --enable-libnpp
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
[h264 @ 0x24d2f60] non-existing PPS 2 referenced
[h264 @ 0x24d2f60] non-existing PPS 1 referenced
[h264 @ 0x24d2f60] Invalid NAL unit 0, skipping.
    Last message repeated 2 times
[h264 @ 0x24d2f60] slice type 12 too large at 1
[h264 @ 0x24d2f60] decode_slice_header error
[h264 @ 0x24d2f60] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x24d2f60] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x24d2f60] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x24d2f60] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x24d2f60] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x24d2f60] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x24d2f60] no frame!
[h264 @ 0x24d2f60] non-existing PPS 1 referenced
[h264 @ 0x24d2f60] decode_slice_header error
[h264 @ 0x24d2f60] no frame!
[h264 @ 0x24d2f60] SEI type 66 size 1104 truncated at 400
[h264 @ 0x24d2f60] sps_id 1 out of range
[h264 @ 0x24d2f60] non-existing PPS 3 referenced
[h264 @ 0x24d2f60] non-existing PPS 2 referenced
[h264 @ 0x24d2f60] non-existing PPS 1 referenced
[h264 @ 0x24d2f60] SEI type 87 size 1264 truncated at 1224
[h264 @ 0x24d2f60] sps_id 1 out of range
[h264 @ 0x24d2f60] non-existing PPS 3 referenced
[h264 @ 0x24d2f60] Invalid NAL unit 0, skipping.
 ........

[h264 @ 0x24d2f60] non-existing PPS 0 referenced
[h264 @ 0x24d2f60] decode_slice_header error
[h264 @ 0x24d2f60] no frame!
[mpegts @ 0x24c4640] decoding for stream 0 failed
Input #0, mpegts, from 'http://stream:port/channel':
  Duration: N/A, start: 27359.989822, bitrate: N/A
  Program 1108
    Stream #0:0[0x3f2]: Video: h264 ([2][0][0][0] / 0x0002), yuv420p(bottom first), 46x24, 0.69 fps, 25 tbr, 90k tbn, 1.38 tbc
    Stream #0:1[0x3f3](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
File 'output.mkv' already exists. Overwrite ? [y/N] 

您知道这个问题吗?

这是一个很长的命令。修复了“File'output.mkv”格式已经存在的问题。是否覆盖?您指的是这个问题吗?如果是这种情况,只需在命令开头添加-y选项即可覆盖文件。ffmpeg-y-c:vh264_cuvid-i输出。mkv@Ahmed_Faraz这不是错误。错误是无法解码输入流。没有CUVID它能用吗?你有一个可以测试这个流的URL吗?@slhck 21是的,你是对的。问题是,如果没有CUVID,我无法解码这个流。当我使用CPU解码时,它工作正常。