【问题标题】:FFMPEG Hwaccel error with -hwaccel_output_format [closed]带有-hwaccel_output_format的FFMPEG Hwaccel错误[关闭]
【发布时间】:2020-10-02 16:29:45
【问题描述】:

我有 Nvidia 1050Ti 显卡

我用 cuda 测试 ffmpeg

ffmpeg -hwaccel nvdec -hwaccel_output_format cuda  -i input.mp4 -y  \ 
-c:v h264_nvenc -c:a libmp3lame -b:v 3M \
-filter_complex hwdownload,scale=w=iw*min(1280/iw\,720/ih):h=ih*min(1280/iw\,720/ih),hwupload out.mp4

错误:

[hwupload @ 00000199b49c1080] A hardware device reference is required to upload frames to.
[Parsed_hwupload_2 @ 000001999ba8ee80] Query format failed for 'Parsed_hwupload_2': Invalid argument
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

我想要不使用 CPU 的完整硬件转码。

【问题讨论】:

  • 请注意ffmpeg 标签声明:“只有关于以编程方式使用 FFmpeg 库、API 或工具的问题才是主题。有关命令行工具的交互使用的问题应在Super UserVideo Production。”

标签: ffmpeg hardware-acceleration nvdec


【解决方案1】:

NVIDIA FFMPEG TRANSCODE GUIDE

您可以按照它使用硬件 NVIDIA GPU 进行完整转码。

您需要在启用 CUDA 功能的情况下手动编译 FFmpeg。因为scale是一个使用CPU资源的软件。另一方面是scale_nppscale_cuda 使用GPU 资源(有限选项)。

hwdownload:帧下降到内存,这是 GPU VRAM -> RAM 中的平均数据。

hwuploadhwdownload 的反转。注意:NVENC 仅适用于 GPU VRAM。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-31
    • 2011-08-24
    • 2021-06-04
    • 2012-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多