bpmdetect 0.8.11
Automatic BPM detection tool
Loading...
Searching...
No Matches
ffmpegutils.h File Reference
#include <QtCore/QMap>
#include <QtCore/QVariant>
Include dependency graph for ffmpegutils.h:

Go to the source code of this file.

Functions

bool isDecodableFile (const QString &file)
bool storeBpmInFile (const QString &fileName, const QString &sBpm)
bool removeBpmFromFile (const QString &fileName)
QMap< QString, QVariant > readTagsFromFile (const QString &fileName)
QString getLastError ()

Function Documentation

◆ getLastError()

QString getLastError ( )

Get the last error message.

◆ isDecodableFile()

bool isDecodableFile ( const QString & file)

Check if a file can be decoded using ffmpeg.

◆ readTagsFromFile()

QMap< QString, QVariant > readTagsFromFile ( const QString & fileName)

Tag reader using ffmpeg. Gets artist, title, bpm and length (in milliseconds) and puts them in a map.

Parameters
fileNameThe path to the audio file.
Returns
A map with the tags read. If a tag is not found, the key will have a sane default value.

◆ removeBpmFromFile()

bool removeBpmFromFile ( const QString & fileName)

Remove BPM metadata from audio file.

If this is a MP3 file, the TBPM tag of ID3v2 will be removed. Other formats will have the generic "BPM" tag removed.

Parameters
fileNameThe path to the audio file.
Returns
true if the BPM metadata was successfully removed, false otherwise.

◆ storeBpmInFile()

bool storeBpmInFile ( const QString & fileName,
const QString & sBpm )

Store BPM to audio file.

If this is a MP3 file, the BPM will be stored in the TBPM tag of ID3v2. Other formats will have the BPM saved in a generic "BPM" tag. This will return false in those cases as well as for any errors.

Parameters
fileNameThe path to the audio file.
sBpmThe BPM value to store.
Returns
true if the BPM was successfully stored, false otherwise.