VideoConfiguration
Additional configuration for video playback.
Properties
-
enable_hardware_acceleration(bool) –Whether to enable hardware acceleration.
-
hardware_decoding_api(str | None) –Sets the --hwdec
-
height(Number | None) –The fixed height for the video output.
-
mpv_properties(dict[str, str | int | float | bool] | None) –Extra mpv/libmpv properties to set on
-
output_driver(str | None) –Sets the --vo property
-
scale(Number) –The scale for the video output.
-
width(Number | None) –The fixed width for the video output.
Properties#
enable_hardware_acceleration
class-attribute
instance-attribute
#
enable_hardware_acceleration: bool = True
Whether to enable hardware acceleration. When disabled, may cause battery drain, device heating, and high CPU usage.
hardware_decoding_api
class-attribute
instance-attribute
#
hardware_decoding_api: str | None = None
Sets the --hwdec property on native backend.
The default value is platform dependent
- Windows, GNU/Linux, macOS & iOS :
"auto" - Android:
"auto-safe"
height
class-attribute
instance-attribute
#
height: Number | None = None
The fixed height for the video output.
mpv_properties
class-attribute
instance-attribute
#
Extra mpv/libmpv properties to set on native backends (Windows/macOS/Linux/iOS/Android).
The keys are mpv option/property names without the leading --. Values can be
str, int, float or bool. All values are converted to strings before being
passed to mpv; boolean values are converted to "yes" / "no".
Full list of mpv options: https://mpv.io/manual/stable/#options
output_driver
class-attribute
instance-attribute
#
output_driver: str | None = None
Sets the --vo property on native backend.
The default value is platform dependent
- Windows, GNU/Linux, macOS & iOS :
"libmpv" - Android:
"gpu"