Delphi PasLibVlc: How to get the movie title as a string?

This forum is about all development around libVLC.
PeterPanino
New Cone
New Cone
Posts: 4
Joined: 18 Mar 2016 03:18

Delphi PasLibVlc: How to get the movie title as a string?

Postby PeterPanino » 18 Mar 2016 03:29

Hi!

I use PasLibVlc 2.2.2 with Delphi 10 Seattle which works perfectly, thank you!

But how can I get the video TITLE (aka "movie name") which is displayed as an overlay when PasLibVlcPlayer1.TitleShow = True as a string?

So I don't want to display the movie title with the TitleShow property, but I want to get the movie title as a string, so I can show it in a TLabel, for example.

I couldn't figure out how to get the movie title as a string.

Could anybody tell me the trick? Many thanks in advance!

PeterPanino
New Cone
New Cone
Posts: 4
Joined: 18 Mar 2016 03:18

Re: Delphi PasLibVlc: How to get the movie title as a string?

Postby PeterPanino » 18 Mar 2016 16:56

In the meantime I have discovered how to supposedly get the video title:

Code: Select all

ThisPasLibVlcMedia := TPasLibVlcMedia.Create(VLCPlayer.VLC, VLCPlayer.GetMediaMrl); try CodeSite.Send('===>>> Title', ThisPasLibVlcMedia.GetMeta(libvlc_meta_Title)); finally ThisPasLibVlcMedia.Free; end;
However, this seems to have a bug as it does NOT GET THE MEDIA TITLE BUT:

• In the case of an MP4 file it gets the FILENAME instead!
• In the case of a Youtube video it gets the URL instead! (In a strange encoded format).

PeterPanino
New Cone
New Cone
Posts: 4
Joined: 18 Mar 2016 03:18

Re: Delphi PasLibVlc: How to get the movie title as a string?

Postby PeterPanino » 25 Mar 2016 20:32

OK, you need to PARSE:

Code: Select all

ThisPasLibVlcMedia := TPasLibVlcMedia.Create(VLCPlayer.VLC, VLCPlayer.GetMediaMrl); try ThisPasLibVlcMedia.Parse; CodeSite.Send('===>>> Title', ThisPasLibVlcMedia.GetMeta(libvlc_meta_Title)); finally ThisPasLibVlcMedia.Free; end;
However, this works only with LOCAL media files, not with Youtube videos. Why?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests