conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
945 stars 1.72k forks source link

[question] ffmpeg/6.1 : try to build with CUVID support #24118

Open narcdev opened 3 months ago

narcdev commented 3 months ago

What is your question?

I'm currently trying to build the latest version of FFMPEG with CUVID support. It work well with FFMPEG 4.4, but with the latest version I've the following error message :

LINK : fatal error LNK1181: cannot open input file 'lzma.lib'

It only appears when I set CUVID support.

Conan version 1.63.0 or 2.3.1, it is the same error message.

Conan 2.3.1 profile :

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.version=192
os=Windows

The diff for ffmpeg recipe :


diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py
index faccb5c39..7b796f549 100644
--- a/recipes/ffmpeg/all/conanfile.py
+++ b/recipes/ffmpeg/all/conanfile.py
@@ -331,6 +331,8 @@ class FFMpegConan(ConanFile):
             self.requires("libaom-av1/3.6.1")
         if self.options.get_safe("with_libdav1d"):
             self.requires("dav1d/1.2.1")
+        if self.settings.os != "Macos":
+            self.requires("nv-codec-headers/12.1.14.0")

     def validate(self):
         if self.options.with_ssl == "securetransport" and not is_apple_os(self):
@@ -513,7 +515,7 @@ class FFMpegConan(ConanFile):
             opt_enable_disable("securetransport",
                                self.options.with_ssl == "securetransport"),
             "--disable-cuda",  # FIXME: CUDA support
-            "--disable-cuvid",  # FIXME: CUVID support
+            "--enable-cuvid",  # FIXME: CUVID support
             # Licenses
             opt_enable_disable("nonfree", self.options.with_libfdk_aac or (self.options.with_ssl and (
                 self.options.with_libx264 or self.options.with_libx265 or self.options.postproc))),
@@ -656,10 +658,10 @@ class FFMpegConan(ConanFile):
         if is_msvc(self):
             # Custom AutotoolsDeps for cl like compilers
             # workaround for https://github.com/conan-io/conan/issues/12784
-            includedirs = []
+            includedirs = ["G:/CUDA/v12.4/include"]
             defines = []
             libs = []
-            libdirs = []
+            libdirs = [ "G:/CUDA/v12.4/lib" ]
             linkflags = []
             cxxflags = []
             cflags = []

If you have any idea or advice, please let me know !

Thanks in advance,

uilianries commented 1 month ago

I marked this issue as a new feature, because is something new to be added in ffmpeg recipe.