coderholic / pyradio

Curses based internet radio player
www.coderholic.com/pyradio
MIT License
965 stars 129 forks source link

Failed to connect to - Connection fails after a few seconds #133

Closed adnanvaldes closed 3 years ago

adnanvaldes commented 3 years ago

Hi there,

I just wanted to start by saying I absolutely love your project!

Anyway, after adding a stream to PyRadio the player starts and plays for a few seconds before stopping and saying "Failed to connect". I tried with .m3u, .asx, and .pls files, but none of them seem to work. I switching from https to http connections and making sure PyRadio was not forcing http, but still not luck.

I also tried opening the streams through the VLC player GUI, and in that scenario the stream is uninterrupted.

Python version = 3.9.2 OS = Windows 10 Installation = Built from source using install.py

2021-05-28 13:48:38,018 - pyradio.radio - INFO - <<<===---  Program start  ---===>>>
2021-05-28 13:48:38,018 - pyradio.radio - INFO - TUI initialization on python v. 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on Windows
2021-05-28 13:48:38,018 - pyradio.radio - INFO - Terminal supports 768 colors
2021-05-28 13:48:38,018 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [1, 0], 'Messages Border': [6, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''}
2021-05-28 13:48:38,018 - pyradio.player - INFO - Probing available multimedia players...
2021-05-28 13:48:38,021 - pyradio.player - INFO - Implemented players: mpv, mplayer, vlc
2021-05-28 13:48:38,021 - pyradio.player - DEBUG - <class 'pyradio.player.MpPlayer'> not supported.
2021-05-28 13:48:38,021 - pyradio.player - INFO - Requested player "mplayer" not supported
2021-05-28 13:48:38,021 - pyradio.player - INFO - <class 'pyradio.player.VlcPlayer'> supported.
2021-05-28 13:48:38,021 - pyradio.radio - DEBUG - body starts at line 2, ends at line 29
2021-05-28 13:48:38,021 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:48:38,021 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Registered!!!
2021-05-28 13:48:38,021 - pyradio.radio - INFO - detectUpdateThread: Starting...
2021-05-28 13:48:38,021 - pyradio.radio - INFO - detectUpdateThread: Will check in 5 seconds
2021-05-28 13:48:38,828 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:48:39,262 - pyradio.player - ERROR - setting self.stop_win_vlc_status_update_thread = True
2021-05-28 13:48:39,263 - pyradio.player - INFO - Selected Station: "Lave Radio"
2021-05-28 13:48:39,263 - pyradio.player - ERROR - DE getting port for C:\Users\adrav\AppData\Roaming\pyradio
2021-05-28 13:48:39,264 - pyradio.player - INFO - vlc listening on 127.0.0.1:44538
2021-05-28 13:48:39,264 - pyradio.player - INFO - vlc log file: "C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44538"
2021-05-28 13:48:39,264 - pyradio.player - INFO - Executing command: C:\Program Files\VideoLAN\VLC\vlc.exe -Irc --rc-host 127.0.0.1:44538 --file-logging --logmode text --log-verbose 4 --logfile C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44538 -vv https://kathy.torontocast.com:1350/grantwoolcott/1/wmp.asx
2021-05-28 13:48:39,268 - pyradio.player - DEBUG - Win VLC updateStatus thread started.
2021-05-28 13:48:39,270 - pyradio.player - DEBUG - playback detection thread started
2021-05-28 13:48:39,270 - pyradio.player - INFO - Player started
2021-05-28 13:48:39,270 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:48:39,779 - pyradio.player - ERROR - DE _get_volume_response: vol = 90
2021-05-28 13:48:40,802 - pyradio.player - INFO - *** updateWinVLCStatus(): Start of playback detected (Icy audio token received) ***
2021-05-28 13:48:43,123 - pyradio.radio - INFO - detectUpdateThread: Pyradio is up to date. Will check again in 9 days...
2021-05-28 13:48:50,508 - pyradio.player - ERROR - setting self.stop_win_vlc_status_update_thread = True
2021-05-28 13:48:50,508 - pyradio.player - ERROR - >>>> Terminating process
2021-05-28 13:48:50,508 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:48:50,508 - pyradio.radio - INFO - *** Start of playback NOT detected!!! ***
2021-05-28 13:48:50,511 - pyradio.player - DEBUG - vlc log file removed: "C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44538'
2021-05-28 13:48:53,390 - pyradio.player - ERROR - setting self.stop_win_vlc_status_update_thread = True
2021-05-28 13:48:53,390 - pyradio.player - INFO - Selected Station: "Lave Radio"
2021-05-28 13:48:53,392 - pyradio.player - ERROR - DE getting port for C:\Users\adrav\AppData\Roaming\pyradio
2021-05-28 13:48:53,392 - pyradio.player - INFO - vlc listening on 127.0.0.1:44179
2021-05-28 13:48:53,392 - pyradio.player - INFO - vlc log file: "C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44179"
2021-05-28 13:48:53,392 - pyradio.player - INFO - Executing command: C:\Program Files\VideoLAN\VLC\vlc.exe -Irc --rc-host 127.0.0.1:44179 --file-logging --logmode text --log-verbose 4 --logfile C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44179 -vv https://kathy.torontocast.com:1350/grantwoolcott/1/wmp.asx
2021-05-28 13:48:53,396 - pyradio.player - DEBUG - Win VLC updateStatus thread started.
2021-05-28 13:48:53,396 - pyradio.player - DEBUG - playback detection thread started
2021-05-28 13:48:53,396 - pyradio.player - INFO - Player started
2021-05-28 13:48:53,396 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:48:54,911 - pyradio.player - INFO - *** updateWinVLCStatus(): Start of playback detected (Icy audio token received) ***
2021-05-28 13:49:04,576 - pyradio.player - ERROR - setting self.stop_win_vlc_status_update_thread = True
2021-05-28 13:49:04,576 - pyradio.player - ERROR - >>>> Terminating process
2021-05-28 13:49:04,576 - pyradio.radio - ERROR - clearing window from line 2 to end.
2021-05-28 13:49:04,576 - pyradio.radio - INFO - *** Start of playback NOT detected!!! ***
2021-05-28 13:49:04,589 - pyradio.player - DEBUG - vlc log file removed: "C:\Users\adrav\AppData\Roaming\pyradio\vlc_log.44179'
2021-05-28 13:49:05,881 - pyradio.player - ERROR - setting self.stop_win_vlc_status_update_thread = True
2021-05-28 13:49:05,881 - pyradio.config - DEBUG - saved params = {'mpv': [1, 'profile:pyradio'], 'mplayer': [1, 'profile:pyradio'], 'vlc': [1, 'Do not use any extra player parameters']}
2021-05-28 13:49:05,881 - pyradio.config - INFO - Config not saved (not modified)
2021-05-28 13:49:05,881 - pyradio.config - INFO - Lock file removed...
s-n-g commented 3 years ago

Hi @AdnanValdes

I just had a look at these stations (tried axs, m3u, pls) and I can confirm that there is a problem here, although the behaviour is different for me. I think that the problem has to do with the way the debug info is written in the log file... Well, that probably means nothing to you, but I think I have a way to "fix" it.

You will have to wait a bit longer (it's already 02:20 here :) ) We'll talk tomorrow...

s-n-g commented 3 years ago

Hi again @AdnanValdes

Would you be so kind to check my latest devel commit? Just run on a console:

pyradio -U --sng-devel

and then double-click the update.bat file in the Explorer window that will be opened.

This will update your installation to my devel branch...

If the station does actually play, can you also please check its info (press "i) and tell me (a screenshot maybe) what it shows? I'm having problems parsing this station's info...

This is what I'm getting here

Στιγμιότυπο οθόνης_2021-05-30_08-07-11

BTW, what is your vlc version? I'm on the latest (3.0.14)

S.

adnanvaldes commented 3 years ago

Hello @s-n-g ,

I'm using your development branch and I can confirm that the radio station is now playing! Thank you.

Here's a screenshot of what I see and the information on PyRadio. I'm using VLC 3.0.14 as well, but VLC doesn't show any information about the current track or anything like that either.

image

s-n-g commented 3 years ago

Hi again @AdnanValdes

I finally got the station's info read. Doing the same thing

pyradio -U --sng-devel

and then double-click the update.bat file in the Explorer window that will be opened.

This is what I get

Στιγμιότυπο οθόνης_2021-06-01_11-34-39

Song titles are not displayed because vlc does not provide them (for this station). I have them displayed on linux mpv only. Either way, that's not a bug...

Please do confirm you get the same thing so we can close this issue S.

adnanvaldes commented 3 years ago

Hello @s-n-g,

Yes, I get all the information. I'll mark this issue as closed. Thank you for the help!

image