tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
968 stars 42 forks source link

podcast start slow and downloaded file is not used #243

Closed tramhao closed 3 months ago

tramhao commented 3 months ago

Podcast start playing very slow, even for downloaded file.

hasezoey commented 3 months ago

cannot reproduce on my system or the podcasts that i have for testing.

is this some kind of recent change? if yes, could you maybe bisect and report which commit is the issue?

for reference i use the following feed for testing https://feeds.megaphone.fm/LMG3928170156

tramhao commented 3 months ago

I think 2 issues are related.

  1. The link in playlist.log is now http thus the server will download instead of reading local file.
  2. The buffer size of player is too big?
tramhao commented 3 months ago

I cannot add the feed you posted. Error message is : None means probably parsing data error. I can open with browser though.

hasezoey commented 3 months ago

I cannot add the feed you posted. Error message is :

how did you try to add it, my way (which i just verified works) is:

The link in playlist.log is now http thus the server will download instead of reading local file.

how did you verify? if i add one from my posted link, it adds it correctly as https: https://pdst.fm/e/chrt.fm/track/C76EG6/traffic.megaphone.fm/LMG3429682006.mp3?updated=1709970883

The buffer size of player is too big?

which buffer, the temporary file storage? (in my case i think it always downloads the full file instead of some chunks, but it still starts before being fully downloaded)

tramhao commented 3 months ago

I add the feed same way as you. Perhaps it's network reason. Yesterday at home I cannot add it. Today in office I can.

I don't mean https was changed to http. I mean when http(s or without) were added, the local downloaded file were not used. We can download episodes with d key and listen to it later. It's not the temporary file storage.

tramhao commented 3 months ago

I think 2c087b9b7d0821ce628d04a7a47bfdc12a81057d fixed the local file issue. For the slow start of online episodes, I think it's related to my network. The default search is from apple, and they have a speed limitation of around 1-2M per second. However, with the old implementation of stream-download, the start is still quite fast. I remembered you implement a buffer to fix alsa buffer running low issue. Is it related? Or the new stream-download-rs?

hasezoey commented 3 months ago

I remembered you implement a buffer to fix alsa buffer running low issue. Is it related? Or the new stream-download-rs?

the buffer is used via BufferedSource, which is only used for MediaType::Music, not Podcast or LiveRadio. it is maybe related to the change to stream-download, as that is the only thing that changed in the time (to my knowledge).

tramhao commented 3 months ago

Currently the start speed of rusty backend is still slower than gstreamer and mpv. I think it's ok for now.