libVLC and AudioBarGraph filter

This forum is about all development around libVLC.
ampi
New Cone
New Cone
Posts: 2
Joined: 21 Jun 2007 17:33
VLC version: 2.2.1
Operating System: Windows

libVLC and AudioBarGraph filter

Postby ampi » 26 Oct 2015 14:22

Hi,

I'm using libVLC in a .NET application (C#) and it works like a charm!
Now I want to use the audiobargraph filter but it doesn't work.

I'm using libVLC this way :

VlcInstance class

Code: Select all

internal IntPtr Handle; public VlcInstance() { List<string> vlcArgs = new List<string>(); vlcArgs.Add("--audio-filter=audiobargraph_a"); vlcArgs.Add("--audiobargraph_a-bargraph=1"); vlcArgs.Add("--sub-source=audiobargraph_v"); this.Handle = LibVlc.libvlc_new(vlcArgs.Count, vlcArgs.ToArray()); if (this.Handle == IntPtr.Zero) throw new VlcException(); }
VlcMediaPlayer class

Code: Select all

internal IntPtr Handle; public VlcMediaPlayer(VlcInstance instance) { if (instance.Handle != IntPtr.Zero) this.Handle = LibVlc.libvlc_media_player_new(instance.Handle); if (Handle == IntPtr.Zero) throw new VlcException(); } private IntPtr _pDrawable; public IntPtr Drawable { get { return _pDrawable; } set { if (Handle != IntPtr.Zero) { LibVlc.libvlc_media_player_set_hwnd(Handle, value); _pDrawable = value; } else throw new VlcException(); } } public VlcMedia Media { get { IntPtr media = LibVlc.libvlc_media_player_get_media(Handle); if (media == IntPtr.Zero) return null; return new VlcMedia(media); } set { LibVlc.libvlc_media_player_set_media(Handle, value.Handle); } }
VlcMedia class

Code: Select all

internal IntPtr Handle; public VlcMedia(VlcInstance instance) { this.Handle = LibVlc.libvlc_media_new_as_node(instance.Handle, "mediaName"); if (Handle == IntPtr.Zero) throw new VlcException(); }
Application class

Code: Select all

using (VlcMedia media = new VlcMedia(_vlcInstance, url)) { if (_vlcPlayer == null) _vlcPlayer = new VlcMediaPlayer(media); else _vlcPlayer.Media = media; } _vlcPlayer.Drawable = PreviewPictureBox.Handle; _vlcPlayer.Play();
The audio meter is present but not showing audio levels:

Image

I've started vlc with the same args and it works flawlessly:

Code: Select all

vlc "rtp://@239.239.239.239:51416" --audio-filter=audiobargraph_a --audiobargraph_a-bargraph=1 --sub-source=audiobargraph_v
Image

Am I doing something wrong? Is it possible to use audiobargraph in libVLC? If not, anybody got a workaround to integrate audiobargraph in .NET application?

Many thanks,
ampi.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLC and AudioBarGraph filter

Postby Rémi Denis-Courmont » 26 Oct 2015 14:27

1) N/A. 2) Not so far.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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: libVLC and AudioBarGraph filter

Postby Jean-Baptiste Kempf » 30 Oct 2015 18:40

Did you check the log to see if both modules were loaded?
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.

zoidber_isid
New Cone
New Cone
Posts: 1
Joined: 12 May 2016 18:38
VLC version: 2.2.0
Operating System: Windows

Re: libVLC and AudioBarGraph filter

Postby zoidber_isid » 12 May 2016 19:01

Hi all. I'm working too in the audiobargraph over a video using libVLC. I have the same issue than ampi (using C++ instead of C#) and I'm developing with libVLC 2.2.0. I've read a thousand threads looking for the way to show audiobar using libvlc and no one showed me the light.
Is there any improvement in libVLC that allows me to show correctly the audiobargraph?

Regards from Discworld's fan. :D

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: libVLC and AudioBarGraph filter

Postby Jean-Baptiste Kempf » 28 Jun 2016 10:11

It's not tested, but it should not be hard to fix, tbh.
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.

AppStar
New Cone
New Cone
Posts: 1
Joined: 24 Dec 2016 01:21

Re: libVLC and AudioBarGraph filter

Postby AppStar » 24 Dec 2016 01:34

Any update on this? I have a similar problem where I can't enable the AudiooBarGraph in the Windows Universal VLC app. I'm using the same parameters in the PlaybackService.Initialize method but can only see a scale without audio bars just like the original post.

Ultimately I'd like to subscribe to or monitor the audio level to perform an action when a certain level is reached. This probably needs fixed before I can even attempt that.

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: libVLC and AudioBarGraph filter

Postby Jean-Baptiste Kempf » 27 Dec 2016 11:38

So far, you cannot act on audiobargraph detection.
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.

mklimo
New Cone
New Cone
Posts: 2
Joined: 13 Oct 2017 15:38

Re: libVLC and AudioBarGraph filter

Postby mklimo » 13 Oct 2017 15:45

Hi,
i am wondering if this is still an issue. I am trying to add audiobargraph using libvlc but only thing i get is empty scale without audio bars. I tried multiple libvlc versions including 3.0.0 nightlies.

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: libVLC and AudioBarGraph filter

Postby Jean-Baptiste Kempf » 16 Oct 2017 06:07

Hi,
i am wondering if this is still an issue. I am trying to add audiobargraph using libvlc but only thing i get is empty scale without audio bars. I tried multiple libvlc versions including 3.0.0 nightlies.
It might have not been tested enough, tbh. Does it work with VLC desktop?
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.

mklimo
New Cone
New Cone
Posts: 2
Joined: 13 Oct 2017 15:38

Re: libVLC and AudioBarGraph filter

Postby mklimo » 07 Nov 2017 10:41

Yes, its working flawlessly with almost all desktop VLC versions :)
Sorry for late response.

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: libVLC and AudioBarGraph filter

Postby Jean-Baptiste Kempf » 11 Nov 2017 14:40

Yes, its working flawlessly with almost all desktop VLC versions :)
Sorry for late response.
That's weird. It could be that the sub-source is not loaded, but I don't see why.
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.

cube45
New Cone
New Cone
Posts: 8
Joined: 15 Feb 2018 21:32

Re: libVLC and AudioBarGraph filter

Postby cube45 » 15 Feb 2018 21:45

Hello,
This is a follow-up of the issue posted here : https://github.com/ZeBobo5/Vlc.DotNet/issues/33

I just made some tests and saw that I have a lot of
[0000028a1df1c040] main subpicture warning: original picture size is undefined
(using vlc-3.0.0) in the logs

Here is the full log : https://pastebin.com/1njhqbM0

Is there an associated trac issue already?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 40 guests