Get a file's metadata from URI

This forum is about all development around libVLC.
ASantosVal
New Cone
New Cone
Posts: 9
Joined: 18 Jan 2017 12:27

Get a file's metadata from URI

Postby ASantosVal » 30 May 2017 14:05

Hi everyone,

I'm developing a window to manage multiple files' metadata as my degree's final project.

In my program, I collect the URIs of the files I want to manage, but I have been unable to get the metadata associated to them. This is a simplified version I code I use for this:

const char *uri = methodThatGetsTheUri(); //Here I get the URI
input_item_t *item;
p_item = input_item_New( uri, "Example" ); //Here I get the item form the URI
char *metadataString_title = input_item_GetTitle(item); //Here I extract the metadata form the item
char *metadataString_artist = input_item_GetArtist(item);
[...]

The problem is that metadataString_title , metadataString_artist ... are empty, like the item is not correctly loaded from the URI provided.

Any thoughts on this? Does somebody know how to do this properly or knows of some code that could be used as example?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Get a file's metadata from URI

Postby Jean-Baptiste Kempf » 11 Jun 2017 16:21

You should start the preparser.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 35 guests