htzfun
htzfun

Reputation: 1448

How to get bitrate for audio file in QT?

Looks like i'm missing something, but I can't figure out how to get bitrate of mp3 file in Qt. I checked QAudioFormat for channels, but still no bitrate value. Correct me if I mistaken, thanks.

Upvotes: 0

Views: 597

Answers (1)

kn0w0n3
kn0w0n3

Reputation: 189

http://doc.qt.io/qt-5/qmediaresource.html#details QMediaResource includes information such as the MIME type, audio and video codecs, audio and video bit rates, and resolution so these constraints and others can be evaluated.

int QMediaResource::audioBitRate() const

Returns the bit rate in bits per second of a media resource's audio stream.

Hope this helps.

Upvotes: 1

Related Questions