Regarding getting thumbnail image of MP4 files

Satya Praveen Ganapathi praveen.s at hmie.co.in
Thu Dec 6 10:07:34 UTC 2012


Hi,

  I am developing in Qt 5.0 beta 2 . I have written code as follows:

----------------------------------------------------------------------------------
TagLib::MP4::File f(file);
TagLib::MP4::Tag* tag = f.tag();
TagLib::MP4::ItemListMap itemsListMap = tag->itemListMap();
TagLib::MP4::Item coverItem = itemsListMap["covr"];
TagLib::MP4::CoverArtList coverArtList = coverItem.toCoverArtList();
TagLib::MP4::CoverArt coverArt = coverArtList.front();
image.loadFromData((const uchar *) coverArt.data().data(),coverArt.data().size());
image.save(QGuiApplication::applicationDirPath() +"/myImage.png");
------------------------------------------------------------------------------------
 But did not get anything , please help me. In case of mp3 file , I got the thumbnail image and other metadata.


-----Original Message-----
From: taglib-devel-bounces at kde.org [mailto:taglib-devel-bounces at kde.org] On Behalf Of Lukáš Lalinský
Sent: Thursday, December 06, 2012 1:57 PM
To: taglib-devel at kde.org
Subject: Re: Regarding getting thumbnail image of MP4 files

On Thu, Dec 6, 2012 at 4:48 AM, Sonakumar_Jha
<Sonakumar_Jha at mahindrasatyam.com> wrote:
> I tried to get thumbnail image of a MP4 file using TagLib in Qt/C++ . its being very tough to get coverart of a MP4 . i could get all metadat of a MP3 file, but nothing in case of Mp4 file.
> Plesae help me. There are so many examples in Internet ,but no on is working.

You should tell us what have you tried and what didn't work.

This example should work fine:

http://stackoverflow.com/questions/6542465/c-taglib-cover-art-from-mpeg-4-files

Lukas
_______________________________________________
taglib-devel mailing list
taglib-devel at kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


More information about the taglib-devel mailing list