how to get media file information.
-
@Diracsbracket thanks.
this way can i get image info??
if yes , how to get that?some of the specialized libraries out there.
please give me some suggestion.
wrote on 5 May 2018, 07:57 last edited by Diracsbracket 5 May 2018, 08:08@saber said in how to get media file information.:
this way can i get image info
It doesn't seem to work for images (as tested from the minimal example I posted above...)
But, from searching on this forum (or on Google), the answer for pictures is given here:
https://forum.qt.io/topic/83259/get-metadata-date-taken-location-from-photo-jpeg/2
https://github.com/mayanklahiri/easyexif@saber said in how to get media file information.:
please give me some suggestion
Have a look at:
http://en.cppreference.com/w/cpp/links/libs -
@saber said in how to get media file information.:
this way can i get image info
It doesn't seem to work for images (as tested from the minimal example I posted above...)
But, from searching on this forum (or on Google), the answer for pictures is given here:
https://forum.qt.io/topic/83259/get-metadata-date-taken-location-from-photo-jpeg/2
https://github.com/mayanklahiri/easyexif@saber said in how to get media file information.:
please give me some suggestion
Have a look at:
http://en.cppreference.com/w/cpp/links/libswrote on 12 May 2018, 15:38 last edited by saber 5 Dec 2018, 16:33@Diracsbracket
hi .
i found a library called mediainfo .here is the github
it has a example made by qt.
but i don't understand how to build it or use it as a lib.
can you help?and i tried this but not getting the duration.
m_player->metaData(QMediaMetaData::Duration).toString();
just giving me this "QVariant(Invalid)"
-
@saber, that's a question you should ask to the
mediainfo
authors. At least you should explain exactly what is happening to you. -
@Diracsbracket
hi .
i found a library called mediainfo .here is the github
it has a example made by qt.
but i don't understand how to build it or use it as a lib.
can you help?and i tried this but not getting the duration.
m_player->metaData(QMediaMetaData::Duration).toString();
just giving me this "QVariant(Invalid)"
wrote on 13 May 2018, 10:39 last edited by@saber said in how to get media file information.:
can you help?
As @SGaist suggested, I'm affraid that you will have to ask the authors of that library, as I haven't tried that one yet :-(.
@saber said in how to get media file information.:
just giving me this "QVariant(Invalid)"
Since
QMediaMetaData::Duration
is aqint64
as per http://doc.qt.io/qt-5/qmediametadata.html, maybe try as follows:QString::number(m_player->metaData(QMediaMetaData::Duration))
-
@Diracsbracket
hi .
i found a library called mediainfo .here is the github
it has a example made by qt.
but i don't understand how to build it or use it as a lib.
can you help?and i tried this but not getting the duration.
m_player->metaData(QMediaMetaData::Duration).toString();
just giving me this "QVariant(Invalid)"
wrote on 13 May 2018, 14:41 last edited by DiracsbracketThis post is deleted! -
This post is deleted!
wrote on 14 May 2018, 09:59 last edited by@Diracsbracket
Thanks, mediainfo builds fine in my linux system.
i want it as a lib(exclude all the gui and extra pieces) so it will be easer to include it in my project.
i wanted to make a function that will take the file path >> send it to that lib >>lib will give the all the mediainfo.
but i have no idea or programming skills to do that .so if you want the same ,please modify the mideainfo to a library.
thanks -
@Diracsbracket
Thanks, mediainfo builds fine in my linux system.
i want it as a lib(exclude all the gui and extra pieces) so it will be easer to include it in my project.
i wanted to make a function that will take the file path >> send it to that lib >>lib will give the all the mediainfo.
but i have no idea or programming skills to do that .so if you want the same ,please modify the mideainfo to a library.
thankswrote on 14 May 2018, 13:44 last edited by Diracsbracket@saber said in how to get media file information.:
i want it as a lib
MediaInfoLib
IS the lib. I thought this would have been clear enough...
MediaInfo
is just an application using it. Study that example to learn how to use it. -
@saber said in how to get media file information.:
i want it as a lib
MediaInfoLib
IS the lib. I thought this would have been clear enough...
MediaInfo
is just an application using it. Study that example to learn how to use it.wrote on 14 May 2018, 13:55 last edited by saberoh!ok.
can you show me the lib folder?
and how to include it in .pro .
an example will be great!! -
oh!ok.
can you show me the lib folder?
and how to include it in .pro .
an example will be great!!wrote on 14 May 2018, 13:57 last edited by Diracsbracket@saber said in how to get media file information.:
can you show me the lib folder?
and how to include it in .pro .
an example will be great!!As I wrote. Study the example. You said
MediaInfo
builds correctly on your system, so you have access to all the info you need, since it builds perfectly in Qt Creator. Don't expect everything to be done for you...
Good luck!