Giter Site home page Giter Site logo

Comments (39)

hetzge avatar hetzge commented on July 17, 2024 2

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.

M1cha avatar M1cha commented on July 17, 2024 1

@muammar the test.py works perfectly for me.

from mkchromecast.

M1cha avatar M1cha commented on July 17, 2024 1

@muammar both these functions return the correct address for me too :)

from mkchromecast.

muammar avatar muammar commented on July 17, 2024 1

@M1cha nice! Commit 707f5da introduces the change.

from mkchromecast.

M1cha avatar M1cha commented on July 17, 2024

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.

muammar avatar muammar commented on July 17, 2024

@whateva @M1cha thanks for the report. So, are you both using google cast devices for tv and not the google cast audio?.

from mkchromecast.

M1cha avatar M1cha commented on July 17, 2024

@muammar I'm using the 2nd gen Chromecast for TV but I'm using Arch Linux and not Ubuntu.

from mkchromecast.

whateva avatar whateva commented on July 17, 2024

I'm using the Nvidia Shield TV, and I'm still using Ubuntu 16.04.

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

Thanks for the information. I do not have a TV at home, but I will try my best to understand the problem.

from mkchromecast.

lefo59 avatar lefo59 commented on July 17, 2024

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.

muammar avatar muammar commented on July 17, 2024

@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.

M1cha avatar M1cha commented on July 17, 2024

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.

muammar avatar muammar commented on July 17, 2024

@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.

M1cha avatar M1cha commented on July 17, 2024

@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.

muammar avatar muammar commented on July 17, 2024

@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.

muammar avatar muammar commented on July 17, 2024

@M1cha thanks. Let's do something else:

  1. Launch python mkchromecast.py -s or mkchromecast -s.
  2. When it prompts to make you select your chromecast, don't do anything.
  3. Play whatever music you like, and select the mkchromecast sink in pavucontrol.
  4. Use your phone with the chrome browser application, and use as URL http://YOURLOCALCOMPUTERIP:5000.

Do you hear the music?.

from mkchromecast.

M1cha avatar M1cha commented on July 17, 2024

@muammar yes I do(but with a huge delay of 7s).

from mkchromecast.

M1cha avatar M1cha commented on July 17, 2024

@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.

muammar avatar muammar commented on July 17, 2024

@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.

M1cha avatar M1cha commented on July 17, 2024

@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.

muammar avatar muammar commented on July 17, 2024

@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.

M1cha avatar M1cha commented on July 17, 2024

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.

muammar avatar muammar commented on July 17, 2024

@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.

M1cha avatar M1cha commented on July 17, 2024

@muammar casting works just fine now, thx :)

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

@M1cha you are welcome!. Now hopefully @whateva and @lefo59's problem is related.

from mkchromecast.

lefo59 avatar lefo59 commented on July 17, 2024

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.

M1cha avatar M1cha commented on July 17, 2024

@muammar I dunno what caused it(maybe the ffmpeg -re commit?) but the delay is 3 instead of 7s now. good work :)

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

@M1cha hi!, yes it was the -re flag not being proper for 'live' devices. Nice to know it is working great. :)

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

I am proceeding to close this issue. Please, feel free to re-open it if you think it is necessary. Thanks.

from mkchromecast.

avantbored avatar avantbored commented on July 17, 2024

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.

muammar avatar muammar commented on July 17, 2024

@avantbored which version of Mkchromecast are you running?.

from mkchromecast.

avantbored avatar avantbored commented on July 17, 2024

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

@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.

avantbored avatar avantbored commented on July 17, 2024

@muammar

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.

muammar avatar muammar commented on July 17, 2024

@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.

avantbored avatar avantbored commented on July 17, 2024

@muammar

I tried --hostwith my GCast IP. PulseAudio bar is jumping up and down, but audio is not playing.

from mkchromecast.

muammar avatar muammar commented on July 17, 2024

@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.

avantbored avatar avantbored commented on July 17, 2024

@muammar

Currently streaming, but still no audio. '--host' is flagged with my local IP.

from mkchromecast.

avantbored avatar avantbored commented on July 17, 2024

@muammar

If it gives you any more context, I'm having the same issue with pulseaudio-dlna

from mkchromecast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.