Page 1 of 1

Libvlc : audio-filter as argument

Posted: 14 Nov 2015 19:01
by bounty
Hi
when I use
C:\Program Files (x86)\VideoLAN\VLC\vlc.exe mymusic.mp3 –audio-filter=mono
It works well .

When I use libvlc in C or C++

char const *vlc_argv[] = {
"--audio-filter=mono"
};
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
libvlc = libvlc_new(vlc_argc, vlc_argv);

It seems that VLC does not use the filter.
What's wrong?

Re: Libvlc : audio-filter as argument

Posted: 15 Nov 2015 15:43
by grindstone
It seems to me that "--audio-filter=mono" doesn't work at all. As a workaround you can use the "transcode" - option instead:

Code: Select all

char smem_options[256]; sprintf(smem_options, "#transcode{acodec=s16l,channels=1}:duplicate{dst=display,dst=dummy}"; const char * const vlc_argv[] = { "--sout", smem_options }; int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); libvlc = libvlc_new(vlc_argc, vlc_argv);

Re: Libvlc : audio-filter as argument

Posted: 16 Nov 2015 09:34
by Rémi Denis-Courmont
audio-filter is not meant to be used with LibVLC.

Re: Libvlc : audio-filter as argument

Posted: 16 Nov 2015 11:42
by bounty
Thanks for the tip grindstone.

My aim was to be able to use an audio -filter custom , but
I understand that this is only possible through libvlccore

https://forum.videolan.org/viewtopic.php?f=32&t=121953

Re: Libvlc : audio-filter as argument

Posted: 16 Nov 2015 14:22
by grindstone
@bounty:
That's a very interesting thread! Maybe it's valuable to create libvlccore bindings for freeBasic (or maybe it's easier to use the command line args). I'll have a look at it.

Re: Libvlc : audio-filter as argument

Posted: 17 Nov 2015 08:21
by ppcat
Hi.
It works great.
Can I to chain 2 audio filters this way?
If not, maybe is there other way?