简体   繁体   中英

Alternative for gstreamer pulsesrc element in windows?

I have the following simple pipeline in linux, which I use to send output audio from a device to other.

gst-launch-1.0 -v pulsesrc ! audioconvert ! opusenc ! rtpopuspay ! udpsink port=$2 host=$1

How would I do the same on windows? What GStreamer element, can I use? I tried wasapisrc which only captured the mic audio and not the speaker. Can I fix this or is there another element altogether for this?

I tried to use the loopback option in the wasapisrc element but it didn't work. I think the documentation is probably outdated.

What worked for me is, enabling Stereo Mix on Windows('https://thegeekpage.com/stereo-mix/') and using it as a source in wasapisrc

After enabling it, do gst-device-monitor-1.0 Audio/Source to get list of all the Audio input devices and under it there would be Stereo Mix, copy the device.strid of it and do gst-launch-1.0 waspisrc device=$device.strid ! fakesink gst-launch-1.0 waspisrc device=$device.strid ! fakesink .

This will capture the audio coming to speaker on windows, and you can do anything with it, streaming to other devices, recording or mixing or anything. Also the low-latency option to wasapisrc set to true brings a little improvement in latency too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM