Joger,

I’ve misread the documentation. 

Passing /opt/homebrew/Cellar/ffmpeg/7.1/ fixes the problem.

Now I will try to build Qt with FFmpeg and give it a try.

Thanks!

Nuno

> On 16 Nov 2024, at 10:41, Nuno Santos <nuno.san...@imaginando.pt> wrote:
> 
> Joger,
> 
> I could only get back to this now.
> 
> Trying to build Qt with FFmpeg. As a start point I’m point to prebuilt 
> libraries by brew:
> 
> ./configure -prefix /Users/nsantos/Qt/6.8.0/macos_static_vs -static 
> -debug-and-release  -- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" 
> -DFFMPEG_DIR=/opt/homebrew/Cellar/ffmpeg/7.1/lib
> 
> Which has:
> 
> -r--r--r--   1 nsantos  admin  10232192  9 Out 16:07 
> libavcodec.61.19.100.dylib
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavcodec.61.dylib -> 
> libavcodec.61.19.100.dylib
> -r--r--r--   1 nsantos  admin  14165144 30 Set 00:31 libavcodec.a
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavcodec.dylib -> 
> libavcodec.61.19.100.dylib
> -r--r--r--   1 nsantos  admin    206528  9 Out 16:07 
> libavdevice.61.3.100.dylib
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavdevice.61.dylib -> 
> libavdevice.61.3.100.dylib
> -r--r--r--   1 nsantos  admin     90232 30 Set 00:31 libavdevice.a
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavdevice.dylib -> 
> libavdevice.61.3.100.dylib
> -r--r--r--   1 nsantos  admin   3144864  9 Out 16:07 
> libavfilter.10.4.100.dylib
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavfilter.10.dylib -> 
> libavfilter.10.4.100.dylib
> -r--r--r--   1 nsantos  admin   5098240 30 Set 00:31 libavfilter.a
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavfilter.dylib -> 
> libavfilter.10.4.100.dylib
> -r--r--r--   1 nsantos  admin   2347712  9 Out 16:07 
> libavformat.61.7.100.dylib
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavformat.61.dylib -> 
> libavformat.61.7.100.dylib
> -r--r--r--   1 nsantos  admin   4220096 30 Set 00:31 libavformat.a
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libavformat.dylib -> 
> libavformat.61.7.100.dylib
> -r--r--r--   1 nsantos  admin    643248  9 Out 16:07 libavutil.59.39.100.dylib
> lrwxr-xr-x   1 nsantos  admin        25 30 Set 00:31 libavutil.59.dylib -> 
> libavutil.59.39.100.dylib
> -r--r--r--   1 nsantos  admin    885096 30 Set 00:31 libavutil.a
> lrwxr-xr-x   1 nsantos  admin        25 30 Set 00:31 libavutil.dylib -> 
> libavutil.59.39.100.dylib
> -r--r--r--   1 nsantos  admin     85872  9 Out 16:07 
> libpostproc.58.3.100.dylib
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libpostproc.58.dylib -> 
> libpostproc.58.3.100.dylib
> -r--r--r--   1 nsantos  admin     31880 30 Set 00:31 libpostproc.a
> lrwxr-xr-x   1 nsantos  admin        26 30 Set 00:31 libpostproc.dylib -> 
> libpostproc.58.3.100.dylib
> -r--r--r--   1 nsantos  admin    122096  9 Out 16:07 
> libswresample.5.3.100.dylib
> lrwxr-xr-x   1 nsantos  admin        27 30 Set 00:31 libswresample.5.dylib -> 
> libswresample.5.3.100.dylib
> -r--r--r--   1 nsantos  admin    115792 30 Set 00:31 libswresample.a
> lrwxr-xr-x   1 nsantos  admin        27 30 Set 00:31 libswresample.dylib -> 
> libswresample.5.3.100.dylib
> -r--r--r--   1 nsantos  admin    453536  9 Out 16:07 libswscale.8.3.100.dylib
> lrwxr-xr-x   1 nsantos  admin        24 30 Set 00:31 libswscale.8.dylib -> 
> libswscale.8.3.100.dylib
> -r--r--r--   1 nsantos  admin    547472 30 Set 00:31 libswscale.a
> lrwxr-xr-x   1 nsantos  admin        24 30 Set 00:31 libswscale.dylib -> 
> libswscale.8.3.100.dylib
> 
> But the pre build summary says:
> 
> src git:(v6.8.0) ✗ cat /Users/nsantos/Qt/6.8.0/src/config.summary | grep FF
>  TIFF ................................... yes
>    FFmpeg ............................... no
>    FFmpeg plugin features:
> 
> Any ideas on why it failed to include FFmpeg?
> 
> How can I debug this?
> 
> Thanks!
> 
> Nuno
> 
>> On 15 Oct 2024, at 12:31, Jøger Hansegård <joger.hanseg...@qt.io> wrote:
>> 
>> Hi Nuno,
>> 
>> I'm glad it helped.
>> 
>> Yes, you can still link Qt Multimedia against a static build of FFmpeg. When 
>> doing so, omit -DQT_DEPLOY_FFMPEG=ON when configuring Qt.
>> 
>> You can find details about why we recommend using the FFmpeg media backend 
>> at https://doc.qt.io/qt-6/qtmultimedia-index.html. In short, newer features 
>> are only implemented with the FFmpeg media backend, and we will only fix 
>> critical bugs on native backends. With critical bugs, we mean bugs that 
>> affect security and reliability (crashes/hangs), not performance or 
>> functionality bugs. We still welcome community contributions on the native 
>> backends. The native Android backend is already deprecated and will be 
>> removed with the next major Qt release. An example of a non-critical bug on 
>> Windows with the native backend is that QMediaPlayer does not support 
>> "zero-copy" transfer of textures from decoding to display. This can lead to 
>> frame drop when playing high-resolution video.
>> 
>> The FFmpeg media backend is, therefore, the most future-proof choice for new 
>> projects.
>> 
>> Thanks,
>> Jøger
>> 
>> -----Original Message-----
>> From: Nuno Santos <nuno.san...@imaginando.pt>
>> Sent: Tuesday, October 15, 2024 12:31 PM
>> To: Jøger Hansegård <joger.hanseg...@qt.io>
>> Cc: interestqt-project. org <interest@qt-project.org>
>> Subject: Re: [Interest] Qt 6.8.0 - FFMPEG on Windows - Is it possible?
>> 
>> Joger,
>> 
>> Thanks for your reply.
>> 
>> It seems that I have failed this little detail:
>> 
>> -DQT_DEPLOY_FFMPEG=ON
>> 
>> Also, is it possible to statically link ffmpeg to Qt? Or will we always need 
>> to have the dlls somewhere?
>> 
>> One thing that I still couldn't figure out is what are the main advantages 
>> of using ffmpeg as backend compared with the native backends?
>> 
>> Thank you!
>> 
>> Best,
>> 
>> Nuno
>> 
>>> On 14 Oct 2024, at 17:42, Jøger Hansegård <joger.hanseg...@qt.io> wrote:
>>> 
>>> There is also some information in the official Qt documentation; see: 
>>> https://doc.qt.io/qt-6/qtmultimedia-building-from-source.html
>>> 
>>> Best regards,
>>> Jøger Hansegård,
>>> The Qt Company
>>> 
>>> 
>>> -----Original Message-----
>>> From: Interest <interest-boun...@qt-project.org> On Behalf Of Jøger 
>>> Hansegård via Interest
>>> Sent: Monday, October 14, 2024 6:21 PM
>>> To: Nuno Santos <nuno.san...@imaginando.pt>; interestqt-project. org 
>>> <interest@qt-project.org>
>>> Subject: Re: [Interest] Qt 6.8.0 - FFMPEG on Windows - Is it possible?
>>> 
>>> Hi Nuno,
>>> 
>>> Yes, this is possible, and we are working on improving the documentation on 
>>> how to do it. In the meantime, this is one way to do it:
>>> 
>>> 1. Download FFmpeg built with shared libraries from one of the links below.
>>> 2. After unzipping the FFmpeg binaries to a suitable location, configure Qt:
>>> 
>>>  configure.bat <your normal settings> -- -DFFMPEG_DIR=<path to directory 
>>> containing FFmpeg include/lib/bin folders> -DQT_DEPLOY_FFMPEG=ON
>>> 
>>> Note the double '--' that separates configure arguments from CMake 
>>> arguments. Once this is done, you can build Qt as usual.
>>> 
>>> Be aware that he FFmpeg version in the link below is a GPL build. If this 
>>> is not suitable for you, I added a link to my unofficial wiki page that 
>>> describes different ways to build FFmpeg for Windows. This gives you 
>>> control over building FFmpeg without any GPL or non-free components. Among 
>>> the described options, using VCpkg is the simplest.
>>> 
>>> Download links:
>>> FFmpeg for Windows (GPL): https://ffmpeg.org/download.html#build-windows 
>>> (use the ones from BtbN, direct link: 
>>> https://github.com/BtbN/FFmpeg-Builds/releases). It contains shared 
>>> libraries and FFmpeg header files.
>>> Building FFmpeg: 
>>> https://wiki.qt.io/User:Joger/Building_Qt_Multimedia_with_FFmpeg
>>> 
>>> Thanks,
>>> Jøger
>>> The Qt Company
>>> 
>>> -----Original Message-----
>>> From: Interest <interest-boun...@qt-project.org> On Behalf Of Nuno Santos 
>>> via Interest
>>> Sent: Monday, October 14, 2024 5:04 PM
>>> To: interestqt-project. org <interest@qt-project.org>
>>> Subject: [Interest] Qt 6.8.0 - FFMPEG on Windows - Is it possible?
>>> 
>>> Hi,
>>> 
>>> I do I enable FFMPEG backend on Windows?
>>> 
>>> Is it even possible?
>>> 
>>>> configure.bat -help
>>> 
>>> does not have any mention to it.
>>> 
>>> Thanks!
>>> 
>>> Regards,
>>> 
>>> Nuno
>>> _______________________________________________
>>> Interest mailing list
>>> Interest@qt-project.org
>>> https://lists.qt-project.org/listinfo/interest
>>> _______________________________________________
>>> Interest mailing list
>>> Interest@qt-project.org
>>> https://lists.qt-project.org/listinfo/interest
>> 
> 

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to