Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using audio on the jess/pulseaudio container, with Podman and Mac OS #581

Open
clementremillieux opened this issue Dec 13, 2021 · 0 comments

Comments

@clementremillieux
Copy link

clementremillieux commented Dec 13, 2021

Hello,

I'm trying to use audio on the jess/pulseaudio container, launched with Podman on MacOS.

I am using a Big Sur OS with an Apple M1 chip ( also tested on an INTEL chip)
I use Podman in version 3.4.4

The commmand podman run hello world works well

After launching Podman ( podman machine init and podman machine start), I connect with ssh to the VM and install pulseaudio alsa-utils pulseaudio-utils. Then I launch pulseaudio on the host Mac OS and on the podman VM with the command

pulseaudio --load=module-native-protocol-tcp --exit-idle-time=-1 --daemon

Then I run the following command to launch the container:

podman run -it -e PULSE_SERVER=docker.for.mac.localhost -v /home/core/.config/pulse:/home/pulseaudio/.config/pulse --entrypoint speaker-test --rm jess/pulseaudio -c 2 -l 1 -t wav

and I get this error on my host terminal (the containers is then not launch):

{"msg": "exec container process "/usr/bin/speaker-test": Exec format error","level":"error","time":"2021-12-13T12:40:09.000532852Z"}

when I run the following command

podman run -it -e PULSE_SERVER=docker.for.mac.localhost -v /home/core/.config/pulse:/home/pulseaudio/.config/pulse --rm jess/pulseaudio

I got:

{"msg":"exec container process "/usr/bin/pulseaudio": Exec format error","level":"error","time":"2021-12-13T13:00:04.000533324Z"}

I would like to point out that the following command works for me with Docker, on the same macOS:

docker run -it -e PULSE_SERVER=docker.for.mac.localhost -v ~/.config/pulse:/home/pulseaudio/.config/pulse --entrypoint speaker-test --rm jess/pulseaudio -c 2 -l 1 -t wav.

I know that Podman uses a virtual machine on Mac OS. So I think I should first link the audio of the virtual machine with the audio of the MacOS host like when I mount volumes (first I mount the volume on the VM and then on the container) but I'm not sure. Is there some specific podman configuration or command to use audio, or should I do it manually ?

Do you have an idea?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant