Comments (39)
In my case the problem was the firewall under mx-linux. After i disabled it with sudo ufw disable
it is working fine :)
from mkchromecast.
@muammar the test.py works perfectly for me.
from mkchromecast.
@muammar both these functions return the correct address for me too :)
from mkchromecast.
@M1cha nice! Commit 707f5da introduces the change.
from mkchromecast.
same for me. first the chromecast shows the empty album cover and a progress bar for like 2 minutes and then I just see a black screen with a chromecast icon.
That doesn't look right to me.
from mkchromecast.
@whateva @M1cha thanks for the report. So, are you both using google cast devices for tv and not the google cast audio?.
from mkchromecast.
@muammar I'm using the 2nd gen Chromecast for TV but I'm using Arch Linux and not Ubuntu.
from mkchromecast.
I'm using the Nvidia Shield TV, and I'm still using Ubuntu 16.04.
from mkchromecast.
Thanks for the information. I do not have a TV at home, but I will try my best to understand the problem.
from mkchromecast.
Hi. I'm having the same trouble as M1cha. I'm running Xubuntu 16.04. Followed the directions to install exactly as written in OMG! Ubuntu's site. It looks like it should be working, but it's not. Pulseaudio is showing mkchromecast as the device, and the sound bar shows that something's going on.
from mkchromecast.
@lefo59 thanks for reporting. I suppose you are also experiencing this problem with google cast for TVs. I have asked in the issues' tracker of pychromecast upstream to see if anybody knows about this problem.
In OMG! Ubuntu's site, the article says it was tested on a TV!. I am curious to know what is different in the setups presenting the problem with respect to the ones that not.
from mkchromecast.
my chromecast is directly connected to my TV via HDMI. I don't have any extra hw like av receivers, etc. Also my TV doesn't support any special codec's like dts. It's a old lcd tv without internet etc.
from mkchromecast.
@M1cha for that setup I had found these links:
http://chromecastforum.net/chromecast-help/how-i-solved-my-'no-sound'-issue/
https://www.techjunkie.com/sound-tv-chromecast/
It happens when casting audio from google chrome to chromecasts attached via HDMI ports.
from mkchromecast.
@muammar well I doubt it's any of these (they're just like "reconnect and restart" anyway). because my sound work with everything else(and I use my chromecast a lot. videostream, tab cast, youtube, GooglePlayAudio,...).
from mkchromecast.
@whateva @M1cha @lefo59 would you mind to download this file: https://raw.githubusercontent.com/muammar/mkchromecast/master/test.py and run it python test.py
?. Does it do something in your devices?.
Change friendly_name="CCA"
to friendly_name="YOURCHROMECASTNAME"
.
Thanks.
from mkchromecast.
@M1cha thanks. Let's do something else:
- Launch
python mkchromecast.py -s
ormkchromecast -s
. - When it prompts to make you select your chromecast, don't do anything.
- Play whatever music you like, and select the
mkchromecast
sink inpavucontrol
. - Use your phone with the chrome browser application, and use as URL
http://YOURLOCALCOMPUTERIP:5000
.
Do you hear the music?.
from mkchromecast.
@muammar yes I do(but with a huge delay of 7s).
from mkchromecast.
@muammar
uhm I just read the logs (of the normal run) for the first time(I should have done that earlier) and I think I know what the prob is. The streaming server gets started on the wrong interface.
I'm on wifi(wlp2s0) with my 192.168.x.x IP, but mkchromecast shows: Your local IP is: 172.17.0.1,
which after running ifconfig seems to be a interface called docker0.
from mkchromecast.
@M1cha that's the problem then. That's why I made you run the tests. I am using this function to guess the IP. So it doesn't play well when you have another active interface (as the one used by docker). I will try to emulate what you have, and see if I fix it!. Or if you know some python, you can try!.
from mkchromecast.
@muammar I just confirmed this by hardcoding the real ip and it works :D
You're already discovering the chromecast device, can't you detect from which interface this message comes from?
from mkchromecast.
@M1cha I came with a very simple solution: 7754b7b. If you are using the git repo, do a git pull
and tell me if it works. That should at least solve your problem.
from mkchromecast.
yes, unless I start up virtualbox and get another network device:
vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
which ofc makes mkchromecast break again.
vmware would create virtual vmnetX devices too but I dunno if they are inet devices too
from mkchromecast.
@M1cha thanks for replying. netifaces
sees all network devices "virtual" and "physical". What a problem :P, but it is very interesting anyways. I have installed docker.io
, and I have the following network interfaces:
muammar@zarathustra /tmp
% /sbin/ifconfig !10101
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:e3:f5:f1:a8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 15754 bytes 22107965 (21.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15754 bytes 22107965 (21.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.22 netmask 255.255.255.0 broadcast 192.168.1.255
ether a4:5e:60:d2:d2:f3 txqueuelen 1000 (Ethernet)
RX packets 17729 bytes 15191742 (14.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15911 bytes 2603663 (2.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Using this function returns my ip 192.168.1.22
, regardless the presence of docker0
:
def getNetworkIp():
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.connect(('<broadcast>', 0))
return s.getsockname()[0]
print (getNetworkIp()
And this one also seems to work:
import socket
def get_ip():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
# doesn't even have to be reachable
s.connect(('10.255.255.255', 0))
IP = s.getsockname()[0]
except:
IP = '127.0.0.1'
finally:
s.close()
return IP
print(get_ip())
You can give a try downloading this gist: https://gist.github.com/muammar/b9daa1ff21edcf3b729d1c00999f988e
Source: http://stackoverflow.com/questions/166506/finding-local-ip-addresses-using-pythons-stdlib
from mkchromecast.
@muammar casting works just fine now, thx :)
from mkchromecast.
@M1cha you are welcome!. Now hopefully @whateva and @lefo59's problem is related.
from mkchromecast.
Sorry, work has been crazy. I'll try tonight.
Sent from BlueMail
On Aug 24, 2016, 4:18 AM, at 4:18 AM, Muammar El Khatib [email protected] wrote:
@M1cha you are welcome!. Now hopefully @whateva and @lefo59's problem
is related.You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#14 (comment)
from mkchromecast.
@muammar I dunno what caused it(maybe the ffmpeg -re commit?) but the delay is 3 instead of 7s now. good work :)
from mkchromecast.
@M1cha hi!, yes it was the -re
flag not being proper for 'live' devices. Nice to know it is working great. :)
from mkchromecast.
I am proceeding to close this issue. Please, feel free to re-open it if you think it is necessary. Thanks.
from mkchromecast.
Hello,
I am experiencing a similar problem.
Running Ubuntu MATE 16.04.
I created the "cast.py" file in the mkchromecast directory. Only "docker0", for me, is "tun0." I made the changes. "tun0" is my local IP, whereas "wlp2s0" is my router IP.
However, mkchromecast currently shows:
The IP of [CCDEVICE] is: 192.168.1.100 Your local IP is: 10.63.10.6
Please advise. I'm a total novice! Many thanks.
from mkchromecast.
@avantbored which version of Mkchromecast are you running?.
from mkchromecast.
from mkchromecast.
@avantbored try passing your IP
using the --host
flag. Check an example here: https://github.com/muammar/mkchromecast/blob/master/mkchromecast/__init__.py#L190.
Tell me if it works.
from mkchromecast.
OK, I will! Only: not sure where to put this. Should I create a new file, or should edit "cast.py" or "mkchromecast.py" ?
from mkchromecast.
@avantbored You just have to execute your command as follows:
mkchromecast --host 192.162.1.10
or
python mkchromecast.py --host 192.162.1.10
Does it make sense now?
from mkchromecast.
I tried --host
with my GCast IP. PulseAudio bar is jumping up and down, but audio is not playing.
from mkchromecast.
@avantbored the IP
should be the local IP of your computer. If I understood correctly, you have virtual network devices that are conflicting with the discovering of IPs. Therefore, you have to pass to --host
the local IP.
from mkchromecast.
Currently streaming, but still no audio. '--host' is flagged with my local IP.
from mkchromecast.
If it gives you any more context, I'm having the same issue with pulseaudio-dlna
from mkchromecast.
Related Issues (20)
- Deprecate youtube-dl for yt-dlp HOT 2
- Add encapsulation, reduce code duplication, and simplify cascading logic
- Does not play any audio on google speakers HOT 1
- sys tray disappears after searching for devices
- TypeError: Descriptors cannot not be created directly. HOT 2
- Using --video crashes the app HOT 2
- archlinux mkchromecast-git package targets unstable `master` branch HOT 5
- Error with start HOT 2
- Support for playlists
- Restore ability to use updated settings without restarting mkchromecast HOT 1
- How is it possible to transmit the volume, pause and resume via command line?
- `-n` fails to find Chromecast when TV is powered off
- Crash when I try to connect to a pair of Sonos One SL HOT 1
- Installing mkchromecast with brew HOT 1
- Issues with Tray Application: ModuleNotFoundError: No module named 'imp' HOT 5
- Unable to detect Sonos One speaker HOT 5
- Re-enable Sonos support in mkchromecast HOT 1
- `self.codec` is not set appropriately on Mac HOT 7
- Cant find Chromecast [Arch Linux]
- Glitch/bug on Mac Sonoma 14.5 (Macbook Air M2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkchromecast.