首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在RTX 3080上使用ffmpeg进行h264编码失败

在RTX 3080上使用ffmpeg进行h264编码失败
EN

Stack Overflow用户
提问于 2021-12-17 07:30:34
回答 1查看 533关注 0票数 1

由于与VR的兼容性问题,我正在尝试使用我的RTX 3080将一个7200x3600fps h265视频转换为h264编解码器。

此命令行将导致"No NVENC capable devices found“错误:

代码语言:javascript
运行
复制
ffmpeg -hwaccel_device 0 -hwaccel cuda -i input.mp4 -c:v h264_nvenc output.mp4

但是,这个命令可以工作(对于h265):

代码语言:javascript
运行
复制
ffmpeg -hwaccel_device 0 -hwaccel cuda -i input.mp4 -c:v hevc_nvenc output.mp4

这对我来说,意味着我的gpu是'NVENC能力‘,但我不知道该尝试什么。

编辑:ffmpeg -f lavfi -i nullsrc -c:v h264_nvenc -gpu list -f null /dev/null的输出

代码语言:javascript
运行
复制
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, lavfi, from 'nullsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
[h264_nvenc @ 0000017e82c22540] [ GPU #0 - < NVIDIA GeForce RTX 3080 > has Compute SM 8.6 ]
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
EN

Stack Overflow用户

回答已采纳

发布于 2021-12-18 04:18:45

对于H.264,nvenc有一个最大值。分辨率限制为4096x4096。使用像libx264这样的软件编码器。但是请注意,7200x3600的分辨率超出了任何有效H.264级别的限制,所以希望您的目标玩家不会在意。或者使用不同参数的HEVC。

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70389738

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档