QMediaMetaData#

Provides meta-data for media files. More

New in version 6.1.

Synopsis#

Functions#

Static functions#

Detailed Description#

Note

Not all identifiers are supported on all platforms.

Common attributes

Value

Description

Type

Title

The title of the media.

QString

Author

The authors of the media.

QStringList

Comment

A user comment about the media.

QString

Description

A description of the media.

QString

Genre

The genre of the media.

QStringList

Date

The date of the media.

QDate .

Language

The language of media.

Language

Publisher

The publisher of the media.

QString

Copyright

The media’s copyright notice.

QString

Url

A Url pointing to the origin of the media.

QUrl

Media attributes

The type of the media (audio, video, etc).

QString

The file format of the media.

FileFormat

Duration

The duration in millseconds of the media.

qint64

Audio attributes

The bit rate of the media’s audio stream in bits per second.

int

The codec of the media’s audio stream.

QMediaForma::AudioCodec

Video attributes

The frame rate of the media’s video stream.

qreal

The bit rate of the media’s video stream in bits per second.

int

The codec of the media’s video stream.

VideoCodec

Music attributes

The title of the album the media belongs to.

QString

The principal artist of the album the media belongs to.

QString

The artists contributing to the media.

QStringList

The track number of the media.

int

Composer

The composer of the media.

QStringList

The lead performer in the media.

QStringList

An embedded thumbnail image.

QImage

An embedded cover art image.

QImage

Image and video attributes

Orientation

The rotation angle of an image or video.

int

Resolution

The dimensions of an image or video.

QSize

class PySide6.QtMultimedia.QMediaMetaData(QMediaMetaData)#
Parameters

QMediaMetaDataPySide6.QtMultimedia.QMediaMetaData

PySide6.QtMultimedia.QMediaMetaData.Key#
PySide6.QtMultimedia.QMediaMetaData.NumMetaData#
PySide6.QtMultimedia.QMediaMetaData.data#
PySide6.QtMultimedia.QMediaMetaData.clear()#

Removes all data from the meta data object.

PySide6.QtMultimedia.QMediaMetaData.insert(k, value)#
Parameters
  • kKey

  • value – object

Inserts a value into a Key: k.

PySide6.QtMultimedia.QMediaMetaData.isEmpty()#
Return type

bool

Returns true if the meta data contains no items: otherwise returns false.

PySide6.QtMultimedia.QMediaMetaData.keys()#
Return type

Returns a QList of QMediaMetaData::Keys.

static PySide6.QtMultimedia.QMediaMetaData.metaDataKeyToString(k)#
Parameters

kKey

Return type

str

returns a string representation of key that can be used when presenting meta data to users.

PySide6.QtMultimedia.QMediaMetaData.__ne__(b)#
Parameters

bPySide6.QtMultimedia.QMediaMetaData

Return type

bool

Compares two meta data objects a and b, and returns false if they are identical or true if they differ.

PySide6.QtMultimedia.QMediaMetaData.__eq__(b)#
Parameters

bPySide6.QtMultimedia.QMediaMetaData

Return type

bool

Compares two meta data objects a and b, and returns true if they are identical or false if they differ.

PySide6.QtMultimedia.QMediaMetaData.operator[](k)
Parameters

kKey

Return type

object

Returns data stored at the Key k.

QMediaMetaData rockBallad1;
rockBalad[QMediaMetaData::Genre]="Rock"
PySide6.QtMultimedia.QMediaMetaData.remove(k)#
Parameters

kKey

Removes meta data from a Key: k.

PySide6.QtMultimedia.QMediaMetaData.stringValue(k)#
Parameters

kKey

Return type

str

Returns the meta data for key key as a QString .

This is mainly meant to simplify presenting the meta data to a user.

PySide6.QtMultimedia.QMediaMetaData.value(k)#
Parameters

kKey

Return type

object

Returns the meta data value for Key key, or a null QVariant if no meta data for the key is available.