Playing url stream - disable audio

This forum is about all development around libVLC.
aleroot
Blank Cone
Blank Cone
Posts: 12
Joined: 22 Dec 2015 18:47

Playing url stream - disable audio

Postby aleroot » 29 Jan 2022 15:36

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.

aleroot
Blank Cone
Blank Cone
Posts: 12
Joined: 22 Dec 2015 18:47

Re: Playing url stream - disable audio

Postby aleroot » 29 Jan 2022 16:21

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 ...

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Playing url stream - disable audio

Postby mfkl » 01 Feb 2022 06:07

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 );
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 24 guests