Open carloslevy opened 3 years ago
I'm having similar problems on Fedora 33 after upgrading. Using the latest mkchromecast code from here.
I had multiple mkchromecast sinks appear in testing, but I can't replicate that anymore. May have been due to testing different encoders instead of ffmpeg.
I restarted to clear the virtual output devices, and they were gone. Still no audio output. I tried running it the next day and it mysteriously worked. Haven't figured out why it sometimes works but doesn't. I need to run more tests but it could be that it works when there is no active "Firefox: AudioStream" in Pavucontrol. When it's working it's throwing ffmpeg warnings:
[wav @ 0x559c72557700] Non-monotonous DTS in output stream 0:0; previous: 1115914, current: 1115905; changing to 1115914. This may result in incorrect timestamps in the output file.
When it's not working it doesn't do this at all. I do see VU activity in the input and output devices in Pavucontrol. I run with the following method which has always served me well due to low latency:
./bin/mkchromecast -s --encoder-backend ffmpeg -c wav
When it worked I had to manually select the mkchromecast sink as an output. When it doesn't work it seems to be automatic, though this has never been a problem in the past.
It exits cleanly when it works, but in this case it's failing to exit cleanly. I need to dig a bit and see if this indicates anything.
` ^CProcess Process-1: Traceback (most recent call last): File "/usr/lib64/python3.9/socket.py", line 791, in getfqdn hostname, aliases, ipaddrs = gethostbyaddr(name) socket.herror: [Errno 0] Resolver Error 0 (no error)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib64/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, self._kwargs) File "/home/username/mkchromecast/mkchromecast/bin/../mkchromecast/audio.py", line 960, in start_app app.run(host=ip, port=port, passthrough_errors=False) File "/usr/lib/python3.9/site-packages/flask/app.py", line 990, in run run_simple(host, port, self, options) File "/usr/lib/python3.9/site-packages/werkzeug/serving.py", line 1052, in run_simple inner() File "/usr/lib/python3.9/site-packages/werkzeug/serving.py", line 996, in inner srv = make_server( File "/usr/lib/python3.9/site-packages/werkzeug/serving.py", line 847, in make_server return ThreadedWSGIServer( File "/usr/lib/python3.9/site-packages/werkzeug/serving.py", line 740, in init HTTPServer.init(self, server_address, handler) File "/usr/lib64/python3.9/socketserver.py", line 452, in init self.server_bind() File "/usr/lib64/python3.9/http/server.py", line 140, in server_bind self.server_name = socket.getfqdn(host) File "/usr/lib64/python3.9/socket.py", line 791, in getfqdn hostname, aliases, ipaddrs = gethostbyaddr(name) KeyboardInterrupt Cleaning up /tmp/... [Done] Killed `
I think that this seems to be some weird issue with Pulse Audio, but that's no surprise to me since it alwyas comes with new surprises w/ each update.
This might be related to https://github.com/muammar/mkchromecast/issues/308 or https://github.com/muammar/mkchromecast/issues/158
Seems to be working again today after I brought the machine out of standby for the first time. I see that ffmpeg pipes Mkchromecast.monitor to a local web server. Possible that it's not getting that far in all cases but now I know where to look next time it fails.
When it works, it starts the web server. When it doesn't work, it does everything except for launch the web server:
Mkchromecast v0.3.9 Creating Pulseaudio Sink... Open Pavucontrol and Select the Mkchromecast Sink. Starting Local Streaming Server [Done] :::audio::: chunk_size, frame_size, buffer_size: 64, 2048, 8192 Selected backend: ffmpeg Selected audio codec: wav The wav codec does not require the bitrate argument. Default sample rate used: 44100Hz. :::audio::: command ['ffmpeg', '-ac', '2', '-ar', '44100', '-frame_size', '2048', '-fragment_size', '2048', '-f', 'pulse', '-i', 'Mkchromecast.monitor', '-f', 'wav', '-acodec', 'pcm_s24le', '-ac', '2', '-ar', '44100', 'pipe:']
That last line is missing when it doesn't launch the web server. It just goes right on to the casting devices list. Now I have to figure out why.
I have the same issue. No errors when run from the CLI. MK finds the right device and connects, but no sound is played. Mkchromecast v0.3.9 Manjaro 21.3.7
Hi, i installed in Manjaro and there's no audio output after selecting mkchromecast sink. It is weird it shows two sinks both called mkchromecast. I searched and there's no similar issue reported before.