Streaming and recording webcam with sound

This forum is about all development around libVLC.
NicolasS
New Cone
New Cone
Posts: 9
Joined: 27 May 2023 08:27

Streaming and recording webcam with sound

Postby NicolasS » 17 Jun 2023 13:31

Hi,

I am developing a small application with libvlc whose purpose is to stream and record video from a webcam.

For the moment, it works fine by sound is missing.

And now, I wish to add sound. In the command line, I do:
vlc v4l2:///dev/video0 :input-slave=pulse:// --gain=0 ...

But with libvlc I can't get the :input-slave: and --gain arguments to be considered.

I tried calling libvlc_new with these 2 arguments but still no sound.

I would like to know the right way to do it. If anyone has an idea, it would be great.

Thanks in advance for help.

Nicolas.

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

Re: Streaming and recording webcam with sound

Postby mfkl » 19 Jun 2023 06:42

I tried calling libvlc_new with these 2 arguments but still no sound.
Please share your actual code. And verbose logs.

look into libvlc_media_add_option also
https://mfkl.github.io

NicolasS
New Cone
New Cone
Posts: 9
Joined: 27 May 2023 08:27

Re: Streaming and recording webcam with sound

Postby NicolasS » 19 Jun 2023 10:26

Hi mfkl.

I have tried to use libvlc_media_add_option and it works with it.

Thanks for help. Now audio is working fine !


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests