keredson / gnomecast

Chromecast local files from Linux - supports MKV, subtitles, 5.1 sound and 4K!
GNU General Public License v3.0
1.43k stars 50 forks source link

Chromecast gives up after waiting. #70

Open pawandubey opened 6 years ago

pawandubey commented 6 years ago

This is basically a re-opening of #60 but I was pretty unresponsive on that issue and it seems like it got sidetracked into an unrelated problem. Feel free to close/reopen as desired.

Link to audio file I was trying to stream

I'm on Gnomecast 1.4.1, and uname -a is

Linux <snip> 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

The full log of opening Gnomecast from the terminal, and trying to stream the file:

★ 𝞴 gnomecast 

(gnomecast:17413): Gtk-WARNING **: Theme parsing error: gtk.css:2:0: Expected semicolon

(gnomecast:17413): Gtk-WARNING **: Theme parsing error: gtk.css:3:0: Expected semicolon

(gnomecast:17413): Gtk-WARNING **: Theme parsing error: gtk.css:4:0: Expected semicolon
No subtitles. -1 None
None
serving on http://192.168.1.40:44501
check_ffmpeg
b'/usr/bin/ffmpeg\n'
Chromecast('192.168.1.46', port=8009, device=DeviceStatus(friendly_name='XBR-49X900E', model_name='BRAVIA 4K GB', manufacturer='Sony', uuid=UUID('<snip>'), cast_type='cast'))
Open clicked
File selected: /home/pawan/439893_4397472-lq.mp3
Checking for subtitles... -1 None
WARNING:pychromecast.controllers:STOP command requested but no session is active.
subtitle_ids []
No subtitles. -1 None
Transcoder /home/pawan/439893_4397472-lq.mp3 mp3 None False
True True False
['ffmpeg', '-i', '/home/pawan/439893_4397472-lq.mp3', '-c:v', 'h264', '-c:a', 'copy', '/tmp/gnomecast_lsmyi8hh.mp4']
CastStatus(is_active_input=True, is_stand_by=False, volume_level=0.07999999821186066, volume_muted=False, app_id='CC1AD845', display_name='Default Media Receiver', namespaces=['urn:x-cast:com.google.cast.cac', 'urn:x-cast:com.google.cast.broadcast', 'urn:x-cast:com.google.cast.media'], session_id='1465485f-805d-49d0-a1a1-bf96d7b56a0c', transport_id='1465485f-805d-49d0-a1a1-bf96d7b56a0c', status_text='Default Media Receiver')
<MediaStatus {'supports_skip_backward': False, 'artist': None, 'supported_media_commands': 0, 'content_type': None, 'playback_rate': 1, 'supports_pause': False, 'volume_muted': False, 'title': None, 'current_time': 0, 'player_state': 'UNKNOWN', 'album_artist': None, 'supports_stream_volume': False, 'duration': None, 'supports_skip_forward': False, 'stream_type': 'UNKNOWN', 'subtitle_tracks': {}, 'last_updated': None, 'metadata_type': None, 'content_id': None, 'idle_reason': None, 'volume_level': 1, 'track': None, 'episode': None, 'series_title': None, 'media_session_id': None, 'supports_seek': False, 'images': [], 'supports_stream_mute': False, 'media_custom_data': {}, 'media_metadata': {}, 'season': None, 'album_name': None, 'current_subtitle_tracks': []}>

And it just hangs there.

The device is recognised correctly so I am unsure what the problem can be. I also checked the transcoded file saved in /tmp and it seemed to be fine too. Maybe I need to open up some port?

keredson commented 5 years ago

that file is streaming OK for me on my chromecast 4k. what device are you using?

pawandubey commented 5 years ago

After a bit of investigation, I think the issue is that I have my firewall on. I can allow traffic on the ports gnomecast starts the server on, but it seems like it's not a fixed port. Assuming this hypothesis is correct, I think it would be helpful if gnomecast started its server on a fixed port (or at least a fixed range of ports). This way I would be able to open up only those ports.