2

Not sure if title is clear enough. I want the output from the speakers to be treated as an input.

So I can play a video in one window and then the sound from the video will act as input

Lincity
  • 25,371

1 Answers1

3

Totally do-able. The idea is you create a virtual speaker device, and have it connected to a virtual microphone device. On Windows, one could use a virtual audio cable. But on Ubuntu, that app doesn't exist. But we can still create a virtual audio cable using something like PulseAudio as described in this Stack Overflow post. Here's the part of the post that answers your question:

Create a virtual output device, and a virtual source from it's monitor.

pactl load-module module-null-sink sink_name="virtual_speaker" sink_properties=device.description="virtual_speaker"
pactl load-module module-remap-source master="virtual_speaker.monitor" source_name="virtual_mic" source_properties=device.description="virtual_mic"

Any sound played to "virtual_speaker" will be sent to "virtual_mic". (the rest of the linked answer is specific to doing it with FFmpeg)

cocomac
  • 3,394