Advanced FFmpeg Configuration | Qt Multimedia (original) (raw)

This page lists the FFmpeg media backend's configurable features. All the features are a part of the private API and can be changed or removed in the future without confirmation. Be aware that environment variables are by default inherited by child processes and can have unintended consequences.

You can configure advanced FFmpeg log output via environment variables.

Enable experimental FFmpeg codecs

FFmpeg exposes a few codecs, such as Opus or Vorbis, as experimental ones. Experimental codecs don't strictly follow the standard and may be unstable. They are disabled by default. To enable them, set the environment variable QT_ENABLE_EXPERIMENTAL_CODECS=1.

Configuring allowed network protocols

For security reasons, the FFmpeg library restricts use of nested protocols, meaning protocols used by other protocols; see FFmpeg protocols documentation. You may explicitly override the allowed protocols via the environment variable QT_FFMPEG_PROTOCOL_WHITELIST, for example:

export QT_FFMPEG_PROTOCOL_WHITELIST=file,crypto,rtp,udp

Warning: Note that nested protocols can introduce security vulnerabilities when used with untrusted data. Only allow protocols that align with your security and business requirements.

Configure hardware acceleration in backends

Set vdpau or cuda encoding hardware backends

export QT_FFMPEG_ENCODING_HW_DEVICE_TYPES=vdpau,cuda

Set only d3d12va decoding hardware backend

export QT_FFMPEG_DECODING_HW_DEVICE_TYPES=d3d12va

Disable decoding hw backends (set an empty list)

export QT_FFMPEG_DECODING_HW_DEVICE_TYPES=,

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.