{"id":262,"date":"2022-01-31T15:41:47","date_gmt":"2022-01-31T07:41:47","guid":{"rendered":"http:\/\/192.168.0.122:8088\/?p=262"},"modified":"2022-08-11T03:35:22","modified_gmt":"2022-08-10T19:35:22","slug":"window10_ffmpeg-with-nvidia-gpu%e7%bc%96%e8%af%91","status":"publish","type":"post","link":"https:\/\/www.xianwaizhiyin.net\/?p=262","title":{"rendered":"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1"},"content":{"rendered":"\n<p>\u672c\u6587\u642c\u8fd0\u4f18\u5316\u5230\u300aFFmpeg\u539f\u7406\u300b\u4e00\u4e66\uff1ahttps:\/\/ffmpeg.xianwaizhiyin.net\/compile-ffmpeg\/nvidia.html<\/p>\n\n\n\n<p>\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd \u5982\u4f55\u5728window10\u7684\u73af\u5883\u4e0b \u7f16\u8bd1ffmpeg \u7684 \u786c\u4ef6\u7f16\u89e3\u7801\u5668\uff0cNVENC \u8ddf NVDEC\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u7535\u8111\u9700\u8981\u88c5 \u4e00\u5757 NVIDIA \u7684\u663e\u5361\uff0c\u6211\u7684\u662f GeForce RTX 2060 \u3002<\/p>\n\n\n\n<p>NVENC \u8ddf NVDEC \u7f16\u89e3\u7801\u5668\u6240\u652f\u6301\u7684GPU\u663e\u5361\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u5730\u5740\u67e5\u770b\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.nvidia.com\/video-encode-and-decode-gpu-support-matrix-new#Encoder\">https:\/\/developer.nvidia.com\/video-encode-and-decode-gpu-support-matrix-new#Encoder<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1389\" height=\"610\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png\" alt=\"\" class=\"wp-image-230\"\/><\/figure>\n\n\n\n<p>\u7f16\u8bd1\u51fa NVENC \u8ddf NVDEC \u7f16\u89e3\u7801\u5668 \u9700\u8981\u5148\u5b89\u88c5 CUDA toolkits \uff0c\u53c2\u8003\u5b98\u7f51\u6559\u7a0b\u5b89\u88c5\uff0c<a href=\"https:\/\/docs.nvidia.com\/cuda\/cuda-installation-guide-microsoft-windows\/index.html\">CUDA \u5b89\u88c5\u6559\u7a0b<\/a> \u3002<\/p>\n\n\n\n<p>\u5f00\u59cb\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<p>1\uff0c\u5148\u67e5\u770b\u81ea\u5df1\u672c\u5730 NVIDIA \u7684\u9a71\u52a8\u7248\u672c\u3002\u70b9\u51fb\u83dc\u5355\u680f\u7684 \"\u5e2e\u52a9\" -&gt; \"\u7cfb\u7edf\u4fe1\u606f\" \u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"938\" height=\"681\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-2.png\" alt=\"\" class=\"wp-image-231\"\/><\/figure>\n\n\n\n<p>\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0c\u672c\u5730\u663e\u5361 GeForce RTX 2060 \u7684\u9a71\u52a8\u7248\u672c\u53f7\u662f 456.71\uff0c\u518d\u70b9\u51fb\u6b64<a href=\"https:\/\/docs.nvidia.com\/cuda\/cuda-toolkit-release-notes\/index.html\">\u94fe\u63a5<\/a>\uff0c\u67e5\u770b \u663e\u5361\u9a71\u52a8 456.71 \u7248\u672c\u5bf9\u5e94\u7684 <strong>CUDA Toolkit<\/strong> \u7248\u672c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"761\" height=\"642\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-3.png\" alt=\"\" class=\"wp-image-232\"\/><\/figure>\n\n\n\n<p>\u7531\u4e8eToolkit Driver (\u663e\u5361\u9a71\u52a8) \u662f\u5411\u540e\u517c\u5bb9\u7684\uff0c\u6240\u4ee5\u6211\u4eec\u9009\u62e9 <a href=\"https:\/\/developer.nvidia.com\/cuda-10.1-download-archive-base\">CUDA toolkits 10.1<\/a> \u8fdb\u884c\u5b89\u88c5\u3002 CUDA toolkits 10.1 \u652f\u6301\u7684 \u663e\u5361\u9a71\u52a8 \u6700\u4f4e\u7248\u672c\u662f 418.96\u3002\u6211\u4eec\u7684\u663e\u5361\u9a71\u52a8 \u7248\u672c\u53f7\u662f 456.71\uff0c\u6240\u4ee5\u7528 CUDA toolkits 10.1 \u662f\u6ca1\u95ee\u9898\u7684\u3002<\/p>\n\n\n\n<p>CUDA Toolkits \u5386\u53f2\u7248\u672c\u4e0b\u8f7d\uff1a<a href=\"https:\/\/developer.nvidia.com\/cuda-toolkit-archive\">https:\/\/developer.nvidia.com\/cuda-toolkit-archive<\/a><\/p>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u8bb2\u89e3\u4e00\u4e0b Toolkit Driver (\u663e\u5361\u9a71\u52a8) \u8ddf CUDA toolkits \uff08CUDA\u5de5\u5177\u5957\u4ef6\uff09\u7684\u5173\u7cfb\u3002\u56e0\u4e3a\u8981\u7f16\u8bd1\u786c\u4ef6\u7f16\u89e3\u7801\u5668 NVENC \u8ddf NVDEC\uff0c\u6240\u4ee5\u9700\u8981\u5b89\u88c5 CUDA toolkits \u8fdb\u884c\u7f16\u8bd1\u3002 CUDA toolkits \u53ea\u662f\u7f16\u8bd1\u7a0b\u5e8f\u7684\u65f6\u5019\u9700\u8981\uff0c\u4e00\u65e6\u7f16\u8bd1\u51fa\u6765 exe\u8fd0\u884c\u6587\u4ef6\uff0cCUDA toolkits \u5c31\u6ca1\u7528\u4e86\uff0c\u4e5f\u5c31\u662f\u8bf4\u5ba2\u6237\u7684\u76ee\u6807\u673a\u5668\u53ea\u9700\u8981\u5b89\u88c5 Toolkit Driver (\u663e\u5361\u9a71\u52a8) \u5c31\u80fd\u7528 ffmpeg.exe \u91cc\u9762\u7684\u786c\u4ef6\u7f16\u89e3\u7801 NVENC \u8ddf NVDEC\uff0c\u5ba2\u6237\u7684\u76ee\u6807\u673a\u5668\u4e0d\u9700\u8981 \u5b89\u88c5CUDA toolkits \u3002\u5b98\u7f51\u7684\u6559\u7a0b\u6709\u63d0\u53ca\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p><strong>Running a CUDA application requires the system with at least one CUDA capable GPU and a driver that is compatible with the CUDA Toolkit.<\/strong><\/p>\n\n\n\n<p>CUDA \u7684\u5168\u79f0\u662f Compute Unified Device Architecture\uff0c\u8ba1\u7b97\u673a\u7edf\u4e00\u8bbe\u5907\u67b6\u6784\u3002<\/p>\n\n\n\n<p>2\uff0c\u5f00\u59cb\u5b89\u88c5\uff0cCUDA toolkits 10.1\u5b89\u88c5\u754c\u9762\u5982\u4e0b\uff0c<strong>\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5<\/strong>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"455\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-3-1.png\" alt=\"\" class=\"wp-image-233\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"442\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-3-2.jpg\" alt=\"\" class=\"wp-image-234\"\/><\/figure>\n\n\n\n<p>\u8fd9\u4e2aCUDA toolkits \u7ecf\u5e38\u5b89\u88c5\u5931\u8d25\uff0c\u672c\u4eba\u88c5\u4e862\u4e2a\u5c0f\u65f6\uff0c\u5b98\u7f51\u82f1\u6587\u6559\u7a0b\u4e5f\u770b\u4e86\u3002\u6700\u540e\u662f\u91cd\u542f window 10 \u518d\u5b89\u88c5\u5c31\u597d\u4e86\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"438\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-3-3.png\" alt=\"\" class=\"wp-image-235\"\/><\/figure>\n\n\n\n<p>CUDA toolkits \u5b89\u88c5\u5b8c\u6bd5\uff0c\u5728CMD\u547d\u4ee4\u884c\u8f93\u5165 nvcc -V\uff0c\u67e5\u770b\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"249\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-3-4.png\" alt=\"\" class=\"wp-image-236\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>google_ads_content<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u672c\u6587 \u7f16\u8bd1\u7684 ffmpeg.exe \u662f64\u4f4d\uff0c\u56e0\u4e3a 64\u4f4d\u624d\u80fd\u6700\u5927\u53d1\u6325 CUDA toolkits \u7684\u4f5c\u7528\u3002\u5b98\u7f51\u7684\u6559\u7a0b\u6709\u8bb2\u5982\u4f55\u7f16\u8bd1 32\u4f4d\uff0c\u4f46\u662f\u6211\u770b\u4e86\u4e0b\uff0c32\u4f4d\u4f1a\u5c11\u5f88\u591a\u5e93\uff0c\u5e94\u8be5\u4f1a\u5c11\u5f88\u591a\u529f\u80fd\uff0c\u6240\u4ee5\u672c\u6587\u4e0d\u8bb2\u89e332\u4f4d\u7684\u7f16\u8bd1\u3002<\/p>\n\n\n\n<p>CUDA toolkits \u91cc\u9762\u53ea\u6709lib\u540e\u7f00\u7684\u5e93\uff0c\u6240\u4ee5 ffmpeg \u53ea\u80fd\u7528 MSYS2 + MSVC \u7684\u65b9\u5f0f\u7f16\u8bd1\u3002<\/p>\n\n\n\n<p>NVIDIA \u5b98\u65b9 FFmpeg \u7f16\u8bd1\u6559\u7a0b \uff1a <a href=\"https:\/\/docs.nvidia.com\/video-technologies\/video-codec-sdk\/ffmpeg-with-nvidia-gpu\">ffmpeg-with-nvidia-gpu<\/a><\/p>\n\n\n\n<p>\u56e0\u4e3a\u9700\u8981\u7528\u5230 MSVC \uff0c\u6240\u4ee5\u9700\u8981\u5b89\u88c5 vs2019 \uff0c\u8bf7\u81ea\u884c\u5b89\u88c5\u3002vs2017 \u5e94\u8be5\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u672c\u6587\u662f\u57fa\u4e8e vs2019\u7684\u3002MSYS2 \u5728\u4e4b\u524d\u7684\u6587\u7ae0\u5df2\u7ecf\u88c5\u8fc7\u4e86\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u867d\u7136\u4e5f\u662f\u7528\u7684MSYS2\uff0c\u4f46\u662f\u8ddf\u300awindow10_ffmpeg\u8c03\u8bd5\u73af\u5883\u642d\u5efa-\u81ea\u5df1\u7f16\u8bd1\u300b\u4e0d\u540c\uff0c\u4e0d\u80fd\u76f4\u63a5\u5728 window10 CMD \u91cc\u9762\u76f4\u63a5 \u8f93\u5165 <strong>.\\msys2_shell.cmd -mingw64<\/strong>\u3002<\/p>\n\n\n\n<p>\u56e0\u4e3a\u9700\u8981\u7528\u5230 vs2019 \u91cc\u9762\u7684 cl.exe \u6765\u7f16\u8bd1 ffmpeg \u7684\u4ee3\u7801\uff0c\u9700\u8981\u7528 vs2019 \u91cc\u9762\u7684 link.exe \u6765\u94fe\u63a5\u5e93\u3002\u8fd8\u9700\u8981\u7528\u5230 vs2019 \u91cc\u9762\u7684 \u67d0\u4e9blib \u5e93\uff0c\u4f8b\u5982 LIBCMT.lib\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5MSYS2 \u9700\u8981\u7ee7\u627f vs2019 \u7684\u73af\u5883\u53d8\u91cf\uff0c\u600e\u4e48\u7ee7\u627f\u5462\uff1f<\/p>\n\n\n\n<p><strong>MSYS2 \u73af\u5883\u7ee7\u627fvs2019 \u7684\u73af\u5883\u53d8\u91cf \u64cd\u4f5c\u6559\u7a0b\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c\u4fee\u6539 <code class=\"prettyprint\" >C:\\msys64\\msys2_shell.cmd<\/code> \u4e2d\u7684 <code>rem set MSYS2_PATH_TYPE=inherit<\/code>\uff0c\u53bb\u6389rem\uff0c\u53d6\u6d88\u8fd9\u2f00\u53e5\u7684\u6ce8\u91ca\u3002\u4f7fMSYS2\u7684\u73af\u5883\u53d8\u91cf\u7ee7\u627f\u5f53\u524dCMD\u7684\u7a97\u53e3\u7684\u73af\u5883\u53d8\u91cf\u3002<\/p>\n\n\n\n<p>2\uff0c\u91cd\u547d\u540d <code class=\"prettyprint\" >C:\/msys64\/usr\/bin\/link.exe<\/code> \u4e3a <code>C:\/msys64\/usr\/bin\/link.bak<\/code> , \u907f\u514d\u548cMSVC \u7684link.exe\u62b5\u89e6\u3002\u8fd9\u4e2a\u662f\u7f51\u4e0a\u6587\u7ae0\u7684\u505a\u6cd5\uff0c\u8fd9\u4e2a\u5176\u5b9e\u5728\u65b0\u7248\u7684ffmpeg \u91cc\u9762\u662f\u4e0d\u9700\u8981\u7684\uff0c\u5728 configure\u91cc\u9762\u7f16\u8bd1\u7684\u65f6\u5019\uff0c\u8c03\u7528\u7684\u662f .\/compat\/window\/mslink \uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-5.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" > .\/compat\/window\/mslink \u4ee3\u7801\n#!\/bin\/sh\n\u200b\nLINK_EXE_PATH=$(dirname &quot;$(command -v cl)&quot;)\/link\nif &#091; -x &quot;$LINK_EXE_PATH&quot; ]; then\n    &quot;$LINK_EXE_PATH&quot; $@\nelse\n    link.exe $@\nfi\nexit $?\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u662f mslink \u7684\u4ee3\u7801\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u4ed6\u7684\u903b\u8f91\u5c31\u662f\u4f18\u5148 \u4f7f\u7528 \u8ddf cl.exe \u540c\u76ee\u5f55\u4e0b\u7684 link.exe\u3002cl.exe \u53ea\u6709\u5728vs2019 \u90a3\u91cc\u624d\u6709\uff0cC:\/msys64\/usr\/bin \u76ee\u5f55\u4e0b\u6ca1\u6709 cl.exe\uff0c\u6240\u4ee5\u4f1a\u4f18\u9009\u4f7f\u7528 vs2019 \u91cc\u9762\u7684link.exe\uff0c\u6240\u4ee5\u4e0d\u91cd\u547d\u540d <code class=\"prettyprint\" >C:\/msys64\/usr\/bin\/link.exe<\/code> \u4e5f\u6ca1\u5173\u7cfb\u3002<\/p>\n\n\n\n<p>3\uff0c\u4e0a\u9762\u7684 <code class=\"prettyprint\" >C:\\msys64\\msys2_shell.cmd<\/code> \u6587\u4ef6\u5df2\u7ecf\u4fee\u6539\u597d\u4e86\uff0c\u73b0\u5728\u8981\u627e\u5230 x64 Native Tools Command Prompt for VS 2019 \u8fd9\u4e2a\u547d\u4ee4\u5de5\u5177\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"864\" height=\"184\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-6.png\" alt=\"\" class=\"wp-image-239\"\/><\/figure>\n\n\n\n<p>\u70b9\u51fb x64 Native Tools Command Prompt for VS 2019 \u6253\u5f00\u547d\u4ee4\u884c\uff0c\u4e00\u5b9a\u8981\u8fd9\u6837\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u8fd9\u6837\u547d\u4ee4\u884c\u624d\u80fd\u6709 vs2019 \u7684\u73af\u5883\u53d8\u91cf\uff0c\u7136\u540e\u624d\u80fd\u8ba9 msys2 \u6765\u7ee7\u627f\uff0c\u6211\u4e4b\u524d\u8bf4\u7684 MSYS2_PATH_TYPE=inherit \u7ee7\u627f\u7684\u73af\u5883\u53d8\u91cf \u662f\u5f53\u524d\u7a97\u53e3\u7684\u73af\u5883\u53d8\u91cf\u5c31\u662f\u8fd9\u4e2a\u610f\u601d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"788\" height=\"309\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-7.png\" alt=\"\" class=\"wp-image-240\"\/><\/figure>\n\n\n\n<p>\u5343\u4e07\u4e0d\u8981\u7528\u4e0b\u9762\u8fd9\u79cd win+R \u7684\u65b9\u5f0f\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u8fd9\u6837\u5b50\u6253\u5f00\u547d\u4ee4\u884c\u662f\u6ca1\u6709 vs2019 \u7684\u73af\u5883\u53d8\u91cf\u7684\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"230\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-8.png\" alt=\"\" class=\"wp-image-241\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"231\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-9.png\" alt=\"\" class=\"wp-image-242\"\/><\/figure>\n\n\n\n<p>4\uff0c\u6f14\u793a\u5b8c\u9519\u8bef\u7684\u6253\u5f00CMD\u7684\u65b9\u5f0f\uff0c\u6211\u4eec\u7ee7\u7eed\u64cd\u4f5c\uff0c\u5728 x64 Native Tools Command Prompt for VS 2019 \u547d\u4ee4\u7a97\u53e3\u8f93\u5165 <code class=\"prettyprint\" >cd c:\\msys64\\<\/code> \u5148\u56de\u5230 msys64\u76ee\u5f55\uff0c\u7136\u540e\u518d\u8f93\u5165 <code>.\\msys2_shell.cmd -mingw64<\/code>\uff0c\u542f\u52a8 msys2 \u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >#\u56de\u5230 MSYS2 \u7684\u5b89\u88c5\u76ee\u5f55\ncd c:\\msys64\\\n#\u542f\u52a8 msys2 \u547d\u4ee4\u884c\n.\\msys2_shell.cmd -mingw64<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"338\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-10.png\" alt=\"\" class=\"wp-image-243\"\/><\/figure>\n\n\n\n<p>5\uff0c\u5728 msys2 \u547d\u4ee4\u884c\u7a97\u53e3 \u8f93\u5165 <code class=\"prettyprint\" >echo $LIB<\/code> \uff0c\u53ef\u4ee5\u770b\u5230 msys2 \u547d\u4ee4\u884c\u7a97\u53e3 \u5df2\u7ecf\u7ee7\u627f\u4e86 vs2019 \u7684 lib \u73af\u5883\u53d8\u91cf\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"204\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-11.png\" alt=\"\" class=\"wp-image-244\"\/><\/figure>\n\n\n\n<p>6\uff0c\u518d\u8f93\u5165\u4e00\u4e0b <code class=\"prettyprint\" >which cl.exe<\/code> \uff0c\u786e\u8ba4\u4e00\u4e0b cl.exe \u662f\u5728vs2019\u7684\u76ee\u5f55\u4e0b\uff0c\u540c\u65f6\u770b\u4e0bcl.exe\u7684\u76ee\u5f55\u662f\u5426\u6709link.exe\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"155\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-12.png\" alt=\"\" class=\"wp-image-245\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>MSYS2 + MSVC \u73af\u5883\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\uff0cMSYS2 \u547d\u4ee4\u884c\u5df2\u7ecf\u7ee7\u627f\u4e86 vs2019 \u7684\u73af\u5883\u53d8\u91cf\uff0c\u4e0b\u9762\u5f00\u59cb\u505a\u4e00\u4e9b \u7f16\u8bd1 ffmpeg \u524d\u7684\u51c6\u5907\u5de5\u4f5c\u3002<\/p>\n\n\n\n<p><strong>\u7f16\u8bd1 ffmpeg NVENC NVDEC \u6559\u7a0b\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c\u4e0b\u8f7d FFmpeg-n4.4.1.zip \uff0c<a href=\"https:\/\/pan.baidu.com\/s\/1W2rMeyVfrYkxP3XqC9aG8A\">\u767e\u5ea6\u7f51\u76d8<\/a>\uff0c\u63d0\u53d6\u7801\uff1arpo3 \uff0c\u4e0b\u8f7d\u597d\u4e4b\u540e\u89e3\u538b\u5230 <code class=\"prettyprint\" >C:\\msys64\\home\\loken\\ffmpeg<\/code> \uff0c\u8fd9\u4e2a\u76ee\u5f55\u662f\u6211\u4eec\u4e4b\u524d\u6587\u7ae0\u7ecf\u5e38\u7528\u7684\u76ee\u5f55\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"606\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-13.png\" alt=\"\" class=\"wp-image-246\"\/><\/figure>\n\n\n\n<p>2\uff0c\u5b89\u88c5\u6240\u9700\u8f6f\u4ef6\uff0c<code class=\"prettyprint\" >pacman -S diffutils make pkg-config yasm<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"579\" height=\"168\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-14.png\" alt=\"\" class=\"wp-image-247\"\/><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u6211\u9700\u8981\u8bb2\u89e3\u4e00\u4e0b pkg-config \u8fd9\u4e2a\u8f6f\u4ef6\u7684\u4f5c\u7528\uff0cpkg-config \u8fd9\u4e2a\u547d\u4ee4\u884c\u5728linux\u5b89\u88c5\u8f6f\u4ef6\u7ecf\u5e38\u4f7f\u7528\uff0c\u4ed6\u5230\u5e95\u662f\u505a\u4ec0\u4e48\u7528\u7684\u5462\uff1f<\/p>\n\n\n\n<p>\u53c2\u8003\u9605\u8bfb\uff1a<a href=\"https:\/\/www.jianshu.com\/p\/7eee92d8ad7b\">Linux\u7684pkg-config\u547d\u4ee4<\/a>\uff0c\u5728\u672c\u6587\u4e2d pkg-config \u547d\u4ee4\u7684\u4f5c\u7528\u662f\u63d0\u53d6 ffnvcodec.pc \u7684\u53d8\u91cf\u3002<\/p>\n\n\n\n<p>3\uff0c\u4e0b\u8f7d nv-codec-headers\uff0cnv-codec-headers \u662f \u4e0e Nvidias \u7f16\u89e3\u7801\u5668 API \u63a5\u53e3(interface)\u6240\u9700\u7684\u5934\u6587\u4ef6\u7684 FFmpeg \u7248\u672c\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u8ddf \u5b98\u65b9\u6559\u7a0b <a href=\"https:\/\/docs.nvidia.com\/video-technologies\/video-codec-sdk\/ffmpeg-with-nvidia-gpu\">ffmpeg-with-nvidia-gpu<\/a> \u4e0d\u592a\u4e00\u6837\uff0c\u4e0d\u80fd\u76f4\u63a5\u6267\u884c <code class=\"prettyprint\" >git clone https:\/\/git.videolan.org\/git\/ffmpeg\/nv-codec-headers.git<\/code> \u56e0\u4e3a\u62c9\u4e0b\u6765\u7684 nv-codec-headers \u9700\u8981\u7684\u663e\u5361\u9a71\u52a8\u81f3\u5c11\u8981 471.41 \u4ee5\u4e0a\uff0c\u6211\u4eec\u672c\u5730\u663e\u5361\u9a71\u52a8\u662f 456.71\uff0c\u5982\u679c\u76f4\u63a5\u7528\u5b98\u7f51\u7684\u547d\u4ee4\u4f1a\u7f16\u8bd1\u5931\u8d25\u3002<\/p>\n\n\n\n<p>nv-codec-headers \u7684Readme \u5982\u4e0b\uff0c\u53ef\u4ee5\u770b\u5230 \u6240\u9700\u663e\u5361\u9a71\u52a8\u7248\u672c\uff1a<\/p>\n\n\n\n<p>FFmpeg version of headers required to interface with Nvidias codec APIs.<br>\u200b<br>Corresponds to Video Codec SDK version 11.0.10.<br>\u200b<br>Minimum required driver versions:<br>Linux: 470.57.02 or newer<br>Windows: 471.41 or newer<\/p>\n\n\n\n<p>\u6240\u4ee5 nv-codec-headers \u9700\u8981\u624b\u52a8\u4e0b\u8f7d\uff0c<a href=\"https:\/\/github.com\/FFmpeg\/nv-codec-headers\/releases\">nv-codec-headers\u4e0b\u8f7d\u5730\u5740<\/a>\uff0c\u6211\u4eec\u9009 <a href=\"https:\/\/github.com\/FFmpeg\/nv-codec-headers\/releases\/tag\/n9.1.23.3\">Version 9.1.23.3<\/a> \u4e0b\u8f7d\uff0c\u56e0\u4e3a\u663e\u5361\u9a71\u52a8\u662f\u5411\u540e\u517c\u5bb9\u7684\uff0c 9.1.23.3 \u7684\u7248\u672c\u53ef\u7528\u3002<\/p>\n\n\n\n<p>4\uff0c\u4e0b\u8f7d\u5b8c nv-codec-headers \u4e4b\u540e\uff0c\u89e3\u538b\u5230 <code class=\"prettyprint\" >C:\\msys64\\home\\loken\\ffmpeg<\/code> \u76ee\u5f55\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"460\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-15.png\" alt=\"\" class=\"wp-image-248\"\/><\/figure>\n\n\n\n<p>5\uff0c\u5b89\u88c5 nv-codec-headers-n9.1.23.3\u3002\u5230\u8fd9\u4e00\u6b65\uff0c\u4e5f\u4e0d\u80fd\u50cf \u5b98\u65b9\u6559\u7a0b <a href=\"https:\/\/docs.nvidia.com\/video-technologies\/video-codec-sdk\/ffmpeg-with-nvidia-gpu\">ffmpeg-with-nvidia-gpu<\/a> \u90a3\u6837\u76f4\u63a5\u8fdb\u5165 nv-codec-headers-n9.1.23.3\uff0c\u7136\u540e\u6267\u884cmake install\u3002\u6211\u4eec\u9700\u8981\u624b\u52a8\u6539\u4e0b nv-codec-headers-n9.1.23.3 \u91cc\u9762\u7684 ffnvcodec.pc \u6587\u4ef6\uff0c\u6539\u52a8\u6700\u540e\u4e00\u884c\uff0c\u6539\u52a8\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >Cflags: -I${includedir}\n\u6539\u4e3a\nCflags: -IC:\/msys64\/home\/loken\/ffmpeg\/nv-codec-headers-n9.1.23.3\/include<\/code><\/pre>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8981\u8fd9\u6837\u6539\uff0c\u662f\u56e0\u4e3a configure \u91cc\u9762\u7528 cl.exe \u7f16\u8bd1\u7684\u65f6\u5019\uff0c\u4e0d\u80fd\u5f15\u5165 <code class=\"prettyprint\" >C:\/msys64\/usr\/include<\/code> \u91cc\u9762\u7684\u5934\u6587\u4ef6\uff0c\u4f1a\u8ddf MSVC \u7684\u5934\u6587\u4ef6\u540c\u540d\u6df7\u4e71\uff0c\u5bfc\u81f4\u62a5\u9519\u3002<\/p>\n\n\n\n<p><code class=\"prettyprint\" >Cflags: -I${includedir}<\/code> \u7684\u8fd0\u7b97\u7ed3\u679c\u5c31\u662f <code>Cflags: -IC:\/msys64\/usr\/include<\/code> \u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4e0d\u6539\uff0cconfigure\u7684\u65f6\u5019\uff0c\u5728ffbuild\/config.log \u4e2d\u4f1a\u62a5 C2054 \u7b49\u7b49\u9519\u8bef\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1610\" height=\"689\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-16.png\" alt=\"\" class=\"wp-image-249\"\/><\/figure>\n\n\n\n<p>\u8fd9\u4e2aC2054 \u9519\u8bef\u975e\u5e38\u9690\u853d\uff0c\u8fd9\u4e2a\u9519\u8bef\u4e0d\u4f1a\u5bfc\u81f4 configure\u5931\u8d25\uff0c\u6240\u4ee5\u770bconfigure\u7684\u8f93\u51fa\u662f\u6210\u529f\u7684\uff0c\u53ea\u662f\u7f16\u8bd1\u51fa\u6765\u7684 ffmpeg.exe\uff0c\u6267\u884c ffmpeg.exe -hwaccels \u663e\u793a\u786c\u4ef6\u52a0\u901f\u7684\u65f6\u5019\uff0c\u6ca1\u6709cuda\u8fd9\u4e2a\u9009\u9879\u8f93\u51fa\u3002\u4e5f\u65e0\u6cd5\u4f7f\u7528\u786c\u4ef6\u7f16\u89e3\u7801\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u5b66\u4f1a\u770b ffbuild \u76ee\u5f55\u4e0b\u7684 config.log \u65e5\u5fd7\u975e\u5e38\u91cd\u8981\u3002<\/p>\n\n\n\n<p>6\uff0c\u6539\u597d ffnvcodec.pc \u4e4b\u540e\uff0c\u6211\u4eec\u8fdb\u5165 nv-codec-headers-n9.1.23.3 \u76ee\u5f55\uff0c\u6267\u884c make install PREFIX=\/usr<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"245\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-17.png\" alt=\"\" class=\"wp-image-250\"\/><\/figure>\n\n\n\n<p>\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0c<strong>make install PREFIX=\/usr<\/strong> \u547d\u4ee4\u6700\u4e3b\u8981\u7684\u5c31\u662f\u628a ffnvcodec.pc \u62f7\u8d1d\u5230 \/usr\/lib\/pkgconfig \u76ee\u5f55\uff0c\/usr\/include\/ffnvcodec \u91cc\u9762\u7684\u5934\u6587\u4ef6\u6211\u4eecconfigure\u7f16\u8bd1\u7684\u65f6\u5019\u7528\u4e0d\u5230\uff0c\u4e0a\u9762\u5df2\u7ecf\u628a ffnvcodec.pc \u91cc\u9762\u7684 Cflags \u53c2\u6570\u6539\u4e86\u3002\u6240\u4ee5\u4f60\u53ef\u4ee5\u4e0d\u7528 make install\uff0c\u624b\u52a8\u628a ffnvcodec.pc \u62f7\u8d1d\u5230 \/usr\/lib\/pkgconfig \u76ee\u5f55\uff0c\u6548\u679c\u662f\u4e00\u6837\u7684\u3002\u53ef\u4ee5\u8fdb\u5165 nv-codec-headers-n9.1.23.3 \u76ee\u5f55\u770b\u770b\uff0c\u5b9e\u9645\u4e0a\u53ea\u6709\u51e0\u4e2a .h \u5934\u6587\u4ef6\u8ddf .pc \u6587\u4ef6\u3002<\/p>\n\n\n\n<p><strong>\u6269\u5c55\u77e5\u8bc6\uff1a<\/strong><\/p>\n\n\n\n<p>\u7f51\u4e0a\u6709\u4e9b\u6587\u7ae0\u662f\u65e7\u7248\u7684\u7f16\u8bd1\u89c4\u5219\uff0c\u65e7\u7248\u7684\u9700\u8981\u4e0b\u8f7d <a href=\"https:\/\/developer.nvidia.com\/nvidia-video-codec-sdk\">Video_Codec_SDK<\/a>\uff0c\u6211\u4eec\u53ef\u4ee5\u4e0b\u8f7d\u4e00\u4e2a\u6765\u770b\u770b\uff0cVideo_Codec_SDK \u91cc\u9762\u4e3b\u8981\u662f\u4e00\u4e9b lib \u5e93\u8ddf .h\u5934\u6587\u4ef6\uff0c\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"233\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-18.png\" alt=\"\" class=\"wp-image-251\"\/><\/figure>\n\n\n\n<p>\u6211\u7528 <a href=\"https:\/\/www.voidtools.com\/zh-cn\/\">Everything<\/a> \u8f6f\u4ef6 \u641c\u7d22 nvcuvid.lib \u8fd9\u4e2a\u5e93\uff0c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"743\" height=\"346\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-19.png\" alt=\"\" class=\"wp-image-252\"\/><\/figure>\n\n\n\n<p>\u6211\u7535\u8111\u662f\u88c5\u4e86 4\u4e2a\u7248\u672c\u7684 CUDA toolkits\uff0c8.0\uff0c9.0\uff0c9.2\uff0c10.1\uff0c\u53ef\u4ee5\u770b\u5230 10.1 \u7248\u672c\u7684 CUDA toolkits \u5e76\u6ca1\u6709\u51fa\u73b0\u5728 everything \u7684\u641c\u7d22\u91cc\u9762\uff0c\u6240\u4ee5CUDA toolkits\u4ece 10.1 \u7248\u672c\u5f00\u59cb\u5c31\u53bb\u6389\u4e86 nvcuvid.lib \u8fd9\u4e2a\u5e93\uff0c\u4e4b\u524d\u7684\u786c\u4ef6\u89e3\u7801\u5668\u597d\u50cf\u662f \u53ebcuvid\uff0c\u73b0\u5728\u597d\u50cf\u6539\u4e86\u4e2a\u540d\u5b57\uff0c\u53ebnvdec\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u672c\u6587\u7f16\u8bd1 ffmpeg NVENC NVDEV\uff0c\u4e0d\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5 <a href=\"https:\/\/developer.nvidia.com\/nvidia-video-codec-sdk\">Video_Codec_SDK<\/a> \uff0c\u90a3\u662f\u65e7\u7248\u7684\u65b9\u5f0f\u3002\u54b1\u4eec\u7528\u7684 CUDA toolkits \u7248\u672c\u662f 10.1\uff0c\u662f\u65b0\u7248\u7684\u3002<\/p>\n\n\n\n<p>\u7f16\u8bd1 ffmpeg NVENC NVDEV \u7279\u522b\u91cd\u8981\u7684\u4e00\u4e2a\u5730\u65b9\u5c31\u662f\u7248\u672c\u53f7\u662f\u5426\u5339\u914d\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u663e\u5361\u9a71\u52a8\u7248\u672c\u53f7<\/li><li>CUDA toolkits \u7248\u672c\u53f7\u3002<\/li><li>nv-codec-headers \u7248\u672c\u53f7<\/li><\/ul>\n\n\n\n<p>\u4e0a\u9762\u8fd9\u4e2a 3\u4e2a\u4e1c\u897f\u7684\u7248\u672c\u53f7\u5fc5\u987b\u5339\u914d\u624d\u80fd\u7f16\u8bd1\u6210\u529f\u3002<\/p>\n\n\n\n<p>7\uff0c\u5b89\u88c5\u597d nv-codec-headers \u4e4b\u540e\uff0c\u7ee7\u7eed\u64cd\u4f5c\uff0c\u56de\u5230 \/home\/loken\/ffmpeg \u76ee\u5f55\uff0c\u521b\u5efa <strong>nv_sdk_10.1<\/strong> \u6587\u4ef6\u5939\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >cd \/home\/loken\/ffmpeg\/\nmkdir nv_sdk_10.1<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"199\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-19-1.png\" alt=\"\" class=\"wp-image-253\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"394\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-19-2.png\" alt=\"\" class=\"wp-image-254\"\/><\/figure>\n\n\n\n<p>8\uff0c\u590d\u5236 C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\include \u4e0b\u9762\u6240\u6709\u7684\u6587\u4ef6\u5230 <strong>nv_sdk_10.1<\/strong> \u76ee\u5f55<\/p>\n\n\n\n<p>9\uff0c\u590d\u5236 C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\lib\\x64 \u4e0b\u9762\u6240\u6709\u7684\u5e93\u6587\u4ef6\u5230 <strong>nv_sdk_10.1<\/strong> \u76ee\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"713\" height=\"414\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-19-3.png\" alt=\"\" class=\"wp-image-255\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>google_ads_content<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u64cd\u4f5c\u5230\u8fd9\u91cc\uff0cnv-codec-headers \u5df2\u7ecf\u5b89\u88c5\u597d\u4e86\uff0cCUDA toolkits \u7684lib\u8ddf\u5934\u6587\u4ef6\u4e5f\u5df2\u7ecf\u62f7\u8d1d\u5230 <strong>C:\\msys64\\home\\loken\\ffmpeg\\nv_sdk_10.1<\/strong> \u76ee\u5f55\uff0c\u4e0b\u9762\u6b63\u5f0f\u5f00\u59cb\u7f16\u8bd1 FFmpeg NVENC NVDEC\u3002<\/p>\n\n\n\n<p><strong>FFmpeg NVENC NVDEC \u7f16\u8bd1\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c\u8fdb\u5165 FFmpeg-n4.4.1 \u6e90\u7801\u76ee\u5f55<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >cd \/home\/loken\/ffmpeg\/FFmpeg-n4.4.1<\/code><\/pre>\n\n\n\n<p>2\uff0c\u6dfb\u52a0 <code class=\"prettyprint\" >\/usr\/lib\/pkgconfig<\/code> \u8def\u5f84\u5230 $PKG_CONFIG_PATH<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >export PKG_CONFIG_PATH=&quot;\/usr\/lib\/pkgconfig&quot;:$PKG_CONFIG_PATH<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\u505a\u662f\u56e0\u4e3a \u6211\u4eec\u7684 ffnvcodec.pc \u662f\u5b89\u88c5\u5230 <code class=\"prettyprint\" >\/usr\/lib\/pkgconfig<\/code> \u4e0b\u7684\u3002<code>\/usr\/lib\/pkgconfig<\/code> \u76ee\u5f55\u9ed8\u8ba4\u4e0d\u5728 $PKG_CONFIG_PATH \u73af\u5883\u53d8\u91cf\u91cc\u9762\uff0c\u5982\u679c\u4e0d\u52a0\u8fdb\u53bb\uff0c\u4f1a\u5bfc\u81f4 configure\u7684\u65f6\u5019\u627e\u4e0d\u5230 ffnvcodec\uff0c\u7136\u540e\u8df3\u8fc7\u7f16\u8bd1 cuda \u786c\u4ef6\u52a0\u901f\uff0c\u867d\u7136\u80fdconfigure\u6210\u529f\uff0c\u6700\u540e\u4e5f\u80fd\u7f16\u8bd1\u6210\u529f\uff0c\u4f46\u662f ffmpeg.exe -hwaccels \u7684\u65f6\u5019\u6ca1\u6709 cuda\u8fd9\u4e2a\u9009\u9879\u8f93\u51fa\uff0c\u4e5f\u5c31\u6ca1\u6cd5\u4f7f\u7528\u786c\u4ef6\u7f16\u89e3\u7801\uff0c\u4ece ffbuild\/config.log \u53ef\u4ee5\u770b\u5230\u9519\u8bef\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1474\" height=\"312\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-20.png\" alt=\"\" class=\"wp-image-256\"\/><\/figure>\n\n\n\n<p>3\uff0cFFmpegn4.4.1 \u7248\u672c\u6e90\u7801\u5728 \u7f16\u8bd1 CUDA \u786c\u4ef6\u7f16\u89e3\u7801 \u8fd8\u4f1a\u62a5\u4e00\u4e2a\u9519\u8bef\uff0c\u9519\u8bef\u63d0\u793a\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p><code class=\"prettyprint\" >&quot;libavfilter\/vf_scale_cuda_bicubic.ptx.c(1925): fatal error C1091: compiler limit: string exceeds 65535 bytes in length&quot;<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"267\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-21.png\" alt=\"\" class=\"wp-image-257\"\/><\/figure>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2abug\uff0c<a href=\"https:\/\/trac.ffmpeg.org\/ticket\/9019\">bug\u5730\u5740<\/a>\uff0cffmpeg \u5df2\u7ecf\u4fee\u590d\u4e86\uff0c\u51fa\u4e86\u4e00\u4e2a patch \uff0c<a href=\"https:\/\/trac.ffmpeg.org\/attachment\/ticket\/9019\/0001-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch\">patch \u5730\u5740<\/a> \u3002\u8bf7\u6309\u7167patch\u8865\u4e01\u7684\u65b9\u6cd5\u4fee\u6539\u4ee5\u4e0b\u6587\u4ef6\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>FFmpeg-n4.4.1\\compat\\cuda\\ptx2c.sh<\/li><li>FFmpeg-n4.4.1\\configure<\/li><\/ul>\n\n\n\n<p>\u6216\u8005\u7528\u4ee5\u4e0b\u547d\u4ee4\u5e94\u7528\u8fd9\u4e2a patch\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" > git am 0001-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch<\/code><\/pre>\n\n\n\n<p>4\uff0c\u4e0a\u9762\u7684\u64cd\u4f5c\u90fd\u6267\u884c\u4e4b\u540e\uff0c\u53ef\u4ee5\u6b63\u5f0f\u5f00\u59cb\u7f16\u8bd1 ffmpeg \u4e86\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >.\/configure \\\n--prefix=\/home\/loken\/ffmpeg\/build64\/ffmepg-4.4-nv-10.1 \\\n--enable-gpl \\\n--enable-nonfree \\\n--disable-shared \\\n--enable-cuda-nvcc \\\n--enable-libnpp \\\n--toolchain=msvc \\\n--extra-cflags=&quot;-I\/home\/loken\/ffmpeg\/nv_sdk_10.1&quot; \\\n--extra-ldflags=&quot;-LIBPATH:\/home\/loken\/ffmpeg\/nv_sdk_10.1&quot;\n\u200b\nmake -j8\nmake install<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u8fd9\u4e2aconfigure \u547d\u4ee4\u6709\u4e2a\u91cd\u8981\u77e5\u8bc6\u70b9\u9700\u8981\u63d0\u53ca\u4e00\u4e0b\uff0c\u7528\u4e86 --toolchain=msvc \u4e4b\u540e\uff0c\u4f7f\u7528\u7684\u662f vs2019 \u76ee\u5f55\u7684 cl.exe \u6765\u7f16\u8bd1C\u4ee3\u7801\uff0c\u4e0d\u662f MSYS2 \u73af\u5883\u7684 gcc.exe\u4e86\u3002\u6240\u4ee5 --extra-ldflags \u6307\u5b9a\u5e93\u641c\u7d22\u8def\u5f84\u7684\u65b9\u5f0f \u662f <strong>-LIBPATH<\/strong> \uff0c\u4e0d\u662f <strong>-L<\/strong>\u3002 -L \u662f gcc.exe \u7528\u7684\u547d\u4ee4\u53c2\u6570\u3002-LIBPATH \u624d\u662f cl.exe\u7528\u7684\u547d\u4ee4\u53c2\u6570\u3002<\/p>\n\n\n\n<p>5\uff0c\u7f16\u8bd1\u5b8c\u6210\u4e4b\u540e\uff0cbuild64\/ffmpeg-4.4-nv-10.1 \u76ee\u5f55\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"234\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-22.png\" alt=\"\" class=\"wp-image-258\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"175\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-23.png\" alt=\"\" class=\"wp-image-259\"\/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0cmsys2 + msvc \u7f16\u8bd1\u51fa\u6765\u7684 ffmpeg.exe \u975e\u5e38\u7cbe\u7b80\uff0c\u4e0d\u50cf\u4e4b\u524d msys2 + MinGW \u7f16\u8bd1\u51fa\u6765\u7684 ffmpeg.exe \u8fd0\u884c\u9700\u8981\u62f7\u8d1d\u4e00\u5806dll\u5e93\u8fc7\u6765\u3002<\/p>\n\n\n\n<p>6\uff0c\u6267\u884c <strong>.\/ffmpeg.exe -hwaccels<\/strong> \u663e\u793affmpeg\u7684\u786c\u4ef6\u52a0\u901f\u65b9\u6cd5\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u53ef\u4ee5\u770b\u5230 cuda \u7684\u9009\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >cd \/home\/loken\/ffmpeg\/build64\/ffmepg-4.4-nv-10.1\/bin\n.\/ffmpeg.exe -hwaccels<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"394\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-24.png\" alt=\"\" class=\"wp-image-260\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u81f3\u6b64\uff0cffmpeg.exe \u5df2\u7ecf\u7f16\u8bd1\u5b8c\u6bd5\u3002\u4e0b\u9762\u627e\u4e00\u4e2a\u9ad8\u6e05\u7535\u5f71\uff0c\u6765\u6d4b\u8bd5ffmpeg \u7684NVENC \u786c\u4ef6\u7f16\u7801\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"prettyprint\" >.\/ffmpeg.exe -hwaccel cuvid -i juren.mp4 -vcodec h264_nvenc -acodec copy juren_h264_nvenc.mp4<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"386\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-25.png\" alt=\"\" class=\"wp-image-261\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"848\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-26.png\" alt=\"\" class=\"wp-image-229\"\/><\/figure>\n\n\n\n<p>\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0c cpu\u7684\u8d1f\u8f7d\u5f88\u5c0f\uff0c\u800cGPU \u76f4\u63a5 99% \u6ee1\u529f\u7387\u4e86\u3002ffmpeg.exe \u786c\u4ef6\u7f16\u7801\u6d4b\u8bd5\u901a\u8fc7\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p><strong>\u5e38\u89c1\u9519\u8bef\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c LINK : fatal error LNK1104: cannot open file 'LIBCMTD.lib'\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u9519\u8bef\u662f\u56e0\u4e3a\u6ca1\u7528 x64 Native Tools Command Prompt for VS 2019.exe \u5f00\u542fCMD\uff0cMSYS2 \u6ca1\u7ee7\u627fvs2019\u7684\u73af\u5883\u53d8\u91cf\uff0c\u6240\u4ee5\u627e\u4e0d\u5230 vs2019 \u76ee\u5f55\u7684 LIBCMTD.lib\u3002<\/p>\n\n\n\n<p>2\uff0c<code class=\"prettyprint\" >&quot;libavfilter\/vf_scale_cuda_bicubic.ptx.c(1925): fatal error C1091: compiler limit: string exceeds 65535 bytes in length&quot;<\/code><\/p>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2abug\uff0c<a href=\"https:\/\/trac.ffmpeg.org\/ticket\/9019\">bug\u5730\u5740<\/a>\uff0cffmpeg \u5df2\u7ecf\u4fee\u590d\u4e86\uff0c\u51fa\u4e86\u4e00\u4e2a patch \uff0c<a href=\"https:\/\/trac.ffmpeg.org\/attachment\/ticket\/9019\/0001-Patch-for-ticket-9019-CUDA-Compile-Broken-Using-MSVC.patch\">patch \u5730\u5740<\/a>\u3002<\/p>\n\n\n\n<p><strong>\u91cd\u8981\u77e5\u8bc6\u70b9\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c \u5982\u4f55\u67e5\u770b\u81ea\u8eab\u7535\u8111\u7684 GPU \u578b\u53f7\u662f\u5426\u652f\u6301 NVENC NVDEC \u786c\u4ef6\u7f16\u89e3\u7801\uff1f<\/p>\n\n\n\n<p>NVIDIA \u5b98\u7f51\u6709 <a href=\"https:\/\/developer.nvidia.com\/video-encode-and-decode-gpu-support-matrix-new#Encoder\">https:\/\/developer.nvidia.com\/video-encode-and-decode-gpu-support-matrix-new#Encoder<\/a><\/p>\n\n\n\n<p>2\uff0c\u5982\u4f55\u67e5\u770b\u81ea\u8eab\u7535\u8111\u7684GPU\u9a71\u52a8\u5bf9\u5e94\u7684 CUDA toolkits \u7248\u672c\uff1f<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.nvidia.com\/cuda\/cuda-toolkit-release-notes\/index.html\">https:\/\/docs.nvidia.com\/cuda\/cuda-toolkit-release-notes\/index.html<\/a><\/p>\n\n\n\n<p>3\uff0c\u5982\u4f55\u67e5\u770b\u81ea\u8eab\u7535\u8111\u7684GPU\u9a71\u52a8\u5bf9\u5e94\u7684 nv-codec-headers \u7248\u672c\uff1f<\/p>\n\n\n\n<p>\u4e0b\u8f7d nv-codec-headers\uff0c\u76f4\u63a5\u6253\u5f00 \u91cc\u9762\u7684Readme \uff0c\u80fd\u770b\u5230\u6700\u4f4e\u9a71\u52a8\u7248\u672c\u652f\u6301\u3002<\/p>\n\n\n\n<p>4\uff0cconfigure \u7528\u4e86 --toolchain=msvc \u4e4b\u540e\uff0c\u4f7f\u7528\u7684\u662f vs2019 \u76ee\u5f55\u7684 cl.exe \u6765\u7f16\u8bd1C\u4ee3\u7801\uff0c\u4e0d\u662f MSYS2 \u73af\u5883\u7684 gcc.exe\u4e86\u3002\u6240\u4ee5 --extra-ldflags \u6307\u5b9a\u5e93\u641c\u7d22\u8def\u5f84\u7684\u65b9\u5f0f \u662f <strong>-LIBPATH<\/strong> \uff0c\u4e0d\u662f <strong>-L<\/strong>\u3002 -L \u662f gcc.exe \u7528\u7684\u547d\u4ee4\u53c2\u6570\u3002-LIBPATH \u624d\u662f cl.exe\u7528\u7684\u547d\u4ee4\u53c2\u6570\u3002<\/p>\n\n\n\n<p><strong>\u6269\u5c55\u77e5\u8bc6\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0cCUDA \u5168\u79f0 <strong>Compute Unified Device Architecture<\/strong>\uff0c\u7ffb\u8bd1\u4e3a \"\u8ba1\u7b97\u673a\u7edf\u4e00\u8bbe\u5907\u67b6\u6784\"\u3002<\/p>\n\n\n\n<p>2\uff0cCUDA \u7f16\u7a0b\u8303\u4f8b\uff0c<a href=\"https:\/\/github.com\/nvidia\/cuda-samples\">https:\/\/github.com\/nvidia\/cuda-samples<\/a><\/p>\n\n\n\n<p>3\uff0c\u5ba2\u6237\u7684\u76ee\u6807\u673a\u5668\u53ea\u9700\u8981\u5b89\u88c5 Toolkit Driver (\u663e\u5361\u9a71\u52a8) \u5c31\u80fd\u7528 ffmpeg.exe \u91cc\u9762\u7684\u786c\u4ef6\u7f16\u89e3\u7801 NVENC \u8ddf NVDEC\uff0c\u5ba2\u6237\u7684\u76ee\u6807\u673a\u5668\u4e0d\u9700\u8981 \u5b89\u88c5CUDA toolkits \u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"400\" src=\".\/wp-content\/uploads\/2022\/01\/cuda-0-4.png\" alt=\"\" class=\"wp-image-237\"\/><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u8d44\u6599\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff0c<a href=\"https:\/\/trac.ffmpeg.org\/wiki\/HWAccelIntro\">ffmpeg \u786c\u4ef6\u52a0\u901f\u4ecb\u7ecd<\/a><\/p>\n\n\n\n<p>2\uff0c<a href=\"https:\/\/trac.ffmpeg.org\/wiki\/CompilationGuide\">https:\/\/trac.ffmpeg.org\/wiki\/CompilationGuide<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>\u00a9\u7248\u6743\u6240\u5c5e\uff1a\u77e5\u8bc6\u661f\u7403\uff1a\u5f26\u5916\u4e4b\u97f3\uff0cQQ\uff1a2338195090\u3002<\/p>\n\n\n\n<p>\u7531\u4e8e\u7b14\u8005\u7684\u6c34\u5e73\u6709\u9650\uff0c \u52a0\u4e4b\u7f16\u5199\u7684\u540c\u65f6\u8fd8\u8981\u53c2\u4e0e\u5f00\u53d1\u5de5\u4f5c\uff0c\u6587\u4e2d\u96be\u514d\u4f1a\u51fa\u73b0\u4e00\u4e9b\u9519\u8bef\u6216\u8005\u4e0d\u51c6\u786e\u7684\u5730\u65b9\uff0c\u6073\u8bf7\u8bfb\u8005\u6279\u8bc4\u6307\u6b63\u3002\u5982\u679c\u8bfb\u8005\u6709\u4efb\u4f55\u5b9d\u8d35\u610f\u89c1\uff0c\u53ef\u4ee5\u52a0\u6211\u5fae\u4fe1 Loken1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u642c\u8fd0\u4f18\u5316\u5230\u300aFFmpeg\u539f\u7406\u300b\u4e00\u4e66\uff1ahttps:\/\/ffmpeg.xianwaizhiyin.net\/co [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-ffmpeg","category-ffmpeg-env-build"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.xianwaizhiyin.net\/?p=262\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u642c\u8fd0\u4f18\u5316\u5230\u300aFFmpeg\u539f\u7406\u300b\u4e00\u4e66\uff1ahttps:\/\/ffmpeg.xianwaizhiyin.net\/co [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xianwaizhiyin.net\/?p=262\" \/>\n<meta property=\"og:site_name\" content=\"\u5f26\u5916\u4e4b\u97f3\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-31T07:41:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-10T19:35:22+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/.\/wp-content\/uploads\/2022\/01\/cuda-0-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"loken\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#website\",\"url\":\"https:\/\/www.xianwaizhiyin.net\/\",\"name\":\"\u5f26\u5916\u4e4b\u97f3\",\"description\":\"FFmpeg\u3001WebRTC\uff0cSRS \u97f3\u89c6\u9891\u3001\u6d41\u5a92\u4f53\u6280\u672f\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xianwaizhiyin.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=262#primaryimage\",\"inLanguage\":\"zh-Hans\",\"url\":\".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png\",\"contentUrl\":\".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=262#webpage\",\"url\":\"https:\/\/www.xianwaizhiyin.net\/?p=262\",\"name\":\"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3\",\"isPartOf\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=262#primaryimage\"},\"datePublished\":\"2022-01-31T07:41:47+00:00\",\"dateModified\":\"2022-08-10T19:35:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=262#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xianwaizhiyin.net\/?p=262\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/?p=262#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.xianwaizhiyin.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3\",\"name\":\"loken\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.xianwaizhiyin.net\/#personlogo\",\"inLanguage\":\"zh-Hans\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g\",\"caption\":\"loken\"},\"sameAs\":[\"https:\/\/www.xianwaizhiyin.net\/\"],\"url\":\"https:\/\/www.xianwaizhiyin.net\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.xianwaizhiyin.net\/?p=262","og_locale":"zh_CN","og_type":"article","og_title":"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3","og_description":"\u672c\u6587\u642c\u8fd0\u4f18\u5316\u5230\u300aFFmpeg\u539f\u7406\u300b\u4e00\u4e66\uff1ahttps:\/\/ffmpeg.xianwaizhiyin.net\/co [&hellip;]","og_url":"https:\/\/www.xianwaizhiyin.net\/?p=262","og_site_name":"\u5f26\u5916\u4e4b\u97f3","article_published_time":"2022-01-31T07:41:47+00:00","article_modified_time":"2022-08-10T19:35:22+00:00","og_image":[{"url":".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"loken","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"12 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.xianwaizhiyin.net\/#website","url":"https:\/\/www.xianwaizhiyin.net\/","name":"\u5f26\u5916\u4e4b\u97f3","description":"FFmpeg\u3001WebRTC\uff0cSRS \u97f3\u89c6\u9891\u3001\u6d41\u5a92\u4f53\u6280\u672f","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xianwaizhiyin.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"ImageObject","@id":"https:\/\/www.xianwaizhiyin.net\/?p=262#primaryimage","inLanguage":"zh-Hans","url":".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png","contentUrl":".\/wp-content\/uploads\/2022\/01\/cuda-0-1.png"},{"@type":"WebPage","@id":"https:\/\/www.xianwaizhiyin.net\/?p=262#webpage","url":"https:\/\/www.xianwaizhiyin.net\/?p=262","name":"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1 - \u5f26\u5916\u4e4b\u97f3","isPartOf":{"@id":"https:\/\/www.xianwaizhiyin.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xianwaizhiyin.net\/?p=262#primaryimage"},"datePublished":"2022-01-31T07:41:47+00:00","dateModified":"2022-08-10T19:35:22+00:00","author":{"@id":"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3"},"breadcrumb":{"@id":"https:\/\/www.xianwaizhiyin.net\/?p=262#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xianwaizhiyin.net\/?p=262"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xianwaizhiyin.net\/?p=262#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.xianwaizhiyin.net\/"},{"@type":"ListItem","position":2,"name":"window10_ffmpeg-with-nvidia-gpu\u7f16\u8bd1"}]},{"@type":"Person","@id":"https:\/\/www.xianwaizhiyin.net\/#\/schema\/person\/6605a70af752697df6b62f77c53298a3","name":"loken","image":{"@type":"ImageObject","@id":"https:\/\/www.xianwaizhiyin.net\/#personlogo","inLanguage":"zh-Hans","url":"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6320b5256dc36ef4243e0acf26144b8ac2668b478302ad154e95ce3202bc421?s=96&d=mm&r=g","caption":"loken"},"sameAs":["https:\/\/www.xianwaizhiyin.net\/"],"url":"https:\/\/www.xianwaizhiyin.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":8,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":2761,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/2761"}],"wp:attachment":[{"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xianwaizhiyin.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}