簡體   English   中英

在 RTX 3080 上使用 ffmpeg 在 h264 中編碼失敗

[英]Encoding in h264 with ffmpeg on RTX 3080 fails

由於與 VR 的一些兼容性問題,我正在嘗試使用我的 RTX 3080 將 7200x3600 60fps h265 視頻轉換為 h264 編解碼器。

此命令行導致“ No NVENC capable devices found ”錯誤:

ffmpeg -hwaccel_device 0 -hwaccel cuda -i input.mp4 -c:v h264_nvenc output.mp4

但是,此命令有效(對於 h265):

ffmpeg -hwaccel_device 0 -hwaccel cuda -i input.mp4 -c:v hevc_nvenc output.mp4

對我來說,這意味着我的 gpu 具有“NVENC 能力”,但我不知道該嘗試什么。

編輯: ffmpeg 的ffmpeg -f lavfi -i nullsrc -c:v h264_nvenc -gpu list -f null /dev/null

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!

對於 H.264,nvenc 有一個最大值。 分辨率限制為 4096x4096。 使用像 libx264 這樣的軟件編碼器。 但請注意,7200x3600 的分辨率超出了任何有效 H.264 級別的限制,因此希望您的目標玩家不要在意。 或者使用具有不同參數的 HEVC。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM