×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    Kungtong, China
    Posts
    40

    Question How to get the album picture from mp3 file?

    hi~
    i've been using CMdaAudioPlayerUtility to play a mp3 file, which works well and plays smoothly, now i was required to retrieve all ID3V2 info(such as artist, title, album... etc.) and display them to player view.

    i've got some metadata from method GetMetaDataEntryL(), however, a trouble comes while retrieving Attached Picture (maybe album picture).
    things goes like this:
    Code:
    TRAPD(err, md = iMdaAudioPlayerUtility->GetMetaDataEntryL(i));
    ...
    if ( md->Name().Find(KMMFMetaEntryAPIC) != KErrNotFound )
     {
        //WriteToFileL(md->Value(), _L("C:\\Data\\Images\\Test.jpg"), ETrue);
    
        // how to get the data of APIC?
     }
    i wrote md->Value() to a file, but all i got is messy data, not a real picture file.

    who can tell me how to use KMMFMetaEntryAPIC, and the approach to get attached picture.
    thx first~
    A.kon
    Last edited by Shepherdog; 2011-04-15 at 06:43.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to get the album picture from mp3 file?

    You could check the data you get with some binary viewer. Knowing that it is not a .jpg file is not much.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    Kungtong, China
    Posts
    40

    Re: How to get the album picture from mp3 file?

    Quote Originally Posted by wizard_hu_ View Post
    You could check the data you get with some binary viewer. Knowing that it is not a .jpg file is not much.
    thx at first,
    i've checked the data with the byte sequence after APIC tag(ID3V2) in mp3 file, found that what i got are totally blank bytes.

    i've no idea the way i handle the KMMFMetaEntryAPIC is correct or not.
    and i found no reference or any code clip explain how to retrieve this value.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Re: How to get the album picture from mp3 file?

    There may be an internal API to extract the album art - both in case if jpg actually part of the file or stored separately as an image and file metadata only contains the path to it. The KMMFMetaEntryAPIC seem more like used to enable that storage.

  5. #5
    Registered User
    Join Date
    Dec 2009
    Location
    Kungtong, China
    Posts
    40

    Re: How to get the album picture from mp3 file?

    Quote Originally Posted by Denever View Post
    There may be an internal API to extract the album art - both in case if jpg actually part of the file or stored separately as an image and file metadata only contains the path to it. The KMMFMetaEntryAPIC seem more like used to enable that storage.
    thx, i've quitted to test KMMFMetaEntryAPIC item, and turn to import an open-sourced id3 parser, which works well and seems efficiently.

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

    Re: How to get the album picture from mp3 file?

    Hi,
    Can you please help me with the details about which id3 parser you used. I am also trying to extract the album art of an mp3 using qt.

  7. #7
    Registered User
    Join Date
    Dec 2009
    Location
    Kungtong, China
    Posts
    40

    Re: How to get the album picture from mp3 file?

    Quote Originally Posted by naveen_r6 View Post
    Hi,
    Can you please help me with the details about which id3 parser you used. I am also trying to extract the album art of an mp3 using qt.
    i've no idea the qt platform, what i did is to import an open-sourced project xLyrics, and modified part of code, the basic method which used is reading APIC tag byte by byte (of course, you should locate this tag at first), hope this may help you.

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

    Re: How to get the album picture from mp3 file?

    Hi,
    Thanks for the reply. I tried to google this xLyrics open source project, but I am not able to get the correct link. Can you provide me some links to this project

  9. #9
    Registered User
    Join Date
    Dec 2009
    Location
    Kungtong, China
    Posts
    40

    Re: How to get the album picture from mp3 file?

    Quote Originally Posted by naveen_r6 View Post
    Hi,
    Thanks for the reply. I tried to google this xLyrics open source project, but I am not able to get the correct link. Can you provide me some links to this project
    plz check this link: http://en.pudn.com/downloads82/sourc...316378_en.html

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

    Re: How to get the album picture from mp3 file?

    Hi,
    Thanks for the link. I will go through the link and will let you know the result

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

    Re: How to get the album picture from mp3 file?

    I found difficulty in integrating the API with Qt. So I read the ID3 tag myself 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/

Similar Threads

  1. how to get thumbnail image from mp3 file?
    By hitendrasinh.gohil in forum Mobile Java General
    Replies: 4
    Last Post: 2010-11-30, 19:32
  2. use qt get Mp3 attached picture
    By mj_124949727@126.com in forum Qt
    Replies: 0
    Last Post: 2010-11-30, 11:57
  3. How to get file MP3 from URL with PORT
    By sp2509 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2010-04-21, 05:53
  4. How to get ConnectionId from attached RConnection?
    By er.khalid in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2010-01-11, 07:14
  5. get Mp3 attached picture
    By 3kworld in forum Symbian Media (Closed)
    Replies: 7
    Last Post: 2009-11-03, 01:54

Posting Permissions

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