-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Longer tracks get cut short (mostly) - pianobar in termux on an android tv box - 32bit #747
Comments
I’m assuming errno -5 is EIO on your platform as well? |
errno-5 is = #define EIO 5 I've tried the buffer from 60 up to 180 (currently on 180) It seems less of an issue but I have just had a track with a length of 15:04 just stop with 7:07 minutes left. |
Try higher values, like 1000 or more. My guess is that Pandora or some box between you and Pandora is dropping the connection early. pianobar does not download the entire song, but streams it while it plays, only downloading and decoding as much as fits in the buffer. |
I've had the buffer set to 1000 for a number of days now and I haven't noticed any drops on long tracks, though I don't get to use pianobar as much during the week as I do at the weekend. |
So this seems to work, but of course the trade off is long gaps between tracks (whilst the buffer is filled) Is it possible to start playback before the buffer is filled? |
The audio files are not big (a few megabytes), so I assume your internet is not particularly fast?
It’s not possible to start playback before the buffer is filled, because it causes stuttering on slow connections (which is exactly what the buffer is supposed to prevent).
As I already wrote, my guess would be that something between you and Pandora is dropping long-living (i.e. for the duration of a song) connections. You could try to investigate via wireshark (or similar programs) and check if something resets your TCP connection.
If none of that solves the issue you can also apply the following patch, which treats EIO as a retryable error, but I’m hesitant to apply it globally, because I don’t know which conditions (temporary vs. permanent) can trigger this error code.
diff --git a/src/player.c b/src/player.c
index 753d490..b0f15d5 100644
--- a/src/player.c
+++ b/src/player.c
@@ -541,7 +541,8 @@ void *BarPlayerThread (void *data) {
BarPlayerSetVolume (player);
const int ret = play (player);
retry = (ret == AVERROR_INVALIDDATA ||
- ret == -ECONNRESET) &&
+ ret == -ECONNRESET ||
+ ret == -EIO) &&
!player->interrupted;
} else {
/* filter missing or audio device busy */
|
I have pianobar running in termux on an android tv box (32bit) and I have noticed that longer tracks (5 minutes or more) are quite often cut short (95% of the time)
pianobar (2022.04.01)
ffmpeg version 6.1.1
config:
Output from debug mode:
I have Kodi running on the same device with the Pandoki plugin and this doesn't have the same issue (if that info helps)
The text was updated successfully, but these errors were encountered: