[Interest] Qt 6.8.0 - FFMPEG on Windows - Is it possible?

Jøger Hansegård joger.hansegard at qt.io
Tue Oct 15 13:31:21 CEST 2024


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.santos at imaginando.pt>
Sent: Tuesday, October 15, 2024 12:31 PM
To: Jøger Hansegård <joger.hansegard at qt.io>
Cc: interestqt-project. org <interest at 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.hansegard at 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-bounces at qt-project.org> On Behalf Of Jøger Hansegård via Interest
> Sent: Monday, October 14, 2024 6:21 PM
> To: Nuno Santos <nuno.santos at imaginando.pt>; interestqt-project. org <interest at 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-bounces at qt-project.org> On Behalf Of Nuno Santos via Interest
> Sent: Monday, October 14, 2024 5:04 PM
> To: interestqt-project. org <interest at 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 at qt-project.org
> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest



More information about the Interest mailing list