Hi Cristian,

On Fri, Sep 16, 2016 at 1:53 PM, Cristian Ionescu-Idbohrn
<cristian.ionescu-idbo...@axis.com> wrote:
> Alright, found that myself and installed package 'python-flask'.
> Having done that, progress ;)
>
> Cast media controller status
>
> CastStatus(is_active_input=False, ..., status_text=u'Ready To Cast')
>
>
> Controls:
> =========
>
> Volume up: u
> Volume down: d
> Quit the application: q or Ctrl-C
>
> 192.168.x.y - - [16/Sep/2016 13:40:45] "GET /stream HTTP/1.1" 200 -
>
> and sound out the TV speakers.  Fun :)
>

Cool to know it is working now!.

On Fri, Sep 16, 2016 at 2:27 PM, Cristian Ionescu-Idbohrn
<cristian.ionescu-idbo...@axis.com> wrote:
> One thing I noticed is that if I _first_ start mkchromecast and play
> some sound file _after_, the player (in this case mpg123) will bail
> out with:
>
> ,----
> | [format.c:295] error: Unable to set up output format! Constraints: 44100, 
> 22050 or 11025Hz.
> | [mpg123.c:695] error: ...in decoding next frame: Unable to set up output 
> format! (code 1)
> `----
>
> If I now kill (^C) mkchromecast, I get this trace:
>
> ,----
> | 192.168.x.y - - [16/Sep/2016 14:01:07] "GET /stream HTTP/1.1" 200 -
> | Process Process-1:
> | Traceback (most recent call last):
> |   File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in 
> _bootstrap
> |     self.run()
> |   File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
> |     self._target(*self._args, **self._kwargs)
> |   File ".../mkchromecast/audio.py", line 523, in start_app
> |     app.run(host= '0.0.0.0')
> |   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 843, in run
> |     run_simple(host, port, self, **options)
> |   File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 694, in 
> run_simple
> |     inner()
> |   File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 659, in 
> inner
> |     srv.serve_forever()
> |   File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 499, in 
> serve_forever
> |     HTTPServer.serve_forever(self)
> |   File "/usr/lib/python2.7/SocketServer.py", line 233, in serve_forever
> |     self._handle_request_noblock()
> |   File "/usr/lib/python2.7/SocketServer.py", line 292, in 
> _handle_request_noblock
> |     self.handle_error(request, client_address)
> |   File "/usr/lib/python2.7/SocketServer.py", line 290, in 
> _handle_request_noblock
> |     self.process_request(request, client_address)
> |   File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
> |     self.finish_request(request, client_address)
> |   File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
> |     self.RequestHandlerClass(request, client_address, self)
> |   File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
> |     self.finish()
> |   File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
> |     self.wfile.close()
> |   File "/usr/lib/python2.7/socket.py", line 283, in close
> |     self.flush()
> |   File "/usr/lib/python2.7/socket.py", line 307, in flush
> |     self._sock.sendall(view[write_offset:write_offset+buffer_size])
> | error: [Errno 32] Broken pipe
> `----
>
> The terminal gets messed up and needs to be `reset'.
>

This is because of the https://github.com/joeyespo/py-getch module I
am using to listen to key events. Maybe I should come with my own
solution to avoid this. So, basically this happens when one uses the
`--volume` flag.

> If I first start the player and mkchromecast after, it works fine.
> I can stop and start the player as I please, no apparent troubles.

Thanks for this information. I cannot reproduce it though.

I have added a `--host` flag to specify the ip of the host you want
the google cast device to be connected. Additionally, there is now a
`--source-url` flag that MPD users can pass if they have a httpd local
streaming server or you can pass whatever source-url you want to play
to the google cast device (maybe cool for radio stations).

In the following upload  I will proceed to close this report. I would
like to thank you for all the feedback!.


Cheers,
-- 
Muammar El Khatib.
Linux user: 403107.
GPG Key = 71246E4A.
http://muammar.me | http://proyectociencia.org
  ,''`.
 : :' :
 `. `'
   `-

Reply via email to