How can I record the audio of an application like Firefox inside a docker container with ffmpeg? I've found examples how to forward pulseaudio to the host - netflix, skype.
When I'm trying to use pactl:
pactl list sources
Or
docker exec -it <container-id> bash
apt-get install pulseaudio
pactl load-module module-native-protocol-unix auth-anonymous=1 socket=/tmp/.pulse-socket
I'm getting an error:
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
This also fail
ffmpeg -f pulse -i default /tmp/pulse.wav