qrencode
Generate a QR code using the libqrencode library (see https://fukuchi.org/works/qrencode/), and overlay it on top of the current frame.
To enable the compilation of this filter, you need to configure FFmpeg with
--enable-libqrencode
.
The QR code is generated from the provided text or text pattern. The corresponding QR code is scaled and overlayed into the video output according to the specified options.
In case no text is specified, no QR code is overlaied.
This filter accepts the following options:
- qrcode_width, q
- padded_qrcode_width, Q
Specify an expression for the width of the rendered QR code, with and without padding. The qrcode_width expression can reference the value set by the padded_qrcode_width expression, and vice versa. By default padded_qrcode_width is set to qrcode_width, meaning that there is no padding.
These expressions are evaluated for each new frame.
See the qrencode Expressions section for details.
- x
- y
Specify an expression for positioning the padded QR code top-left corner. The x expression can reference the value set by the y expression, and vice.
By default x and y are set set to 0, meaning that the QR code is placed in the top left corner of the input.
These expressions are evaluated for each new frame.
See the qrencode Expressions section for details.
- case_sensitive, cs
Instruct libqrencode to use case sensitive encoding. This is enabled by default. This can be disabled to reduce the QR encoding size.
- level, l
Specify the QR encoding error correction level. With an higher correction level, the encoding size will increase but the code will be more robust to corruption. Lower level is L.
It accepts the following values:
- ‘L’
- ‘M’
- ‘Q’
- ‘H’
- expansion
Select how the input text is expanded. Can be either
none
, ornormal
(default). See the qrencode Text expansion section below for details.- text
- textfile
Define the text to be rendered. In case neither is specified, no QR is encoded (just an empty colored frame).
In case expansion is enabled, the text is treated as a text template, using the qrencode expansion mechanism. See the qrencode Text expansion section below for details.
- background_color, bc
- foreground_color, fc
Set the QR code and background color. The default value of foreground_color is "black", the default value of background_color is "white".
For the syntax of the color options, check the (ffmpeg-utils)"Color" section in the ffmpeg-utils manual.