我使用--enable-nvenc编译了FFMPEG,并希望使用NVENC编码器进行编码,但运行ffmpeg时收到此错误消息。
[nvenc_h264 @ 0x8ed020] 4 CUDA capable devices found
[nvenc_h264 @ 0x8ed020] [ GPU #0 - < GeForce GTX TITAN Black > has Compute SM 3.5, NVENC Not Available ]
[nvenc_h264 @ 0x8ed020] [ GPU #1 - < GeForce GTX TITAN Black > has Compute SM 3.5, NVENC Not Available ]
[nvenc_h264 @ 0x8ed020] [ GPU #2 - < GeForce GTX TITAN Black > has Compute SM 3.5, NVENC Not Available ]
[nvenc_h264 @ 0x8ed020] [ GPU #3 - < GeForce GTX TITAN Black > has Compute SM 3.5, NVENC Not Available ]
[nvenc_h264 @ 0x8ed020] No NVENC capable devices found
我有泰坦黑色gpu,正如官方文件所说应该得到支持。
我的nvenc-sdk版本是5.0
和nvidia-smi信息列在下面。
~> nvidia-smi
Wed Jan 6 16:36:55 2016
+------------------------------------------------------+
| NVIDIA-SMI 352.39 Driver Version: 352.39 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX TIT... Off | 0000:02:00.0 Off | N/A |
| 54% 82C P2 215W / 250W | 4422MiB / 6143MiB | 77% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX TIT... Off | 0000:04:00.0 Off | N/A |
| 55% 82C P2 160W / 250W | 5926MiB / 6143MiB | 84% Default |
+-------------------------------+----------------------+----------------------+
| 2 GeForce GTX TIT... Off | 0000:83:00.0 Off | N/A |
| 58% 83C P2 147W / 250W | 5926MiB / 6143MiB | 68% Default |
+-------------------------------+----------------------+----------------------+
| 3 GeForce GTX TIT... Off | 0000:84:00.0 Off | N/A |
| 53% 83C P2 191W / 250W | 3155MiB / 6143MiB | 85% Default |
+-------------------------------+----------------------+----------------------+
答案 0 :(得分:4)
由于代表率较低,无法对您的答案发表评论,但对于后来遇到这种情况的人,我会尽量节省您的时间并告诉您,您正在寻找的ffmpeg旗帜是-pix_fmt yuv420p。
这会使整个命令类似于此:
ffmpeg -f x11grab -i :0.0 -vcodec nvenc -pix_fmt yuv420p output.mp4
答案 1 :(得分:1)
最后,我得到了答案。
ffmpeg将检查GPU的编码能力。
并且有一个阈值:
target_smver = avctx->pix_fmt == AV_PIX_FMT_YUV444P ? 0x52 : 0x30;
Titan Black有smver 3.5,它只能编码YUV420P像素格式视频。