Page 1 of 1

Playing url stream - disable audio

Posted: 29 Jan 2022 15:36
by aleroot
Hi,
I'm playing an url using the libVLC in a C++ application I'm using to test the quality of the video, whenever I start the playback with:

Code: Select all

auto vlc_instance = VLC::Instance(0, nullptr); auto media = VLC::Media(vlc_instance, url, VLC::Media::FromLocation); auto mp = VLC::MediaPlayer(media); mp.play();
I can listen to the audio even if my application is a console application that shows no video, is there a way to disable the audio ? Put on mute ?

I can see there is:

Code: Select all

mp.setAudioOutput("string");
Is there a name I can use to tell VLC I want it on mute ? No Audio ?


In addition I would like to retrieve information like the video resolution and stream quality, are there properties exposed in order to do that ?

Thanks.

Re: Playing url stream - disable audio

Posted: 29 Jan 2022 16:21
by aleroot
I've found there is:

Code: Select all

mp.setMute(true);
It is working.
Still I would like to understand the stream quality like resolution and bit rate ...

Re: Playing url stream - disable audio

Posted: 01 Feb 2022 06:07
by mfkl
In addition I would like to retrieve information like the video resolution and stream quality, are there properties exposed in order to do that ?
try inspecting the media tracks

Code: Select all

auto tracks = mp.tracks( VLC::MediaTrack::Type::Video );