How to show music metadata as OSD while playing a song?

Discuss your Lua playlist, album art and interface scripts.
VLAN-Lover
New Cone
New Cone
Posts: 8
Joined: 30 Nov 2016 10:32

How to show music metadata as OSD while playing a song?

Postby VLAN-Lover » 21 Jul 2020 17:57

How could I show the embedded metadata in my mp3 song while playing this song?

If I double click on a MP3, VLC starts and I perfectly see the albumcover (embedded in my song).
It would be great, If I could display some additional data like the album name, the year and especially helpful: the embedded lyrics.

I saw in some scripts found in this forum that such a command exist:

Code: Select all

vlc.osd.message(MyMetaData,channel1,"top-left",10*1000000)
Is it possible to get this working for music/during music play too?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to show music metadata as OSD while playing a song?

Postby mederi » 23 Jul 2020 13:02

You can enable a visualization (Audio > Visualizations > ) to create a missing video output for subtitles/OSD. A visualization effect with album art (or it could be a custom absolute/relative image) and an option to automatically enable visualization only for audio files without video track have already been requested.
https://forum.videolan.org/viewtopic.ph ... alisations
https://forum.videolan.org/viewtopic.ph ... alisations
https://forum.videolan.org/viewtopic.php?f=29&t=124951
I do not know whether the lyrics tag is already supported or not in VLC (Tools > Media Information > Metadata tab?).

VLAN-Lover
New Cone
New Cone
Posts: 8
Joined: 30 Nov 2016 10:32

Re: How to show music metadata as OSD while playing a song?

Postby VLAN-Lover » 23 Jul 2020 13:35

Thank you @mederi for your informations:
I do not know whether the lyrics tag is already supported or not in VLC (Tools > Media Information > Metadata tab?).
Yes it is already supported:
Image

The linked ticket for album art https://trac.videolan.org/vlc/ticket/16127 seems to be solved. At least my VLC shows the embedded album art without any additional steps.
I look for a way to additonally show existing and available id3 informations on OSD.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to show music metadata as OSD while playing a song?

Postby mederi » 25 Jul 2020 15:46

VLC displays embedded album art as a special image without video output object that is needed for OSD. If you enable a visualization effect in VLC menu (Audio > Visualizations > ), then you will have a vout object for OSD message. The ticket requests a visualisation effect (a new one or an enhancement of a current one) that would display the same album art in the centre of the screen. The simple "Metadata over video" script is already available for you to display some metadata on the screen in a playing video or in an audio visualization. Try to edit the script in a text editor to display the Lyrics tag. How would you display long text (many lines) on the screen? The OSD text is not scrollable, but you can only scale it down on-the-fly using Ctrl+Mouse Wheel Down hotkey.

VLAN-Lover
New Cone
New Cone
Posts: 8
Joined: 30 Nov 2016 10:32

Re: How to show music metadata as OSD while playing a song?

Postby VLAN-Lover » 25 Jul 2020 17:14

Thanks for your explanation, @mederi!

Actually I can display the id3 tag information likes this:
Image

What I can't find:
a) How can I read and display the cover art from id3tag?
b) How can I start VLC with an activated Visualization for Audio from an extension? (The same as clicking on Audio -> Visualization ->)
c) How can I reduce the subtitle font to - let's say 65%? (The same as if I set the "text renderer" fontsize pixel to something like "16")
d) How can I use some formatting options, like a Tabulator the position/arrange the metadata in a column?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to show music metadata as OSD while playing a song?

Postby mederi » 26 Jul 2020 14:37

a) Probably not. You can find "art.jpg" file in vlc art dir and try to reload current mp3 with :input-slave art image.
b) Answered in my previous posts and in the provided links.
c) Tools > Preferences > Show settings=All > Video \ Subtitles/OSD \ Text renderer: Font size in pixels or Relative font size.
d) Probably not.

VLAN-Lover
New Cone
New Cone
Posts: 8
Joined: 30 Nov 2016 10:32

Re: How to show music metadata as OSD while playing a song?

Postby VLAN-Lover » 26 Jul 2020 16:26

Thanks @mederi

b) Sorry, I must be blind. Where and how can I set a Visualization effect inside an extension?
(I would like to set "VU meter" as Visualization effect as soon as I click on menu View -> Name of my extension, but not set it generally for all other uses of VLC)

I ask the same for
c) I already learned how to set it generally in VLC. I would prefer to set the smaller font size only after activating and only during the use of my extension.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: How to show music metadata as OSD while playing a song?

Postby mederi » 26 Jul 2020 17:50

O.K. You already know how to set settings in VLC preferences or in VLC menu. The VLC Lua stuff is a bit more tricky especially if you would like to control things on-the-fly. Check Configuration (check "vlcrc" file in vlc dir), Objects and Variables paragraphs in the README.txt. Some VLC developer could help with a right clue, whether it is possible or not. Something like: vlc.var.set(vlc.object.aout(), ?, ?)


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 3 guests