Hi Cristian, On Sat, Aug 27, 2016 at 04:57:01PM +0200, Cristian Ionescu-Idbohrn wrote: > Package: mkchromecast > Version: 0.3.5-1 > Severity: important > > First time run: > > $ LC_ALL=en_US.UTF-8 mkchromecast --debug --encoder-backend ffmpeg > ('backends: ', ['ffmpeg', 'avconv', 'parec']) > ('backends: ', ['ffmpeg', 'avconv', 'parec']) > USER =foo > PATH =/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games > mkchromecast v0.3.5 > :::cast::: sockets method 192.168.98.55 > Creating pulseaudio sink... > Open pavucontrol and select the mkchromecast sink. > Traceback (most recent call last): > File "/usr/bin/mkchromecast", line 34, in <module> > create_sink() > File "/usr/share/mkchromecast/mkchromecast/pulseaudio.py", line 28, in > create_sink > stderr=subprocess.PIPE > File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ > errread, errwrite) > File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > > /usr/share/doc/mkchromecast/README.Debian informs: > > 3. In order to cast you have to install pavucontrol, and select the > mkchromecast sink. > > But /usr/share/mkchromecast/mkchromecast/pulseaudio.py seems to expect > commands pactl and pacmd to be available. Those commands are > distributed in package pulseaudio-utils, not pavucontrol. >
I have now updated README.Debian. > Removing pavucontrol and installing pulseaudio-utils takes me further > to: > > $ LC_ALL=en_US.UTF-8 mkchromecast --debug --encoder-backend ffmpeg > ('backends: ', ['ffmpeg', 'avconv', 'parec']) > ('backends: ', ['ffmpeg', 'avconv', 'parec']) > USER =foo > PATH =/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games > mkchromecast v0.3.5 > :::cast::: sockets method 192.168.98.55 > Creating pulseaudio sink... > Open pavucontrol and select the mkchromecast sink. > Starting local streaming server > [Done] > (':::audio::: chunk_size: ', 1024) > Selected backend: ffmpeg > Selected audio codec: mp3 > Default bitrate used: 192k > Default sample rate used: 44100Hz > :::audio::: command ['ffmpeg', '-ac', '2', '-ar', '44100', '-f', 'pulse', > '-i', 'mkchromecast.monitor', '-acodec', 'libmp3lame', '-f', 'mp3', '-ac', > '2', '-ar', '44100', '-b:a', '192k', 'pipe:'] > PID of main process: 14226 > PID of streaming process: 14233 > * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) > self.cclist [] > elif len(self.cclist) == 0 and self.tray == False: > No devices found! > > Wouldn't it be a good idea to add pulseaudio-utils to mkchromecast's > "Depends:" list? I should also mention, there's _no_ pulseaudio > server installed on this computer. I see this in the strace: You are right. I have added it to the Depends field. > > execve("/usr/bin/pulseaudio", ["/usr/bin/pulseaudio", "--start", > "--log-target=syslog"], [/* 50 vars */]) = -1 ENOENT (No such file or > directory) > > Does mkchromecast assume pulseaudio is installed on the host > mkchromecast is run on? In that case mkchromecast is unusable for me > as I don't want to install pulseaudio, for various reasons. Yes, it assumes that pulseaudio is installed on the host. What I basically do is to monitor an output with a null-sink and pipe it to ffmpeg or record it with parec and then stream it. With pavucontrol you can select the monitor and have still audio in your host. I may try to find another way for capturing the audio from alsa. But in this sense, I am afraid mkchromecast would work as it does in macOS where all system sound is casted. But let's give it a try. > > And after that: > > pa_context_connect() failed: Connection refused > > The other thing I'm wondering about is this: > > http://0.0.0.0:5000/ > > nmap reports port 5000 being upnp: > > PORT STATE SERVICE > 8008/tcp open http > 8009/tcp open ajp13 > > PORT STATE SERVICE > 1900/udp open|filtered upnp > 5353/udp open|filtered zeroconf > > My computer has two interfaces (eth0 and wlan0) connected to two > _different_ local networks. Reading `mkchromecast -h', I couldn't > find an option enabling me to direct the discovery to a specific > interface/network. The chromecast device i on the wireless network > (wlan0) while this computers primary network is wired (eth0). > This is a very interesting option to add. I will do my best to come with a solution. > I also see some trafic to 224.0.0.251:5353 and 127.0.0.1:5353, which > would be the wired network, I guess. > > None of these packages: > > avahi-autoipd - Avahi IPv4LL network address configuration daemon > avahi-daemon - Avahi mDNS/DNS-SD daemon > avahi-discover - Service discover user interface for avahi > avahi-dnsconfd - Avahi DNS configuration tool > avahi-ui-utils - Avahi GTK+ utilities > avahi-utils - Avahi browsing, publishing and discovery utilities > > are installed on this host. Thanks for your report. Cheers, -- Muammar El Khatib. Linux user: 403107. GPG Key = 71246E4A. http://muammar.me | http://proyectociencia.org ,''`. : :' : `. `' `-