×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Oct 2010
    Posts
    72

    Extract album art from a mp3 file

    Hi,
    I am trying to extract the meta details like title, artist, album image of a mp3 file. I used the metaData property of the QML Audio Element and was successfully able to extract album artist, album title using metaData.albumArtist and metaData.albumTitle.

    I tried to extract the album art of the mp3 file using QML Audio element but failed. I tried the meta properties metaData.coverArtUrlLarge, metaData.coverArtUrlSmall but none seems to return the image art of the album.

    Can someone help me to get the album art image. Thanks in advance

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Extract album art from a mp3 file


  3. #3
    Regular Contributor
    Join Date
    Oct 2010
    Posts
    72

    Re: Extract album art from a mp3 file

    I am able to get the album artist and title, I am not able to get the album art alone

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Extract album art from a mp3 file

    Correct that's what the last post says. Album art is not supported by helix

    info from QMediaPlayer is
    1."AlbumArtist" always shows "unknown artist"
    2."Title" always shows "Bar Legend Radio".
    3."AudioBitRate" always shows 0.
    4. "CoverArtUrlSmall" is NULL.
    5. "CoverArtUrlLarge" is NULL.
    6. "CoverArtImage" is NULL.
    Last edited by gnuton; 2011-09-15 at 09:45.

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    166

    Re: Extract album art from a mp3 file

    May be you can try same thing what I did. I tried to download album art from Amazon Web Service. Following post explain how that can be done.

    http://kunalmaemo.blogspot.com/2011/...e-from-qt.html
    http://kunalmaemo.blogspot.com/

  6. #6
    Regular Contributor
    Join Date
    Oct 2010
    Posts
    72

    Re: Extract album art from a mp3 file

    Quote Originally Posted by kunal_the_one View Post
    May be you can try same thing what I did. I tried to download album art from Amazon Web Service. Following post explain how that can be done.

    http://kunalmaemo.blogspot.com/2011/...e-from-qt.html
    Hi,
    Thanks for the link. I will go through your post and will let you know the result

  7. #7
    Regular Contributor
    Join Date
    Oct 2010
    Posts
    72

    Re: Extract album art from a mp3 file

    Hi,
    I read through your blog, but it needs data connection to connect to amazon. So I read the ID3 tag and parsed the image from the tag. I am posting the link here so that it can be of help to some one.

    http://id3.org/

  8. #8
    Registered User
    Join Date
    Aug 2011
    Posts
    32

    Re: Extract album art from a mp3 file

    This is how I get album art indexed from tracker on N9(50):

    Code:
    #ifndef ALBUMARTRETRIEVER_H
    #define ALBUMARTRETRIEVER_H
    
    #include <QtCore>
    
    class AlbumArtRetriever : public QObject
    {
        Q_OBJECT
    public:
        explicit AlbumArtRetriever(QObject *parent = 0);
    
        Q_INVOKABLE QString getPath(QString artist, QString albumName);
    
    signals:
    
    public slots:
    
    };
    
    #endif // ALBUMARTRETRIEVER_H
    Code:
    #include "albumartretriever.h"
    
    const QString illegalCharacters(QLatin1String("\\(.*\\)|\\{.*\\}|\\[.*\\]|<.*>|[\\(\\)_\\{\\}\\[\\]\\!@#$\\^&\\*\\+\\=\\|\\\\/\"'\\?~`]"));
    
    
    
    AlbumArtRetriever::AlbumArtRetriever(QObject *parent) :
        QObject(parent)
    {
    
    }
    
    QString AlbumArtRetriever::getPath(QString artist, QString albumName)
    {
        QString artistHash = QCryptographicHash::hash(artist.toLower().remove(illegalCharacters).simplified().toUtf8(), QCryptographicHash::Md5).toHex();
    
        QString albumHash = QCryptographicHash::hash(albumName.toLower()
                                                              .remove(illegalCharacters).simplified().toUtf8(),
                                                              QCryptographicHash::Md5).toHex();
        QString fileName = "/home/user"
                             + QLatin1String("/.cache/media-art/album-")
                             + artistHash
                             + QLatin1Char('-')
                             + albumHash
                             + QLatin1String(".jpeg");
        return fileName;
    
    
    }
    Than the source of the album art is the returned string. Works wonderfully within a list view delegate. You have to add a check, because if the album art does not exist, you may want to do something else than leaving a null image.

Similar Threads

  1. To retrieve album cover of the mp3 file in j2me
    By SapnaSrivastav in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2012-08-20, 11:05
  2. Extract .sis file
    By lokeshg in forum Symbian
    Replies: 3
    Last Post: 2010-07-16, 10:01
  3. HOw to get Gallery Photo album file?
    By ravindra.n in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-06-26, 11:21
  4. how to extract the file
    By harinrd in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2009-06-05, 15:08
  5. Extract sis file name
    By nadav_smilansky in forum Symbian
    Replies: 2
    Last Post: 2008-09-08, 22:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •