I’d like to make a server which allows me to serve sound from an application on my computer to an http endpoint. Since I’m using a Linux distribution, I’d like to use PipeWire. I would prefer using Java, but I’m more intrested in getting any results.
I recognize three major parts in this process:
- Create virtual sink with Pipewire, and set the sink to listen outputs of the applications I want
- Bring the Pipewire virtual sink to the same environment where the server is
- Serve the virtual sink through the server’s endpoint as a stream
Currently I’m stuck in the second step: bringing an audio sink to Java. I tried listing virtual sinks with Java AudioSystem, but getMixerInfo
didn’t see them.
for (Mixer.Info info : AudioSystem.getMixerInfo()) {
System.out.println(info);
}
If I’m going to attempt this in Java, I suspect that I have to call PipeWire with commandline. In that case I have no idea how to pass the process/stream from commandline to Java environment.
I’m looking for any pointers, literature, examples, suggestions or any direction which could aid me in this project.